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
Setter method for state, mapped from YANG variable /qos/queues/queue/state (container)
def _set_state(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=Tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_state(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_queues_queue_state, is_container='container', yang_name=\"state\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_path...
[ "0.8795707", "0.8793101", "0.85806286", "0.85462534", "0.85324097", "0.83887255", "0.8366235", "0.8346166", "0.8169059", "0.81478727", "0.81453204", "0.7066647", "0.7046458", "0.703309", "0.702961", "0.70101017", "0.6991756", "0.6986095", "0.69792634", "0.69603413", "0.695017...
0.8741242
2
Getter method for red, mapped from YANG variable /qos/queues/queue/red (container)
def _get_red(self): return self.__red
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_red(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_red_openconfig_qos__qos_queues_queue_red, is_container='container', yang_name=\"red\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, ...
[ "0.818272", "0.81489015", "0.81403136", "0.61986196", "0.6166245", "0.61338425", "0.5944448", "0.59263325", "0.58602333", "0.5284116", "0.50497514", "0.5037669", "0.5015465", "0.5006003", "0.4970591", "0.4965759", "0.48158103", "0.4810601", "0.48095754", "0.4805733", "0.47704...
0.48328266
17
Getter method for wred, mapped from YANG variable /qos/queues/queue/wred (container)
def _get_wred(self): return self.__wred
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_wred(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_wred_openconfig_qos__qos_queues_queue_wred, is_container='container', yang_name=\"wred\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=Tr...
[ "0.79958624", "0.7973528", "0.7952348", "0.597978", "0.5968429", "0.5860268", "0.46966618", "0.46016678", "0.45429626", "0.45197558", "0.45027107", "0.4485824", "0.4485824", "0.4485824", "0.4485824", "0.4485824", "0.4485824", "0.4485824", "0.4485824", "0.4485824", "0.4485824"...
0.5530378
7
Setter method for queue, mapped from YANG variable /qos/queues/queue (list)
def _set_queue(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_queue(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"name\",yc_queue_openconfig_qos__qos_queues_queue, yang_name=\"queue\", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='...
[ "0.83349186", "0.8309342", "0.80356103", "0.8023132", "0.8018293", "0.7994689", "0.799144", "0.798465", "0.72139835", "0.7106691", "0.70977527", "0.7094189", "0.6898238", "0.6898238", "0.6898238", "0.6881403", "0.6881403", "0.6881403", "0.68339497", "0.6828258", "0.6800662", ...
0.8271119
2
Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)
def _get_name(self): return self.__name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_name(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['name'], path_helper=self._path_helper, require_instance=True...
[ "0.6082859", "0.6082859", "0.6082859", "0.6082859", "0.6082859", "0.6082859", "0.6052538", "0.6052538", "0.6052538", "0.6052538", "0.6052538", "0.6052538", "0.60085654", "0.59470737", "0.5699793", "0.56673", "0.54474944", "0.54414827", "0.53076345", "0.5288146", "0.52855957",...
0.0
-1
Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)
def _set_name(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_name(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['name'], path_helper=self._path_helper, require_instance=True...
[ "0.6881075", "0.6881075", "0.6881075", "0.6881075", "0.6881075", "0.6881075", "0.6852598", "0.6852598", "0.6852598", "0.6852598", "0.6852598", "0.6852598", "0.6178554", "0.5950237", "0.5950237", "0.5950237", "0.5950237", "0.5950237", "0.5950237", "0.5950237", "0.5950237", "...
0.5985903
30
Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)
def _get_sequence(self): return self.__sequence
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_sequence(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name=\"sequence\", parent=self, path_helper=self._path_helper, ...
[ "0.7022114", "0.7022114", "0.7022114", "0.6646612", "0.6646612", "0.6646612", "0.6646612", "0.6646612", "0.6646612", "0.6293849", "0.6121339", "0.5941495", "0.5900456", "0.57718444", "0.57718444", "0.57718444", "0.5698017", "0.5698017", "0.5636715", "0.5636715", "0.5636715", ...
0.54082954
27
Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)
def _set_sequence(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_sequence(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../scheduler-policies/scheduler-policy[name=current()/../../../../config/name]/schedulers/scheduler/config/sequence', caller=se...
[ "0.73097885", "0.73097885", "0.73097885", "0.73097885", "0.73097885", "0.73097885", "0.65089947", "0.65089947", "0.65089947", "0.6390999", "0.6390999", "0.6390999", "0.6390999", "0.6390999", "0.6390999", "0.6121369", "0.6022874", "0.5936026", "0.5800619", "0.579587", "0.57779...
0.7859517
2
Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)
def _get_type(self): return self.__type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_type(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type=\"dict_key\", restriction_arg={u'TWO_RATE_THREE_COLOR': {'@namespace': u'http://openconfig.net/yang/qos-types', '@module': u'op...
[ "0.65579706", "0.65579706", "0.65579706", "0.55323696", "0.5432273", "0.5405676", "0.53697467", "0.5354225", "0.5354225", "0.5354225", "0.5352876", "0.5352876", "0.5352876", "0.5341804", "0.5333603", "0.5333603", "0.5333603", "0.5333603", "0.5333603", "0.5333603", "0.5323177"...
0.0
-1
Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)
def _set_type(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'TWO_RATE_THREE_COLOR': {'@namespace': u'http://openconfig.net/yang/qos-types', '@module': u'openconfig-qos-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_type(self, v, load=False):\n parent = getattr(self, \"_parent\", None)\n if parent is not None and load is False:\n raise AttributeError(\"Cannot set keys directly when\" +\n \" within an instantiated list\")\n\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n...
[ "0.6079179", "0.6079179", "0.6079179", "0.6079179", "0.6079179", "0.6079179", "0.5856121", "0.5820195", "0.5820195", "0.5820195", "0.5818998", "0.5818998", "0.5818998", "0.5786819", "0.5742643", "0.5666232", "0.5666232", "0.5666232", "0.5655157", "0.5655157", "0.5535465", "...
0.69181323
1
Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)
def _get_priority(self): return self.__priority
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_priority(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type=\"dict_key\", restriction_arg={u'STRICT': {}},), is...
[ "0.6799239", "0.6799239", "0.6799239", "0.6381252", "0.62168163", "0.62168163", "0.6188406", "0.6188406", "0.6188406", "0.6188406", "0.6186599", "0.61859566", "0.61859566", "0.61859566", "0.60506845", "0.6021068", "0.592676", "0.5899598", "0.58982927", "0.5886146", "0.5882801...
0.580187
27
Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)
def _get_id(self): return self.__id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"config_id\")", "def config_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"config_id\")", "def config_rule_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"config_rule_id\")", "def confi...
[ "0.68928343", "0.5777668", "0.566586", "0.566586", "0.53884727", "0.5344414", "0.5344414", "0.5298452", "0.5298452", "0.5298452", "0.5298452", "0.5152141", "0.51155293", "0.507863", "0.507863", "0.5071848", "0.5071848", "0.5071848", "0.5071848", "0.5071848", "0.5071848", "0...
0.0
-1
Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)
def _set_id(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"config_id\")", "def setId(self, *args):\n return _libsbml.Input_setId(self, *args)", "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_conf...
[ "0.63222164", "0.5468642", "0.54285955", "0.53583574", "0.52998376", "0.5244119", "0.5244119", "0.5218874", "0.51227057", "0.50783336", "0.50205797", "0.50205797", "0.50133795", "0.5010891", "0.5010891", "0.5010891", "0.5010891", "0.5004394", "0.5004394", "0.5004394", "0.5004...
0.5051964
13
Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)
def _get_input_type(self): return self.__input_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_input_type(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type=\"dict_key\", restriction_arg={u'QUEUE': {}, u'IN...
[ "0.71071136", "0.71071136", "0.71071136", "0.7099548", "0.7099548", "0.7099548", "0.6376247", "0.57491434", "0.5241308", "0.5104045", "0.5071836", "0.5053852", "0.5053852", "0.5053852", "0.5053852", "0.5053852", "0.5053852", "0.5053852", "0.5053852", "0.5053852", "0.5053852",...
0.603565
11
Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)
def _set_input_type(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'QUEUE': {}, u'IN_PROFILE': {}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_input_type(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type=\"dict_key\", restriction_arg={u'QUEUE': {}, u'IN...
[ "0.7632266", "0.7632266", "0.7632266", "0.6726524", "0.6065942", "0.5975038", "0.5671138", "0.5671138", "0.5671138", "0.5671138", "0.5671138", "0.5671138", "0.55441004", "0.5466346", "0.5396926", "0.53805476", "0.5336683", "0.5128756", "0.512515", "0.5060113", "0.505145", "...
0.76302236
5
Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)
def _get_queue(self): return self.__queue
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_queue(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../queues/queue/name', caller=self._path() + ['queue'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_...
[ "0.7367893", "0.7367893", "0.7367893", "0.735974", "0.735974", "0.735974", "0.64711004", "0.64711004", "0.64711004", "0.64586145", "0.64586145", "0.64586145", "0.6407296", "0.63871", "0.6380226", "0.63689625", "0.6343687", "0.6336294", "0.6324881", "0.62708294", "0.6233467", ...
0.57018584
44
Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)
def _set_queue(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../queues/queue/name', caller=self._path() + ['queue'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="queue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_queue(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../queues/queue/name', caller=self._path() + ['queue'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_...
[ "0.7978372", "0.7978372", "0.7978372", "0.6984432", "0.69699275", "0.69699275", "0.69699275", "0.6962945", "0.6962945", "0.6962945", "0.6940358", "0.6930029", "0.6925822", "0.69040763", "0.6894822", "0.68677616", "0.67715526", "0.6752051", "0.67489743", "0.6091755", "0.609175...
0.7975306
5
Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)
def _set_weight(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_weight(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name=\"weight\", rest_name=\"weight\", parent=self, pat...
[ "0.693419", "0.684347", "0.684347", "0.684347", "0.6752583", "0.6385087", "0.63724667", "0.6323769", "0.6323769", "0.6323769", "0.62057877", "0.6151006", "0.6044359", "0.58621734", "0.58179355", "0.5713244", "0.56511396", "0.5642343", "0.55964965", "0.55856913", "0.55856913",...
0.68543714
3
Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)
def _set_id(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_state_id(cls, state):\n if not isinstance(state, basestring):\n raise TypeError(\"State should be a basestring.\")\n return validate_string_int(state, name=\"state\")", "def state_id(self):\n return self._state_id", "def setId(self, *args):\n return _libsbml....
[ "0.5709963", "0.56807494", "0.5652069", "0.56486", "0.56105465", "0.5451061", "0.52886087", "0.5230701", "0.51908773", "0.51908773", "0.51889944", "0.51022387", "0.51012355", "0.5092212", "0.50833195", "0.5055947", "0.5033243", "0.4968438", "0.4967494", "0.49181935", "0.49041...
0.4680736
63
Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)
def _set_input_type(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'QUEUE': {}, u'IN_PROFILE': {}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_input_type(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type=\"dict_key\", restriction_arg={u'QUEUE': {}, u'IN...
[ "0.74242866", "0.74242866", "0.74242866", "0.65866816", "0.6056741", "0.58041507", "0.58041507", "0.58041507", "0.58041507", "0.58041507", "0.58041507", "0.57970524", "0.5723341", "0.5349702", "0.50944763", "0.50787884", "0.5063436", "0.49922788", "0.49796787", "0.49732494", ...
0.7428596
2
Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)
def _get_queue(self): return self.__queue
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_queue(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../queues/queue/name', caller=self._path() + ['queue'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_...
[ "0.7218019", "0.7218019", "0.7218019", "0.72066146", "0.72066146", "0.72066146", "0.64446187", "0.64042556", "0.63222843", "0.61694026", "0.61420494", "0.61420494", "0.61420494", "0.61336374", "0.61336374", "0.61336374", "0.610044", "0.60927355", "0.6089626", "0.6066921", "0....
0.58712053
31
Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)
def _set_queue(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../queues/queue/name', caller=self._path() + ['queue'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="queue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_queue(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../queues/queue/name', caller=self._path() + ['queue'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_...
[ "0.7838183", "0.7838183", "0.7838183", "0.68683267", "0.6668786", "0.6668786", "0.6668786", "0.6665518", "0.6665518", "0.6665518", "0.66529", "0.6652275", "0.6605463", "0.65056455", "0.64935094", "0.6438922", "0.63522947", "0.63408774", "0.63233495", "0.5934386", "0.58929247"...
0.78449494
2
Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)
def _get_weight(self): return self.__weight
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weight(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"weight\")", "def weight(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"weight\")", "def get_weight(self):\n return self.weight # return the weight value", "def weight(self) -> int:\n return pulu...
[ "0.7195691", "0.6767735", "0.6376566", "0.6343415", "0.63200986", "0.63200986", "0.63200986", "0.6297172", "0.62906134", "0.6182509", "0.6182509", "0.6163879", "0.610394", "0.6096426", "0.6025364", "0.6022398", "0.5976653", "0.59300303", "0.5889006", "0.5889006", "0.58867556"...
0.6013179
16
Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)
def _set_weight(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weight(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"weight\")", "def _set_weight(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']},...
[ "0.68101263", "0.6725698", "0.66178447", "0.66178447", "0.66178447", "0.65712", "0.65474033", "0.65474033", "0.65474033", "0.65236366", "0.6288257", "0.6123349", "0.6119344", "0.6050455", "0.59948283", "0.5909653", "0.5909653", "0.5909653", "0.59053457", "0.5899431", "0.58701...
0.6549457
7
Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)
def _set_id(self, v, load=False): parent = getattr(self, "_parent", None) if parent is not None and load is False: raise AttributeError("Cannot set keys directly when" + " within an instantiated list") if hasattr(v, "_utype"): v = v._utype(v) try: t = YANG...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setId(self, *args):\n return _libsbml.Input_setId(self, *args)", "def _set_input(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"id\",yc_input_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedul...
[ "0.6237633", "0.56793433", "0.5629311", "0.56082815", "0.5599913", "0.5599913", "0.5590739", "0.5572528", "0.5542807", "0.55193895", "0.5254198", "0.52369195", "0.5196201", "0.51308334", "0.51180106", "0.50955963", "0.50955963", "0.50955963", "0.50955963", "0.50955963", "0.50...
0.49748832
45
Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)
def _get_config(self): return self.__config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name=\"config\", parent=self, p...
[ "0.7780751", "0.77356243", "0.7684088", "0.7409963", "0.7348935", "0.7307269", "0.66232556", "0.65662676", "0.65469", "0.6540266", "0.651499", "0.6446001", "0.642307", "0.6422851", "0.6420564", "0.6408793", "0.640576", "0.63607705", "0.63055694", "0.6286278", "0.6284751", "...
0.0
-1
Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)
def _get_child_scheduler(self): return self.__child_scheduler
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_child_scheduler(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['child-scheduler'], path_helper=self._path_help...
[ "0.83419806", "0.83419806", "0.83419806", "0.83368653", "0.83368653", "0.83368653", "0.53470445", "0.53433406", "0.5324933", "0.526675", "0.52592075", "0.52486086", "0.5245272", "0.5240044", "0.52262753", "0.5006185", "0.5006185", "0.5006185", "0.5006185", "0.5006185", "0.500...
0.65361816
7
Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)
def _set_child_scheduler(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['child-scheduler'], path_helper=self._path_helper, require...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_child_scheduler(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['child-scheduler'], path_helper=self._path_help...
[ "0.8867858", "0.8867858", "0.8867858", "0.6230383", "0.6230383", "0.6230383", "0.6230383", "0.6230383", "0.6230383", "0.5745345", "0.57427055", "0.5719493", "0.563741", "0.5633376", "0.56238174", "0.56212974", "0.56152576", "0.5601273", "0.52102965", "0.51713014", "0.51659703...
0.88657314
4
Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)
def _set_output_fwd_group(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../forwarding-groups/forwarding-group/config/name', caller=self._path() + ['output-fwd-group'], path_helper=self._path_helper, requir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_output_fwd_group(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../forwarding-groups/forwarding-group/config/name', caller=self._path() + ['output-fwd-group'], path_helper=self._path_hel...
[ "0.89624655", "0.89624655", "0.89624655", "0.7261094", "0.7261094", "0.7261094", "0.7261094", "0.7261094", "0.7261094", "0.56393045", "0.553812", "0.5530909", "0.55163825", "0.5242957", "0.5061232", "0.5061232", "0.5061232", "0.50581735", "0.50581735", "0.50581735", "0.498187...
0.89554256
4
Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)
def _get_child_scheduler(self): return self.__child_scheduler
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_child_scheduler(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['child-scheduler'], path_helper=self._path_help...
[ "0.8205468", "0.8205468", "0.8205468", "0.81987834", "0.81987834", "0.81987834", "0.5221084", "0.52192885", "0.51927125", "0.5134773", "0.51281214", "0.51199025", "0.5113105", "0.51102453", "0.5095575", "0.5019954", "0.5019954", "0.5019954", "0.5019954", "0.5019954", "0.50199...
0.65336144
6
Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)
def _set_child_scheduler(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['child-scheduler'], path_helper=self._path_helper, require...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_child_scheduler(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['child-scheduler'], path_helper=self._path_help...
[ "0.87512016", "0.87512016", "0.87512016", "0.619783", "0.619783", "0.619783", "0.619783", "0.619783", "0.619783", "0.5622926", "0.5619009", "0.55892956", "0.55092835", "0.5505467", "0.549857", "0.54943466", "0.5480284", "0.5470563", "0.5122367", "0.5072427", "0.5065212", "0...
0.8754882
0
Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)
def _set_output_fwd_group(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../forwarding-groups/forwarding-group/config/name', caller=self._path() + ['output-fwd-group'], path_helper=self._path_helper, requir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_output_fwd_group(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../forwarding-groups/forwarding-group/config/name', caller=self._path() + ['output-fwd-group'], path_helper=self._path_hel...
[ "0.8849426", "0.8849426", "0.8849426", "0.7297854", "0.7297854", "0.7297854", "0.7297854", "0.7297854", "0.7297854", "0.54066", "0.5398142", "0.53769094", "0.5190799", "0.50763273", "0.50763273", "0.50763273", "0.50733656", "0.50733656", "0.50733656", "0.5014509", "0.5014509"...
0.88560826
0
Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)
def _get_config(self): return self.__config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name=\"config\", parent=self, path_he...
[ "0.80783045", "0.8074598", "0.8047337", "0.7803963", "0.7789173", "0.7751184", "0.76823944", "0.76379466", "0.76069677", "0.7480343", "0.7469309", "0.7447632", "0.74409664", "0.744088", "0.7439485", "0.73894894", "0.73720664", "0.733022", "0.6619608", "0.66178757", "0.6564168...
0.0
-1
Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)
def _set_config(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name=\"config\", parent=self, path_he...
[ "0.85231876", "0.85212994", "0.82087725", "0.81915414", "0.8138928", "0.80920047", "0.80483556", "0.79988754", "0.78494483", "0.778465", "0.7757115", "0.7753307", "0.7746983", "0.7738511", "0.77215695", "0.7704173", "0.76714385", "0.6853514", "0.68519604", "0.6784592", "0.664...
0.8476261
2
Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)
def _set_state(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_hel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_state(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name=\"state\", parent=self, path_helper...
[ "0.8676056", "0.8637793", "0.8494084", "0.8471942", "0.8435582", "0.83788425", "0.8333528", "0.8310209", "0.8218387", "0.81926006", "0.81585956", "0.79705584", "0.79614794", "0.79479486", "0.7928283", "0.79107946", "0.79038167", "0.78772545", "0.7867703", "0.78523433", "0.720...
0.8622203
2
Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)
def _get_sequence(self): return self.__sequence
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_sequence(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../scheduler-policies/scheduler-policy[name=current()/../../../../config/name]/schedulers/scheduler/config/sequence', caller=se...
[ "0.78565556", "0.78565556", "0.78565556", "0.78565556", "0.78565556", "0.78565556", "0.675152", "0.675152", "0.675152", "0.675152", "0.675152", "0.675152", "0.66978633", "0.66978633", "0.66978633", "0.61707586", "0.61707586", "0.61707586", "0.6004305", "0.59788454", "0.597884...
0.5997974
32
Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)
def _set_sequence(self, v, load=False): parent = getattr(self, "_parent", None) if parent is not None and load is False: raise AttributeError("Cannot set keys directly when" + " within an instantiated list") if hasattr(v, "_utype"): v = v._utype(v) try: t ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_sequence(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../../../scheduler-policies/scheduler-policy[name=current()/../../../../config/name]/schedulers/scheduler/config/sequence', caller=se...
[ "0.8482849", "0.8482849", "0.8482849", "0.8482849", "0.8482849", "0.8482849", "0.74849546", "0.74849546", "0.74849546", "0.74849546", "0.74849546", "0.74849546", "0.7169231", "0.7169231", "0.7169231", "0.611962", "0.58268225", "0.5822846", "0.580827", "0.57915866", "0.5729027...
0.7437955
14
Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)
def _get_config(self): return self.__config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name=\"config\", parent=self, path_helper=se...
[ "0.8061462", "0.8051496", "0.8033352", "0.77577454", "0.77228445", "0.7697411", "0.7563674", "0.75552917", "0.7536751", "0.7531999", "0.75175554", "0.74940705", "0.74183345", "0.74108285", "0.7405923", "0.7299341", "0.72921926", "0.7279687", "0.62974685", "0.62698877", "0.625...
0.0
-1
Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)
def _set_config(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name=\"config\", parent=self, path_helper=se...
[ "0.84552604", "0.8452667", "0.8174928", "0.81503236", "0.81028664", "0.7853872", "0.7844605", "0.78132045", "0.7788965", "0.7784633", "0.7776677", "0.7774451", "0.77621526", "0.7753946", "0.7659338", "0.7651166", "0.76265913", "0.6485156", "0.64735806", "0.64657104", "0.64425...
0.84158707
2
Getter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)
def _get_output(self): return self.__output
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_output(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_output_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name=\"output\", parent=self, path_helper=self...
[ "0.74883765", "0.7480186", "0.7463662", "0.6149659", "0.61300725", "0.61030096", "0.5957287", "0.59508127", "0.5950398", "0.5607362", "0.559172", "0.551137", "0.54822624", "0.54651904", "0.5452254", "0.5439759", "0.54068244", "0.54011524", "0.5339783", "0.52387327", "0.519314...
0.0
-1
Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)
def _get_name(self): return self.__name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_name(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['name'], path_helper=self._path_helper, require_instance=True...
[ "0.6721343", "0.6721343", "0.6721343", "0.6721343", "0.6721343", "0.6721343", "0.6710487", "0.6710487", "0.6710487", "0.6710487", "0.6710487", "0.6710487", "0.5574572", "0.54102397", "0.5367657", "0.5325184", "0.5325184", "0.52798843", "0.5250398", "0.5207915", "0.5193538", ...
0.0
-1
Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)
def _set_name(self, v, load=False): parent = getattr(self, "_parent", None) if parent is not None and load is False: raise AttributeError("Cannot set keys directly when" + " within an instantiated list") if hasattr(v, "_utype"): v = v._utype(v) try: t = YA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_name(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ReferenceType(referenced_path='../../../../../../scheduler-policies/scheduler-policy/config/name', caller=self._path() + ['name'], path_helper=self._path_helper, require_instance=True...
[ "0.72585356", "0.72585356", "0.72585356", "0.72585356", "0.72585356", "0.72585356", "0.72458357", "0.72458357", "0.72458357", "0.72458357", "0.72458357", "0.72458357", "0.6455006", "0.6349599", "0.6349599", "0.6349599", "0.6349599", "0.6349599", "0.6349599", "0.6349599", "0.6...
0.0
-1
Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)
def _get_config(self): return self.__config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name=\"config\", parent=self, path_helper=self._path_helper, extm...
[ "0.78478515", "0.7846539", "0.78248954", "0.7773272", "0.77561486", "0.77540827", "0.747717", "0.74685675", "0.7437582", "0.7243667", "0.7241568", "0.7220403", "0.71711737", "0.7167934", "0.7167596", "0.7161401", "0.71310824", "0.71021724", "0.5950022", "0.59448475", "0.59356...
0.0
-1
Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)
def _set_config(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_config(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name=\"config\", parent=self, path_helper=self._path_helper, extmethods=self...
[ "0.82712376", "0.82668626", "0.82069916", "0.8184561", "0.8170399", "0.78060114", "0.7779381", "0.7768724", "0.76339316", "0.76203936", "0.76167667", "0.757883", "0.7566632", "0.7541525", "0.7488746", "0.74681807", "0.7430608", "0.62361944", "0.6227925", "0.6196533", "0.61904...
0.82260007
2
Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)
def _set_state(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_state(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name=\"state\", parent=self, path_helper=self._path_helper, extmetho...
[ "0.839836", "0.83618295", "0.81789017", "0.81720245", "0.8150475", "0.7999986", "0.79973894", "0.7996425", "0.79881614", "0.79813033", "0.79658985", "0.78172386", "0.7812066", "0.78095776", "0.76708794", "0.7670048", "0.76635367", "0.7662603", "0.7658609", "0.7645007", "0.683...
0.8355057
2
Getter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)
def _get_scheduler_policy(self): return self.__scheduler_policy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_scheduler_policy(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"name\",yc_scheduler_policy_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy, yang_name=\"scheduler-policy\", parent=self, is_container='li...
[ "0.7834733", "0.783162", "0.78156954", "0.66662025", "0.66662025", "0.66662025", "0.66201", "0.65975237", "0.6570413", "0.64359933", "0.64243925", "0.63904655", "0.6380403", "0.63636976", "0.6360321", "0.62837505", "0.62833256", "0.6271914", "0.6258936", "0.6239333", "0.62309...
0.6576845
9
Setter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)
def _set_scheduler_policy(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=YANGListType("name",yc_scheduler_policy_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_scheduler_policy(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"name\",yc_scheduler_policy_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy, yang_name=\"scheduler-policy\", parent=self, is_container='li...
[ "0.83858675", "0.83847135", "0.71641237", "0.7147482", "0.71127623", "0.7019479", "0.6998183", "0.6993079", "0.6991115", "0.6979336", "0.69404787", "0.688889", "0.6861687", "0.68599844", "0.68249595", "0.6802716", "0.67962325", "0.66723305", "0.6660161", "0.66459566", "0.6139...
0.8357387
2
Getter method for classifiers, mapped from YANG variable /qos/classifiers (container)
def _get_classifiers(self): return self.__classifiers
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_classifiers(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_elements__qos_classifiers, is_container='container', yang_name=\"classifiers\", parent=self, path_helper=self._path_helper, extmethods=self._extme...
[ "0.76133376", "0.75761825", "0.756166", "0.6398605", "0.6333389", "0.62997293", "0.61021197", "0.6089107", "0.60378236", "0.60303295", "0.6004866", "0.600174", "0.5937492", "0.5678403", "0.5678403", "0.5678403", "0.5678403", "0.5678403", "0.5678403", "0.5678403", "0.5678403",...
0.6858191
4
Setter method for classifiers, mapped from YANG variable /qos/classifiers (container)
def _set_classifiers(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_elements__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, regist...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_classifiers(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_interfaces__qos_classifiers, is_container='container', yang_name=\"classifiers\", parent=self, path_helper=self._path_helper, extmethods=self._ext...
[ "0.82530403", "0.8241558", "0.7123468", "0.7094438", "0.70506966", "0.6976243", "0.694139", "0.69180167", "0.6889296", "0.68863773", "0.6857859", "0.6479475", "0.6362965", "0.6342974", "0.62938404", "0.62655514", "0.6226275", "0.6226275", "0.6226275", "0.6222281", "0.6210237"...
0.8259568
0
Getter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)
def _get_forwarding_groups(self): return self.__forwarding_groups
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_forwarding_groups(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_forwarding_groups_openconfig_qos_interfaces__qos_forwarding_groups, is_container='container', yang_name=\"forwarding-groups\", parent=self, path_helper=self._path_help...
[ "0.81840634", "0.81582373", "0.81466013", "0.65996546", "0.6584955", "0.6552378", "0.6009946", "0.6009946", "0.6009946", "0.5262483", "0.52535313", "0.51484096", "0.5072016", "0.50434047", "0.50434047", "0.50434047", "0.5042547", "0.5040673", "0.5004729", "0.4988486", "0.4981...
0.686023
3
Setter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)
def _set_forwarding_groups(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_forwarding_groups_openconfig_qos_elements__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_forwarding_groups(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_forwarding_groups_openconfig_qos_interfaces__qos_forwarding_groups, is_container='container', yang_name=\"forwarding-groups\", parent=self, path_helper=self._path_help...
[ "0.8893184", "0.8867901", "0.7306987", "0.7279585", "0.7266608", "0.6581181", "0.6581181", "0.6581181", "0.56551933", "0.56551933", "0.56551933", "0.5402458", "0.5402458", "0.5402458", "0.5392666", "0.5392666", "0.5392666", "0.52735394", "0.52620363", "0.52479607", "0.5132159...
0.8846292
2
Getter method for queues, mapped from YANG variable /qos/queues (container)
def _get_queues(self): return self.__queues
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_queues(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_queues_openconfig_qos__qos_queues, is_container='container', yang_name=\"queues\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, e...
[ "0.80745983", "0.8065076", "0.80447876", "0.76763904", "0.76681644", "0.7664364", "0.7644489", "0.7616736", "0.75973374", "0.7589225", "0.7551466", "0.7530266", "0.7217622", "0.69074273", "0.658867", "0.6579482", "0.65605575", "0.655604", "0.6458216", "0.64211005", "0.6416926...
0.70737964
18
Setter method for queues, mapped from YANG variable /qos/queues (container)
def _set_queues(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_queues_openconfig_qos_elements__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, exten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_queues(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_queues_openconfig_qos__qos_queues, is_container='container', yang_name=\"queues\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, e...
[ "0.8681636", "0.86719996", "0.826998", "0.82619363", "0.8216082", "0.82127535", "0.82070154", "0.8156252", "0.7336041", "0.7335773", "0.73331845", "0.7157979", "0.71298933", "0.71080035", "0.7093615", "0.7076387", "0.7053753", "0.6671283", "0.66192484", "0.6582378", "0.636305...
0.864584
2
Setter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)
def _set_scheduler_policies(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_scheduler_policies_openconfig_qos_elements__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmeth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_scheduler_policies(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_scheduler_policies_openconfig_qos__qos_scheduler_policies, is_container='container', yang_name=\"scheduler-policies\", parent=self, path_helper=self._path_helper, ext...
[ "0.8926566", "0.89252865", "0.73877436", "0.7386547", "0.73569876", "0.7185537", "0.71802753", "0.7170659", "0.70398194", "0.7016577", "0.7004015", "0.6992382", "0.6981583", "0.6977098", "0.69667166", "0.69649994", "0.6954683", "0.68812513", "0.6879317", "0.6867297", "0.67386...
0.8903654
2
Getter method for qos, mapped from YANG variable /qos (container)
def _get_qos(self): return self.__qos
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_qos(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_qos_openconfig_qos__qos, is_container='container', yang_name=\"qos\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, ...
[ "0.78158283", "0.77891886", "0.77046025", "0.7701868", "0.76531124", "0.74812955", "0.74131316", "0.73933446", "0.7326465", "0.700305", "0.698876", "0.67636573", "0.667485", "0.66518176", "0.6629469", "0.6381289", "0.63553095", "0.63394666", "0.6321783", "0.62935925", "0.6229...
0.7280473
11
Setter method for qos, mapped from YANG variable /qos (container)
def _set_qos(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=yc_qos_openconfig_qos_elements__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, name...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_qos(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_qos_openconfig_qos__qos, is_container='container', yang_name=\"qos\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, ...
[ "0.8609246", "0.85111344", "0.7597798", "0.7596655", "0.7364632", "0.734918", "0.73001933", "0.7288749", "0.7147441", "0.688754", "0.68543226", "0.6760626", "0.6681731", "0.6681731", "0.6681731", "0.6644931", "0.66224885", "0.65287834", "0.64852667", "0.64273447", "0.6204437"...
0.8545393
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) pred = pred.t() correct = pred.eq(target.view(1, -1).expand_as(pred)) res = [] for k in topk: c...
{ "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.7847017
87
Given a dictionary my_dict whose values are numbers, return the sums of the values in my_dict
def value_sum(my_dict): # Enter code here a = 0 for key in my_dict: a += my_dict[key] return a
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dict_sum(d):\n return sum(k*v for k, v in d.items())", "def sum_points(points_dict: dict) -> int:\n\n return sum([points for points in points_dict.values() if type(points) == int])", "def _sum_over_dicts(total_n_grams: Dict[int, Tensor], n_grams: Dict[int, Tensor]) ->Dict[int, Tensor]:\n for n in ...
[ "0.7784291", "0.7433062", "0.685477", "0.68170774", "0.680583", "0.67678684", "0.67300326", "0.66210335", "0.6578636", "0.650841", "0.6438248", "0.6424539", "0.6424153", "0.63794196", "0.6222952", "0.614205", "0.614205", "0.606515", "0.604229", "0.6024133", "0.600752", "0.5...
0.8361676
0
'Pops' off the next segment of PATH_INFO, returns the popped segment. Do NOT push it onto SCRIPT_NAME.
def _pop_path_info(self, req): path = req.path_info if not path: return None while path.startswith('/'): path = path[1:] idx = path.find('/') if idx == -1: idx = len(path) r = path[:idx] req.path_info = path[idx:] return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path_info(self):\r\n return urllib.unquote(self._environ.get('PATH_INFO', ''))", "def path_info(self):\n return urllib.unquote(self._environ.get('PATH_INFO', ''))", "def remove_trailing_slash(self, path_info):\n if len(path_info) > 1 and path_info[-1] == '/':\n return path_i...
[ "0.64052016", "0.63539183", "0.61269605", "0.60119283", "0.599985", "0.58956325", "0.5832812", "0.5771437", "0.57705855", "0.57386273", "0.5735876", "0.5684598", "0.5680894", "0.55890024", "0.55563253", "0.55428946", "0.5519192", "0.5517262", "0.550227", "0.5500655", "0.54894...
0.7012188
0
Loops through all potential interactions and adds to self.interactions if the pvalue of the interaction coefficient is less than alpha.
def fit(self, x_data, y_data, mp=True): self.x_data = x_data self.y_data = y_data self.y = self.y_data.values self.mat = self.x_data.values.T self.n = len(self.mat[0]) self.prange = range(0,len(self.x_data.columns)-1) self.int_list ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updatePotentials(self):\n epot = 0\n for atom in self.atoms:\n epot += atom.potential\n self.potentials.append(epot)", "def count_significant_interactions(self, alpha=None) -> NoReturn:\n p_value_threshold = alpha or self.pvalue\n\n self.counts_df = pd.DataFrame(...
[ "0.5303874", "0.5302289", "0.5150118", "0.49450082", "0.48942277", "0.48888928", "0.48814246", "0.48782048", "0.48601788", "0.48469433", "0.48458683", "0.48323193", "0.48299712", "0.4822962", "0.48026034", "0.48026034", "0.479572", "0.475816", "0.47565025", "0.4755063", "0.47...
0.0
-1
Returns a train/test split for the given dataset.
def split_dataset(X, Y, train_size=0.8): if train_size != 1.0: return train_test_split( X, Y, train_size=train_size, stratify=Y ) else: X_, Y_ = shuffle( X, Y ) return X_, [], Y_, []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train_test_split(dataset, split):\r\n train = list()\r\n train_size = split * len(dataset)\r\n dataset_copy = list(dataset) \r\n while len(train) < train_size:\r\n index = randrange(len(dataset_copy))\r\n train.append(dataset_copy.pop(index))\r\n return train, dataset_copy", "def...
[ "0.76195145", "0.747604", "0.7367058", "0.7206049", "0.7197919", "0.71887314", "0.7182318", "0.71538436", "0.7153448", "0.7146603", "0.7146603", "0.7143927", "0.7114665", "0.71015334", "0.7095715", "0.7082999", "0.70600045", "0.705575", "0.7051476", "0.70391065", "0.70265424"...
0.6875123
32
Retrieves the gml dataset.
def get_gml_graph_dataset(dataset_name, use_cached=True, graphs_folder=GRAPHS_FOLDER, graph_type='concept_map', cache_npy: str = None, suffix: str = ''): from utils import graph_helper if graphs_folder in dataset_name: dataset_name = dataset_name.replace(graphs_folder + '/', '') graph_folder = os....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_dataset(self) -> datasets.OpenMLDataset:\n return datasets.get_dataset(self.dataset_id)", "def get_data():\n if not hasattr(g, 'data'):\n g.data = load_data()\n return g.data", "def get_dataset(self):\n return datasets.get_dataset(self.dataset_id)", "def get_dataset(self):\...
[ "0.717922", "0.6751983", "0.65783614", "0.65215546", "0.64458203", "0.6296642", "0.6221854", "0.62203825", "0.6138077", "0.6058482", "0.59809226", "0.59548956", "0.59327173", "0.58954555", "0.5876657", "0.5872651", "0.5857859", "0.5851639", "0.5781474", "0.5777225", "0.577642...
0.64040965
5
Remove tags from a html string
def _strip_excerpt(self, raw_html): clean_regex = re.compile("<.*?>") clean_text = re.sub(clean_regex, "", raw_html) return html.unescape(clean_text).replace("\n", "")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_html_tags(self,text):\n #https://medium.com/@jorlugaqui/how-to-strip-html-tags-from-a-string-in-python-7cb81a2bbf44\n clean = re.compile('<.*?>')\n return re.sub(clean, '', text)", "def strip_tags_from_html(html):\n\n tag_re = re_compile(r'(<!--.*?-->|<[^>]*>)')\n return tag...
[ "0.8535489", "0.8448062", "0.84045154", "0.8347708", "0.8308591", "0.8284835", "0.8284835", "0.82511014", "0.82482076", "0.8241351", "0.8215726", "0.81696707", "0.81641525", "0.8160656", "0.8097449", "0.80949086", "0.80741894", "0.8023615", "0.7968585", "0.79298544", "0.79265...
0.0
-1
Return True if aList contains any duplicates. Its contents are not altered and completes in O(n) time with O(n) space required. The individual elements must be hashable.
def uniqueCheckSet(aList): check = set() for v in aList: if v in check: return True check.add(v) return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_duplicates(L):\r\n unique = []\r\n for e in L:\r\n if e in unique:\r\n return True\r\n unique.append(e)\r\n return False", "def check_if_duplicates_list(list_of_elems):\n set_of_elems = set()\n for elem in list_of_elems:\n if elem in set_of_elems:\n ...
[ "0.7715173", "0.7603541", "0.75636333", "0.7519768", "0.74895334", "0.73287755", "0.7240439", "0.7144935", "0.70379466", "0.7025068", "0.6968993", "0.6802065", "0.6714391", "0.6699152", "0.66677177", "0.6662786", "0.666178", "0.66014546", "0.6493283", "0.6473329", "0.6468342"...
0.74405646
5
Helper for checking that a single line is a comment. Will be replaced by a complete `find_comment_lines()` helper in 148. Could also use `tokens` from Flake8.
def line_is_comment(line: str) -> bool: # TODO use existing tokens try: first_token = next(tokenize.generate_tokens(io.StringIO(line).readline)) except tokenize.TokenError: # Assume that a token error happens because this is *not* a comment return False return first_token.type ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_comment_line(self):\n pattern = re.compile(r\"^(\\s)*(//)+\")\n return pattern.search(self._line)", "def _is_comment_or_blank(line):\n return re.sub(\"#.*\", \"\", line).rstrip() == \"\"", "def test_line(line):\r\n if not line.strip():\r\n return False # if the last line is ...
[ "0.7689475", "0.71644783", "0.689326", "0.68896234", "0.681889", "0.6804938", "0.66704214", "0.6634671", "0.64071965", "0.64071965", "0.6405662", "0.6352973", "0.63502693", "0.6296257", "0.6225783", "0.6225152", "0.61794573", "0.6168305", "0.6167924", "0.6163349", "0.60995764...
0.7943037
0
Given a list of strings, flatten them to '"X", "Y" or "Z"' format.
def flatten_list(items: List[str]) -> str: if len(items) == 1: return f'"{items[0]}"' try: last = items[-1] except IndexError: # Empty list raise ValueError('Empty list of values received') return ', '.join(f'"{item}"' for item in items[:-1]) + f' or "{last}"'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def str_transform_list(L):\n return [str(x) for x in L]", "def flatten_to_strings(listOfLists):\n result = []\n\n for i in listOfLists:\n # Only append if i is a basestring (superclass of string)\n if isinstance(i, basestring):\n result.append(i)\n # Otherwise call this f...
[ "0.6590471", "0.64766574", "0.63473684", "0.63124985", "0.61528033", "0.6101601", "0.605049", "0.6018018", "0.60144645", "0.59859216", "0.59632397", "0.59396946", "0.5936779", "0.5919289", "0.5873567", "0.5865811", "0.5860493", "0.5847764", "0.5846506", "0.5839805", "0.581842...
0.6485808
1
Send elements to target process. This function returns a dummy variable only holding the computational graph. If ``backward()`` is invoked by this dummy variable, it will try to receive gradients from the target process and send them back to the parent nodes.
def send(x, communicator, rank, tag=0): chainer.utils.experimental('chainermn.functions.send') if rank == communicator.rank: raise ValueError( 'rank must be different from communicator rank, ' 'otherwise deadlock occurs') xp = backend.get_array_module(*x) # Dummy varia...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self):\n self.value = np.dot(self.x_node.value, self.w_node.value) + self.b_node.value", "def backward(self):\n #initiate the gradients\n #print('')\n \n #print('node {} grad {}'.format(self.id, self.gradient))\n #print('node {} times visited : {}/{}'.format(...
[ "0.6395576", "0.6384252", "0.61261797", "0.6087886", "0.6067744", "0.602994", "0.58392113", "0.5807756", "0.5783908", "0.5783908", "0.57665557", "0.5763594", "0.575295", "0.574568", "0.5732101", "0.57271284", "0.57212156", "0.57173765", "0.57037777", "0.5700489", "0.56970274"...
0.0
-1
The main window of the program
def __init__(self, db, *args, **kwargs): # initialise db self.db = db # sets the frame and the pages tk.Frame.__init__(self, *args, **kwargs) self.p1 = TablePage(db, self) self.p2 = CamPage(self) self.p3 = DisplayPage(self) # sets a button frame at the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main(self):\n\n self.window.show_all()\n gtk.main()", "def get_main_window():\n\n pass", "def main() -> None:\n app = QApplication(sys.argv)\n win = MainWin()\n win.exit_action.triggered.connect(sys.exit)\n win.show()\n app.exec()", "def main():\n # Read Settings\n r...
[ "0.78624314", "0.77326876", "0.7716275", "0.7657374", "0.76462746", "0.7583447", "0.75718814", "0.75339633", "0.74800795", "0.74569654", "0.7446512", "0.7425677", "0.73532015", "0.7343967", "0.73180693", "0.7255231", "0.7254058", "0.7212931", "0.7206904", "0.7206551", "0.7196...
0.0
-1
Tests loading a query with a nested system entity
def test_load_nested(query_factory): text = "show me houses under {{600,000|sys_number} dollars|price}" processed_query = markup.load_query(text, query_factory) assert processed_query assert len(processed_query.entities) == 1 entity = processed_query.entities[0] assert entity.text == "600,000...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_load_nested_2(query_factory):\n text = \"show me houses under {${600,000|sys_number}|price}\"\n processed_query = markup.load_query(text, query_factory)\n assert processed_query\n assert len(processed_query.entities) == 1\n\n entity = processed_query.entities[0]\n assert entity.text == \...
[ "0.64174753", "0.6207494", "0.6102191", "0.6020554", "0.59707344", "0.58967036", "0.5892735", "0.5891619", "0.58769387", "0.5793142", "0.57849574", "0.56937766", "0.5662939", "0.5611519", "0.5603587", "0.55947906", "0.5564341", "0.5530206", "0.5500367", "0.5468014", "0.541906...
0.65018725
0
Tests loading a query with a nested system entity
def test_load_nested_2(query_factory): text = "show me houses under {${600,000|sys_number}|price}" processed_query = markup.load_query(text, query_factory) assert processed_query assert len(processed_query.entities) == 1 entity = processed_query.entities[0] assert entity.text == "$600,000" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_load_nested(query_factory):\n text = \"show me houses under {{600,000|sys_number} dollars|price}\"\n\n processed_query = markup.load_query(text, query_factory)\n\n assert processed_query\n assert len(processed_query.entities) == 1\n\n entity = processed_query.entities[0]\n assert entity....
[ "0.65040904", "0.620822", "0.61026746", "0.6023311", "0.5970642", "0.589841", "0.58936185", "0.58920145", "0.5879364", "0.5794893", "0.5787097", "0.56947935", "0.5663789", "0.56134623", "0.56061", "0.5594938", "0.5563675", "0.55328274", "0.55021393", "0.54698694", "0.5420051"...
0.6419645
1
Tests loading a query with a nested system entity
def test_load_nested_3(query_factory): text = "show me houses under {{1.5 million|sys_number} dollars|price}" processed_query = markup.load_query(text, query_factory) assert processed_query
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_load_nested(query_factory):\n text = \"show me houses under {{600,000|sys_number} dollars|price}\"\n\n processed_query = markup.load_query(text, query_factory)\n\n assert processed_query\n assert len(processed_query.entities) == 1\n\n entity = processed_query.entities[0]\n assert entity....
[ "0.6502349", "0.64181554", "0.62083685", "0.6101325", "0.60216004", "0.5971003", "0.5897324", "0.58940023", "0.5891405", "0.58759445", "0.57936954", "0.578522", "0.5694848", "0.5663573", "0.5613022", "0.5603011", "0.5594528", "0.55646247", "0.55308324", "0.5500612", "0.546762...
0.5403054
22
Tests bootstrap output for a query without entities
def test_bootstrap_query_no_entity(query_factory): query_text = "cancel the timer" query = query_factory.create_query(query_text) confidence = { "domains": {"times_and_dates": 0.95, "espionage": 0.05}, "intents": {"stop_timer": 0.9, "start_timer": 0.07, "cut_blue_wire": 0.03}, "entit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_query_1(self):\n with app.test_request_context():\n agency_none = db.session.query(\n Agency).filter_by(name=\"not here\").first()\n self.assertTrue(agency_none is None)", "def test_030_query_nothing(self):\n\n testflow.step(\"Querying for nothing\")\n ...
[ "0.6694098", "0.6574159", "0.6511202", "0.620657", "0.61994797", "0.6164516", "0.6136299", "0.6130935", "0.6130935", "0.61131424", "0.6108807", "0.61063397", "0.61010396", "0.6095861", "0.6091593", "0.6080903", "0.6066135", "0.6047089", "0.6026459", "0.60221076", "0.5990712",...
0.70461386
0
Sends a 401 response that enables basic auth
def authenticate(): return Response( 'Could not verify your access level for that URL.\n' 'You have to login with proper credentials', 401, {'WWW-Authenticate': 'Basic realm="Login Required"'})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def authenticate():\n return Response('Not Authorized', 401, {'WWW-Authenticate': 'Basic realm=\"api\"'})", "def authenticate():\n return Response(\n '', 401, {'WWW-Authenticate': 'Basic realm=\"Login Required\"'}\n )", "def authenticate():\n return Response(\n 'You have to login with pro...
[ "0.80936956", "0.809273", "0.795861", "0.78515965", "0.7842818", "0.78245074", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", "0.7810836", ...
0.7747721
29
Horizontal explode is the default way of 'exploding' the dataframe. It taes a dataframe, and a column that needs to be exploded. All list type elements in that column will be seperated into new columns of name ``{ original_column_name}_{n}``, where n is the position of the elment in the list. So the first element in a ...
def _horiz_explode(df_in, column, drop_original=True): # expands list of columns df = df_in.copy() # expand df.tags into its own dataframe tags = df[column].apply(pd.Series) tags = tags.rename(columns=lambda x: column + '_' + str(x)) df = pd.concat([df[:], tags[:]], axis=1) if drop_original...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_table_from_exploded_df(exploded_df: pd.DataFrame, row_heading_cols, column_heading_cols, dfs_dict=None,\n value_col: str = \"text\", concat_with: str = \" | \",\n convert_numeric_items=False, sort_headers=True) -> pd.DataFrame:\n for heading...
[ "0.6421381", "0.6350983", "0.6319281", "0.62903965", "0.62449867", "0.6166431", "0.590036", "0.577843", "0.5772426", "0.55767304", "0.5563734", "0.5346001", "0.527557", "0.51928127", "0.51681393", "0.516256", "0.50745654", "0.50520194", "0.50387055", "0.50219715", "0.49252802...
0.7355301
0
strips all empty elements from a list, returns the stripped list
def _strip_list(list): return [x for x in list if x]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_blanks_list(src):\n return [el for el in src if el]", "def soar_trimlist(org_list):\n if not isinstance(org_list, list):\n return org_list\n return [element.strip() for element in org_list]", "def striplist(l):\n return([x.strip() for x in l])", "def remove_empty_string(str_list...
[ "0.8065592", "0.8061761", "0.7973895", "0.7920449", "0.78574693", "0.7671852", "0.76564544", "0.760797", "0.7474997", "0.7282649", "0.7045742", "0.70345825", "0.70338935", "0.6912659", "0.6849621", "0.6799333", "0.6771862", "0.67686707", "0.674938", "0.671748", "0.6711312", ...
0.8454965
0
intakes the exploded format of the dataframe, and uses it to infer which set of rows or columns are supposed to be numeric, then returns them as a list
def _infer_numeric_rows_cols(exploded_df, row_names, col_names): list_of_numeric_labels = ["Number", "Percentage"] numeric_cells = _generate_is_numeric_table(exploded_df, row_names, col_names) cols = [] rows = [] axis = None # if rows are unnamed they very likely are not numeric if row_na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def numerical(df):\r\n numerical_var=df.select_dtypes(include =['float64','int64']).columns.tolist()\r\n return numerical_var", "def identify_numeric_columns(dataset):\n return identify_columns_by_type(dataset, include=['int64', 'float64'])", "def get_numeric(X):\n return X.dtypes[X.dtypes.apply(la...
[ "0.6659247", "0.6280714", "0.61748713", "0.61208445", "0.6091047", "0.6069483", "0.60515535", "0.6008911", "0.59956354", "0.5990312", "0.59839404", "0.59686834", "0.59648836", "0.59453905", "0.5894163", "0.58753645", "0.5762964", "0.57625735", "0.5758204", "0.5758204", "0.563...
0.6790725
0
converts a single value to a numeric type as specified, and removes all nonnumeric characters If this is not possible, a warning is printed to the commandline and pd.NA is returned instead
def _convert_val_to_numeric(val, cast_type=float, regex_exp='[^0-9.-()]'): multiplier = 1 try: stripped = regex.sub(regex_exp, '', val) if len(stripped) >= 2 and stripped[0] == '(' and stripped[-1] == ')': multiplier = multiplier*-1 ans = cast_type(stripped[1:-1]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_cast_non_numeric_false():\n assert _currency_column_to_numeric(\"10 dollars\", {\"foo\": 42}) == \"10\"", "def test_cast_non_numeric_true():\n assert _currency_column_to_numeric(\"foo\", {\"foo\": 42}) == 42", "def test_default_cleaning_style_with_remove(currency_df):\n result = currency_df.c...
[ "0.7305151", "0.70472896", "0.6820766", "0.6692302", "0.66839683", "0.66236705", "0.6567332", "0.65236825", "0.6496353", "0.64548796", "0.63894415", "0.63442403", "0.6344204", "0.63358986", "0.6287873", "0.6228311", "0.62124103", "0.6186431", "0.6186361", "0.6186049", "0.6183...
0.7125523
1
Parse a response from Watson Tables Understanding as a decoded JSON string. e.g. dictionary containing requested features and convert into a dict of Pandas DataFrames.
def parse_response(response: Dict[str, Any], select_table=None) -> Dict[str, pd.DataFrame]: return_dict = {} tables = response.get("tables", []) # if a tuple is used, of the form (feild, n) the nth table that meets the criterion is chosen if type(select_table) == tuple: select_no = select_table...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_api_response(api_response):\n\n df = pd.DataFrame(api_response)\n category_list = []\n\n for i in range(len(df)):\n cat_i = [cat[\"alias\"] for cat in df[\"categories\"][i]]\n category_list.append(\",\".join(cat_i))\n\n latitude = [coord.get(\"latitude\") for coord in df[\"coord...
[ "0.5945337", "0.5874362", "0.58650416", "0.58546305", "0.5820804", "0.58131266", "0.58131266", "0.5806143", "0.57362485", "0.57192147", "0.56440735", "0.56430405", "0.5636267", "0.554187", "0.5535443", "0.545207", "0.54516447", "0.5446419", "0.5430919", "0.5404498", "0.539716...
0.60912657
0
Creates lists of x and y values to plot the arrows Gets length of each barb then calculates the length of each side of the arrow. Gets angle of barb and applies angle to each side of the arrowhead. Next uses arrow_scale to scale the length of arrowhead and creates x and y values for arrowhead point1 and point2. Finally...
def get_quiver_arrows(self): dif_x = [i - j for i, j in zip(self.end_x, self.x)] dif_y = [i - j for i, j in zip(self.end_y, self.y)] # Get barb lengths(default arrow length = 30% barb length) barb_len = [None] * len(self.x) for index in range(len(barb_len)): barb_len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def arrows(points_from, points_to, color='k',\n width=None, width_ratio=0.002,\n label=None, label_kw={}, margin_ratio=None, **kw):\n # convert and valid check of the points\n points_from = asarray(points_from, float)\n points_to = asarray(points_to, float)\n num_points = len(points_from)...
[ "0.66298264", "0.6256334", "0.6222115", "0.6049434", "0.5974349", "0.58842266", "0.587861", "0.5831685", "0.5795105", "0.5752259", "0.56958914", "0.56357795", "0.55921084", "0.55675083", "0.5546669", "0.5539751", "0.5538288", "0.55347633", "0.552012", "0.54747397", "0.5442497...
0.7660053
0
Returns True if the user has the specified permission. This method queries all available auth backends, but returns immediately if any backend returns True. Thus, a user who has permission from a single auth backend is assumed to have permission in general. If an field is provided, permissions for this specific field a...
def has_field_perm(self, perm, obj=None, field=None): # Inactive users have no permissions. if not self.is_active: return False # Superusers have all permissions. if self.is_superuser: return True # Otherwise we need to check the backends. return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hasPermission(self, permission, extra_params):\n\n with DBSession(self.__config_db) as session:\n perm, params = ThriftAuthHandler.__create_permission_args(\n permission, extra_params, session)\n\n return require_permission(perm, params,\n ...
[ "0.7212156", "0.7073221", "0.70552754", "0.7010417", "0.6933426", "0.6933426", "0.67541254", "0.6719015", "0.670037", "0.6690324", "0.6667062", "0.6652313", "0.6620965", "0.6571123", "0.65192753", "0.6488", "0.64403254", "0.63780075", "0.6359744", "0.6359744", "0.6339575", ...
0.7750434
0
Residual block described in paper
def residual_block(layer_input, filters=512, down_filter=False, normalization=False): d1 = Conv2D(filters, kernel_size=3, strides=1, padding='same')(layer_input) if normalization: # d = InstanceNormalization()(d) d1 = BatchNormalization(momentum=0.8)(d1) # 6/6/2018: use it for CT # 6/5/2018: remove it for MNIST ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compute_residuals(self):\n residuls = self.I - self.E\n return residuls", "def calculateElementResidual(self):\n import pdb\n\n for ci in range(self.nc):\n self.elementResidual[ci].fill(0.0)\n #\n self.ellamDiscretization.updateElementResidual(self.elemen...
[ "0.73403513", "0.70729744", "0.70258856", "0.6888609", "0.6881643", "0.6876447", "0.6848792", "0.6832033", "0.6632405", "0.6605849", "0.6596731", "0.65065336", "0.6352373", "0.6349229", "0.6328059", "0.63197446", "0.6315485", "0.6313463", "0.627461", "0.6271773", "0.62511915"...
0.5544984
85
Who the email should be sent from
def define_sender(self, email="", name=""): if not email: return if not name: name = False self.from_who = _email.formataddr( (name, email) )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sender(self):\n key, alt = ('Sender', 'From') if not self.resent else \\\n ('Resent-Sender', 'Resent-From')\n value = self.get(key) or self.get(alt)\n _, addr = getaddresses([value])[0]\n return addr", "def whoami( self, mess, args):\n return mess.getFrom(...
[ "0.69983035", "0.6708111", "0.6697914", "0.6695961", "0.6694186", "0.66915125", "0.66870934", "0.66870934", "0.6641661", "0.65978396", "0.6566793", "0.6566793", "0.6566793", "0.6529045", "0.6517324", "0.6490078", "0.6490078", "0.6490078", "0.6490078", "0.64894295", "0.6489429...
0.72044593
0
Gets the name of this Body.
def name(self) -> str: return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._document['name']", "def name(self) -> str:\n return self.doc.get('name', self.identifier())", "def name(self):\n return self._get('name')", "def get_name(self):\n return self.attributes[\"name\"]", "def get_name(self):\n return self._name", ...
[ "0.7836375", "0.7827511", "0.7694644", "0.7670712", "0.76695246", "0.76695246", "0.76695246", "0.76695246", "0.76695246", "0.76695246", "0.76695246", "0.76695246", "0.76695246", "0.76695246", "0.76694083", "0.76694083", "0.7657646", "0.7657646", "0.76356065", "0.76149803", "0...
0.0
-1
Sets the name of this Body.
def name(self, name: str): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, _name):\n self.name = _name", "def set_name(self, name):\n self._name = name", "def set_name(self, name):\n\t\tself.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 ...
[ "0.80561954", "0.8043626", "0.8030343", "0.80200607", "0.80200607", "0.80200607", "0.80200607", "0.80200607", "0.79829276", "0.79829276", "0.7981063", "0.7957962", "0.7925091", "0.786814", "0.78637666", "0.78637666", "0.7854154", "0.7832567", "0.7832567", "0.7832567", "0.7832...
0.0
-1
Gets the gender of this Body.
def gender(self) -> str: return self._gender
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_gender(self):\n return self._gender", "def get_gender(self):\n return self._gender", "def gender(self):\n return self._gender", "def gender(self):\n return self._gender", "def gender(self):\r\n return self._gender", "def get_gender(self):\n if self.gender...
[ "0.85183203", "0.85183203", "0.84254444", "0.84254444", "0.8390769", "0.7965704", "0.79513323", "0.76709825", "0.7604141", "0.7341586", "0.715635", "0.7091869", "0.70333713", "0.68316984", "0.67614967", "0.6645014", "0.66070163", "0.64066", "0.6379841", "0.62978387", "0.60988...
0.81370085
5
Sets the gender of this Body.
def gender(self, gender: str): allowed_values = ["male", "female", "unknown"] # noqa: E501 if gender not in allowed_values: raise ValueError( "Invalid value for `gender` ({0}), must be one of {1}" .format(gender, allowed_values) ) self._g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gender(self, gender):\n\n self._gender = gender", "def gender(self, gender):\n\n self._gender = gender", "def gender(self, gender):\n\n self._gender = gender", "def gender(self, gender):\n\n self._gender = gender", "def set_gender(self, g, line_number=0):\n self.gende...
[ "0.8222285", "0.8222285", "0.8222285", "0.8222285", "0.76057", "0.73664063", "0.6928095", "0.67440075", "0.6707746", "0.6402692", "0.6402692", "0.63815856", "0.6368527", "0.62583774", "0.6209902", "0.6207871", "0.6143058", "0.61189747", "0.6115831", "0.6115831", "0.61156356",...
0.7197492
6
Test conversion from a matrix to a quaternion.
def test_from_matrix(self): self.assertTrue(np.all(rowan.from_matrix(np.eye(3)) == one)) with self.assertRaises(ValueError): self.assertTrue(np.allclose(rowan.from_matrix(2 * np.eye(3)))) mat = np.array([[0, 0, 1], [1, 0, 0], [0, 1, 0]]) self.assertTrue( np.log...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_conversions_matrix_quaternion():\n R = np.eye(3)\n a = pr.axis_angle_from_matrix(R)\n assert_array_almost_equal(a, np.array([1, 0, 0, 0]))\n\n random_state = np.random.RandomState(0)\n for _ in range(5):\n q = pr.random_quaternion(random_state)\n R = pr.matrix_from_quaternion(...
[ "0.78964937", "0.78877145", "0.77825785", "0.74441093", "0.72651273", "0.7189396", "0.6993262", "0.69614726", "0.6937874", "0.68769336", "0.6799199", "0.6756149", "0.6744714", "0.6719538", "0.67154753", "0.67129344", "0.6682666", "0.6663182", "0.66215944", "0.66189253", "0.66...
0.0
-1
Test conversion from a quaternion to a matrix and back.
def test_to_from_matrix(self): # The equality is only guaranteed up to a sign converted = rowan.from_matrix(rowan.to_matrix(input1)) self.assertTrue( np.all( np.logical_or( np.isclose(input1 - converted, 0), np.isclose(input1 + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_conversions_matrix_quaternion():\n R = np.eye(3)\n a = pr.axis_angle_from_matrix(R)\n assert_array_almost_equal(a, np.array([1, 0, 0, 0]))\n\n random_state = np.random.RandomState(0)\n for _ in range(5):\n q = pr.random_quaternion(random_state)\n R = pr.matrix_from_quaternion(...
[ "0.7828593", "0.7733911", "0.7590244", "0.71390253", "0.695906", "0.6865082", "0.67418075", "0.6738328", "0.673301", "0.66439384", "0.65712374", "0.6570318", "0.65448356", "0.65168405", "0.6513997", "0.6510189", "0.64859474", "0.6484574", "0.6484523", "0.6479391", "0.64476615...
0.6599848
10
Test that a quaternion and its converted matrix perform the same rotation.
def test_rotation(self): quat_rotated = rowan.rotate(input1, vector_inputs) matrices = rowan.to_matrix(input1) matrix_rotated = np.einsum("ijk,ki->ij", matrices, vector_inputs.T) self.assertTrue(np.allclose(matrix_rotated, quat_rotated))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_conversions_matrix_quaternion():\n R = np.eye(3)\n a = pr.axis_angle_from_matrix(R)\n assert_array_almost_equal(a, np.array([1, 0, 0, 0]))\n\n random_state = np.random.RandomState(0)\n for _ in range(5):\n q = pr.random_quaternion(random_state)\n R = pr.matrix_from_quaternion(...
[ "0.8484585", "0.8123581", "0.8037736", "0.7770566", "0.77420294", "0.764299", "0.7452545", "0.7426941", "0.7424559", "0.7342413", "0.7326059", "0.7299204", "0.7294435", "0.72919595", "0.72501254", "0.719812", "0.71965486", "0.7176226", "0.71517575", "0.7118665", "0.6938515", ...
0.7280222
14
Create config, and reset Flask app
def _create_config_and_reset_app(cls): cls.server_configuration = cls.create_configuration() utils.copy_resources(cls.server_configuration.file_server_root) server.reset_app(cls.server_configuration) cls._set_hash_mechanism_to_plaintext()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_app(config: dict) -> Flask:\n for key, value in config.items():\n app.config[key] = value\n db.init_app(app)\n ma.init_app(app)\n app.app_context().push()\n return app", "def create_app(self):\r\n self.app = Flask(__name__, instance_relative_config=True)\r\n\r\n # I...
[ "0.75590825", "0.7508713", "0.748772", "0.72944295", "0.72625035", "0.72500557", "0.72128105", "0.7173611", "0.7169499", "0.7145428", "0.71268964", "0.71006304", "0.7073018", "0.7031195", "0.7028012", "0.7014083", "0.69877124", "0.6976852", "0.69703704", "0.696927", "0.694595...
0.7899444
0
Hashing is the most time consuming task we perform during unittesets, so we will not encrypt user passwords during tests, as this should be tested elsewhere more in depth
def _set_hash_mechanism_to_plaintext(): security = server.app.extensions['security'] security.password_hash = 'plaintext' security.hashing_schemes = ['plaintext'] record = security.pwd_context._config._records[('plaintext', None)] security.pwd_context._config._records[(None, None...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hash_password(password):\n secret_key = current_app.config.get('SECRET_KEY')\n return sha256_crypt.encrypt(password+secret_key)", "def test_user_hash_with_salt(self):\n self.assertEqual(get_user_hash(\"johndoe\", salt=\"jane\").hex()[:6], \"fb0bf4\")", "def test_user_hash_without_salt(self):\n...
[ "0.7252892", "0.72383475", "0.7216125", "0.7115443", "0.7111759", "0.71003443", "0.7099605", "0.7065939", "0.70450705", "0.7030039", "0.7026425", "0.70252013", "0.69870085", "0.69845206", "0.69612575", "0.69543135", "0.69319475", "0.69272953", "0.6901587", "0.6889496", "0.688...
0.0
-1
Set up Flask app context, and handle DB related tasks
def _handle_flask_app_and_db(cls): cls._set_flask_app_context() cls.app = cls._get_app(server.app)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_app(app):\n app.teardown_appcontext(close_db)\n init_db()", "def init_app(app):\n app.teardown_appcontext(close_db)\n app.cli.add_command(init_db_command)", "def init_app(app):\n app.teardown_appcontext(close_db)\n app.cli.add_command(init_db_command)", "def init_app(app):\n app...
[ "0.7853245", "0.7584911", "0.7584911", "0.7584911", "0.7456693", "0.7456693", "0.7443681", "0.73877484", "0.73577726", "0.7292733", "0.7260691", "0.72222364", "0.71895194", "0.7162824", "0.71350414", "0.7131234", "0.7127256", "0.71075463", "0.7101007", "0.7083093", "0.7074253...
0.82375836
0
Helper function to check for valid filename.
def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_file_valid(name: str) -> bool:\n return not name.startswith(\".\")", "def _check_filename(self, filename):\n if len(os.path.dirname(filename)) != 0:\n raise ValueError(f\"Expecting file name but got path {filename}\")", "def verify_filename(filename):\n\n if is_fileobj(filename)...
[ "0.82734793", "0.82504916", "0.8237064", "0.8219195", "0.8183124", "0.8172627", "0.814799", "0.8133296", "0.80568457", "0.80073154", "0.7993846", "0.7955309", "0.78934234", "0.7860816", "0.7735925", "0.77242476", "0.76822877", "0.7654012", "0.76242024", "0.7575998", "0.756960...
0.71660715
42
Return Agent config loader.
def loader() -> ConfigLoader: return ConfigLoader.from_configuration_type(PackageType.AGENT)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_config(self) -> AgentConfig:\n agent_loader = self.loader()\n path = Path(DEFAULT_AEA_CONFIG_FILE)\n with path.open(mode=\"r\", encoding=\"utf-8\") as fp:\n agent_config = agent_loader.load(fp)\n return agent_config", "def load_config(self) -> AgentConfig:\n ...
[ "0.7789186", "0.76750416", "0.7203399", "0.66333944", "0.6520389", "0.64594156", "0.64592004", "0.6402473", "0.63390857", "0.62994236", "0.627919", "0.61811906", "0.6135862", "0.6096656", "0.60769004", "0.60437053", "0.60209733", "0.60027635", "0.59712595", "0.59507966", "0.5...
0.8579351
1
Test the agent configuration is updated.
def test_agent_config_updated(self): loader = ConfigLoader.from_configuration_type(PackageType.AGENT) with Path(self._get_cwd(), DEFAULT_AEA_CONFIG_FILE).open() as fp: agent_config = loader.load(fp) assert DefaultMessage.protocol_id in agent_config.protocols assert ERROR_SKIL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_config_change():\n clean_tables()\n config = set_configuration()\n assert config['age']['value'] == \"72\"\n assert config['retainUnsent']['value'] == \"False\" \n\n config = update_configuration(age=0, retain_unsent=True) \n assert config['age']['value'] == \"0\" \n assert config['re...
[ "0.7209072", "0.6992483", "0.6961175", "0.66688454", "0.6619531", "0.6618874", "0.65753937", "0.65387523", "0.6521512", "0.6515647", "0.64843065", "0.6470692", "0.6441869", "0.6433934", "0.64215523", "0.6352646", "0.63388705", "0.6322415", "0.63143575", "0.6309911", "0.629871...
0.7789157
0
Assert dependency is updated.
def assert_dependency_updated( self, item_type: ComponentType, package_name: str, package_type: str, expected: Set[PublicId], ): package_path = Path(self._get_cwd(), item_type.to_plural(), package_name) component_config = load_component_configuration(item_type...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_dependency(client, dependency, dependency_version):\n updated_dependency = {\n \"dependency_version_id\": dependency_version.id,\n }\n headers = {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n }\n response = client.open(\n ...
[ "0.71849555", "0.71222067", "0.69725037", "0.69725037", "0.69725037", "0.6769912", "0.6662659", "0.6662345", "0.6625875", "0.6604987", "0.6482471", "0.64602053", "0.64452416", "0.64137655", "0.63837355", "0.6367647", "0.6353667", "0.63379496", "0.632211", "0.63144815", "0.629...
0.7059707
2
Test default routing has been updated correctly.
def test_default_routing_updated_correctly(self): result = self.run_cli_command( "--skip-consistency-check", "config", "get", "agent.default_routing", cwd=self._get_cwd(), ) assert ( result.stdout == f'{{"{Defaul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_routing_updated(self):\n assert self.agent_config.default_routing == {\n self.new_protocol_id: self.new_connection_id\n }", "def test_patch_namespaced_route_status(self):\n pass", "def test_patch_namespaced_route(self):\n pass", "def test_api(self):\n ...
[ "0.81897014", "0.7263149", "0.7203789", "0.7200019", "0.7080318", "0.6919853", "0.68657523", "0.6806963", "0.67227316", "0.66406924", "0.64625436", "0.63000375", "0.62891644", "0.6271479", "0.6264239", "0.6247724", "0.6210134", "0.6190821", "0.6173336", "0.61360687", "0.61273...
0.7639861
1
Test default routing has been updated correctly.
def test_default_connection_updated_correctly(self): result = self.run_cli_command( "--skip-consistency-check", "config", "get", "agent.default_connection", cwd=self._get_cwd(), ) assert result.stdout == "fetchai/stub:0.21.3\n"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_routing_updated(self):\n assert self.agent_config.default_routing == {\n self.new_protocol_id: self.new_connection_id\n }", "def test_default_routing_updated_correctly(self):\n result = self.run_cli_command(\n \"--skip-consistency-check\",\n ...
[ "0.81890714", "0.7638458", "0.7263863", "0.720518", "0.72012657", "0.70811075", "0.69198436", "0.6867267", "0.68089545", "0.672111", "0.6639385", "0.6464569", "0.6297195", "0.6289742", "0.6273262", "0.6264605", "0.62484264", "0.62100905", "0.6190118", "0.6173831", "0.61358005...
0.0
-1
Test default routing has been updated correctly.
def test_custom_configuration_updated_correctly(self): result = self.run_cli_command( "--skip-consistency-check", "config", "get", "vendor.fetchai.skills.error.is_abstract", cwd=self._get_cwd(), ) assert result.stdout == "True\n"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_routing_updated(self):\n assert self.agent_config.default_routing == {\n self.new_protocol_id: self.new_connection_id\n }", "def test_default_routing_updated_correctly(self):\n result = self.run_cli_command(\n \"--skip-consistency-check\",\n ...
[ "0.8190189", "0.7639746", "0.7263448", "0.7204069", "0.7199107", "0.7080335", "0.69175017", "0.68657905", "0.68074775", "0.6721429", "0.6639315", "0.64623904", "0.62974125", "0.62883276", "0.6272261", "0.62633324", "0.62453103", "0.6207586", "0.61912435", "0.6171341", "0.6133...
0.0
-1
Mock 'get_latest_version_available_in_registry' when called with generic_seller public key.
def mock_get_latest_version_available_in_registry(cls, *args, **kwargs): if ( args[1] == str(cls.GENERIC_SELLER.package_type) and args[2] == cls.GENERIC_SELLER.public_id.to_latest() ): # return current version return cls.GENERIC_SELLER return cls.u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_mock(self):\n return mock.patch(\n \"aea.cli.upgrade.get_latest_version_available_in_registry\",\n side_effect=self.mock_get_latest_version_available_in_registry,\n )", "def mock_upgrade_package(\n mock_get_installed_version, mock_get_latest_version, monkeypatch\n)...
[ "0.7309545", "0.58763295", "0.5864447", "0.58395016", "0.58056015", "0.5698485", "0.56743044", "0.564939", "0.5587511", "0.5538209", "0.5528231", "0.5513699", "0.55113155", "0.5465772", "0.54465187", "0.54401696", "0.5427664", "0.54229385", "0.54144603", "0.5407348", "0.53688...
0.7941086
0