query stringlengths 9 3.4k | document stringlengths 9 87.4k | metadata dict | negatives listlengths 4 101 | negative_scores listlengths 4 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Getter method for hop, mapped from YANG variable /input/LocatorRecord/rloc/explicit_locator_path/hop (list) | def _get_hop(self):
return self.__hop | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_hop(self, v, load=False):\n try:\n t = YANGDynClass(v,base=YANGListType(\"hop_id\",yc_hop_pyangbind_example__input_LocatorRecord_rloc_explicit_locator_path_hop, yang_name=\"hop\", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper), is_container='list', yang_name=\"... | [
"0.73221225",
"0.52471185",
"0.4780281",
"0.45516896",
"0.44667086",
"0.44605684",
"0.44605684",
"0.44458053",
"0.44055128",
"0.43988982",
"0.4392534",
"0.43879238",
"0.43515754",
"0.43441716",
"0.43317163",
"0.43238428",
"0.4299891",
"0.426264",
"0.42440337",
"0.42294663",
"... | 0.4979916 | 2 |
Setter method for hop, mapped from YANG variable /input/LocatorRecord/rloc/explicit_locator_path/hop (list) | def _set_hop(self, v, load=False):
try:
t = YANGDynClass(v,base=YANGListType("hop_id",yc_hop_pyangbind_example__input_LocatorRecord_rloc_explicit_locator_path_hop, yang_name="hop", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper), is_container='list', yang_name="hop", parent... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_explicit_locator_path(self, v, load=False):\n try:\n t = YANGDynClass(v,base=yc_explicit_locator_path_pyangbind_example__input_LocatorRecord_rloc_explicit_locator_path, is_container='container', yang_name=\"explicit-locator-path\", parent=self, path_helper=self._path_helper, extmethods=self._extme... | [
"0.53979826",
"0.5190791",
"0.48206985",
"0.4552641",
"0.44636524",
"0.44104028",
"0.43401894",
"0.4337924",
"0.43294084",
"0.43070313",
"0.42820817",
"0.42820817",
"0.4262065",
"0.42046434",
"0.42014894",
"0.4173866",
"0.4170466",
"0.41347787",
"0.41344467",
"0.41000643",
"0... | 0.7980384 | 0 |
Getter method for address_type, mapped from YANG variable /input/LocatorRecord/rloc/address_type (string) | def _get_address_type(self):
return self.__address_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def address_type(self) -> str:\n return pulumi.get(self, \"address_type\")",
"def _set_address_type(self, v, load=False):\n try:\n t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name=\"address-type\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True... | [
"0.733212",
"0.6835204",
"0.6450108",
"0.633493",
"0.6064406",
"0.55583787",
"0.54384947",
"0.5180128",
"0.5110294",
"0.50746757",
"0.5072969",
"0.48838633",
"0.48105177",
"0.48083943",
"0.47836375",
"0.47796622",
"0.47796622",
"0.47796443",
"0.47665113",
"0.47665113",
"0.475... | 0.69393504 | 1 |
Setter method for address_type, mapped from YANG variable /input/LocatorRecord/rloc/address_type (string) | def _set_address_type(self, v, load=False):
try:
t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="address-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""address_type must be of a type c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def address_type(self, address_type):\n\n self._address_type = address_type",
"def address_type(self) -> str:\n return pulumi.get(self, \"address_type\")",
"def _get_address_type(self):\n return self.__address_type",
"def type_address(self, address):\n\n\t\twith allure.step(\"Type payee addr... | [
"0.7591355",
"0.6947403",
"0.631784",
"0.6311072",
"0.580061",
"0.55720127",
"0.5236602",
"0.520395",
"0.5185082",
"0.5172828",
"0.51605636",
"0.5091175",
"0.50769246",
"0.5018744",
"0.50039303",
"0.49844176",
"0.49844176",
"0.49465698",
"0.4937902",
"0.4934913",
"0.49161026"... | 0.79477996 | 0 |
Getter method for explicit_locator_path, mapped from YANG variable /input/LocatorRecord/rloc/explicit_locator_path (container) | def _get_explicit_locator_path(self):
return self.__explicit_locator_path | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_explicit_locator_path(self, v, load=False):\n try:\n t = YANGDynClass(v,base=yc_explicit_locator_path_pyangbind_example__input_LocatorRecord_rloc_explicit_locator_path, is_container='container', yang_name=\"explicit-locator-path\", parent=self, path_helper=self._path_helper, extmethods=self._extme... | [
"0.8274631",
"0.5152143",
"0.4848081",
"0.4848081",
"0.47201043",
"0.4715327",
"0.46240458",
"0.4464271",
"0.43966737",
"0.4369412",
"0.43402007",
"0.43370667",
"0.43309107",
"0.427388",
"0.4268046",
"0.426027",
"0.42431262",
"0.42356735",
"0.42356735",
"0.42356735",
"0.42356... | 0.7231172 | 1 |
Setter method for explicit_locator_path, mapped from YANG variable /input/LocatorRecord/rloc/explicit_locator_path (container) | def _set_explicit_locator_path(self, v, load=False):
try:
t = YANGDynClass(v,base=yc_explicit_locator_path_pyangbind_example__input_LocatorRecord_rloc_explicit_locator_path, is_container='container', yang_name="explicit-locator-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_explicit_locator_path(self):\n return self.__explicit_locator_path",
"def _set_localLocator(self, v, load=False):\n try:\n t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name=\"localLocator\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\... | [
"0.69107413",
"0.49755952",
"0.47283068",
"0.47283068",
"0.45995176",
"0.45432085",
"0.4512959",
"0.44011647",
"0.43912807",
"0.43638387",
"0.43551135",
"0.43550828",
"0.43502715",
"0.43456292",
"0.43268922",
"0.4310026",
"0.4305122",
"0.42458752",
"0.41864803",
"0.41821715",
... | 0.88693 | 0 |
Getter method for locator_id, mapped from YANG variable /input/LocatorRecord/locator_id (string) | def _get_locator_id(self):
return self.__locator_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_locator_id(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 try:\n t = YANGDynClass(v,base=unicode, ... | [
"0.7350876",
"0.60492724",
"0.55044645",
"0.5292573",
"0.5196207",
"0.5154262",
"0.5143212",
"0.510555",
"0.510013",
"0.5021925",
"0.49630928",
"0.49584314",
"0.49514553",
"0.48948523",
"0.4884165",
"0.4883817",
"0.48638391",
"0.48410615",
"0.48236477",
"0.48236477",
"0.48236... | 0.678453 | 1 |
Setter method for locator_id, mapped from YANG variable /input/LocatorRecord/locator_id (string) | def _set_locator_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")
try:
t = YANGDynClass(v,base=unicode, is_leaf=True, yang... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_LocatorRecord(self, v, load=False):\n try:\n t = YANGDynClass(v,base=YANGListType(\"locator_id\",yc_LocatorRecord_pyangbind_example__input_LocatorRecord, yang_name=\"LocatorRecord\", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper), is_container='list', yang_nam... | [
"0.63118845",
"0.6116834",
"0.541008",
"0.5226008",
"0.52146155",
"0.52146155",
"0.52146155",
"0.52146155",
"0.52146155",
"0.52146155",
"0.5208086",
"0.5208086",
"0.5208086",
"0.5208086",
"0.5208086",
"0.5208086",
"0.5152715",
"0.5113063",
"0.5104444",
"0.51016283",
"0.505076... | 0.8190384 | 0 |
Getter method for priority, mapped from YANG variable /input/LocatorRecord/priority (uint8) | def _get_priority(self):
return self.__priority | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def priority(self) -> int:\n return pulumi.get(self, \"priority\")",
"def priority(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"priority\")",
"def priority(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"priority\")",
"def priority(self) -> Optional... | [
"0.6578254",
"0.6507115",
"0.6507115",
"0.6507115",
"0.6507115",
"0.6473972",
"0.6473972",
"0.64581686",
"0.63653463",
"0.6361126",
"0.63331825",
"0.63331825",
"0.63331825",
"0.62042975",
"0.6176302",
"0.6176302",
"0.61258155",
"0.6124572",
"0.61231935",
"0.60862523",
"0.6068... | 0.64541703 | 11 |
Setter method for priority, mapped from YANG variable /input/LocatorRecord/priority (uint8) | def _set_priority(self, v, load=False):
try:
t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""priority must be of a type compatible w... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_priority(self, priority):\n self._priority = priority",
"def set_priority(self, priority):\n self.options[\"priority\"] = priority",
"def _set_lsp_config_frr_setup_priority(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,bas... | [
"0.6697263",
"0.661856",
"0.6600593",
"0.65722907",
"0.65712124",
"0.65397406",
"0.65397406",
"0.65397406",
"0.6527119",
"0.6515176",
"0.6515176",
"0.6515176",
"0.65130204",
"0.65130204",
"0.65130204",
"0.64481825",
"0.64481825",
"0.64481825",
"0.6142723",
"0.60599023",
"0.60... | 0.74554783 | 0 |
Getter method for weight, mapped from YANG variable /input/LocatorRecord/weight (uint8) | def _get_weight(self):
return self.__weight | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_weight(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name=\"weight\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"weight must be of a type comp... | [
"0.6755693",
"0.67394847",
"0.6637276",
"0.6507941",
"0.6507941",
"0.64790034",
"0.64714485",
"0.6462987",
"0.6430881",
"0.64253485",
"0.6390043",
"0.6390043",
"0.6390043",
"0.6360452",
"0.62894845",
"0.6286088",
"0.6286088",
"0.6221909",
"0.62105703",
"0.6202522",
"0.6136967... | 0.6419557 | 17 |
Setter method for weight, mapped from YANG variable /input/LocatorRecord/weight (uint8) | def _set_weight(self, v, load=False):
try:
t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""weight must be of a type compatible with ba... | {
"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.7173742",
"0.71261907",
"0.71261907",
"0.71261907",
"0.7124982",
"0.7124982",
"0.7124982",
"0.6930075",
"0.6854091",
"0.6854091",
"0.6854091",
"0.654635",
"0.65132165",
"0.6213096",
"0.60744756",
"0.60718274",
"0.606918",
"0.6024914",
"0.6020157",
"0.5972273",
"0.5965551",... | 0.774903 | 0 |
Getter method for multicastPriority, mapped from YANG variable /input/LocatorRecord/multicastPriority (uint8) | def _get_multicastPriority(self):
return self.__multicastPriority | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_multicastPriority(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name=\"multicastPriority\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"multica... | [
"0.74490094",
"0.5090839",
"0.50058645",
"0.489588",
"0.4887395",
"0.47485903",
"0.4735448",
"0.46581355",
"0.46484846",
"0.46484846",
"0.4638555",
"0.4638555",
"0.4638555",
"0.4638555",
"0.46264255",
"0.46264255",
"0.4592114",
"0.45748588",
"0.45698082",
"0.45512205",
"0.455... | 0.7061607 | 1 |
Setter method for multicastPriority, mapped from YANG variable /input/LocatorRecord/multicastPriority (uint8) | def _set_multicastPriority(self, v, load=False):
try:
t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name="multicastPriority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""multicastPriority mus... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_multicastPriority(self):\n return self.__multicastPriority",
"def _set_multicastWeight(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name=\"multicastWeight\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n ... | [
"0.66138566",
"0.58428895",
"0.53215593",
"0.49812725",
"0.49296415",
"0.4885944",
"0.4885944",
"0.4885944",
"0.48854005",
"0.48854005",
"0.48854005",
"0.48235166",
"0.47812468",
"0.47345918",
"0.4722102",
"0.4720543",
"0.47152364",
"0.4700948",
"0.46751964",
"0.46575275",
"0... | 0.84143496 | 0 |
Getter method for multicastWeight, mapped from YANG variable /input/LocatorRecord/multicastWeight (uint8) | def _get_multicastWeight(self):
return self.__multicastWeight | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_multicastWeight(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name=\"multicastWeight\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"multicastWe... | [
"0.7588154",
"0.5257662",
"0.5250413",
"0.5210578",
"0.5175591",
"0.5127283",
"0.5110381",
"0.50396127",
"0.50396127",
"0.50396127",
"0.5034055",
"0.5034055",
"0.5034055",
"0.5029845",
"0.5006056",
"0.4981525",
"0.49774846",
"0.49774846",
"0.49386257",
"0.49386257",
"0.493862... | 0.70765233 | 1 |
Setter method for multicastWeight, mapped from YANG variable /input/LocatorRecord/multicastWeight (uint8) | def _set_multicastWeight(self, v, load=False):
try:
t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name="multicastWeight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""multicastWeight must be o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_multicastWeight(self):\n return self.__multicastWeight",
"def _set_weight(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name=\"weight\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ... | [
"0.6678886",
"0.5881262",
"0.5806964",
"0.5806964",
"0.5806964",
"0.58052194",
"0.58052194",
"0.58052194",
"0.5402897",
"0.5298001",
"0.5271714",
"0.5237159",
"0.5237159",
"0.5237159",
"0.5186103",
"0.51658547",
"0.4932866",
"0.49096778",
"0.48995125",
"0.48133203",
"0.481126... | 0.84586775 | 0 |
Getter method for localLocator, mapped from YANG variable /input/LocatorRecord/localLocator (boolean) | def _get_localLocator(self):
return self.__localLocator | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_localLocator(self, v, load=False):\n try:\n t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name=\"localLocator\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"localLocator must... | [
"0.77122736",
"0.61343336",
"0.61343336",
"0.594526",
"0.58300143",
"0.5516242",
"0.5371214",
"0.535761",
"0.5356122",
"0.5291819",
"0.52905875",
"0.5190979",
"0.50963354",
"0.50106007",
"0.50024956",
"0.4956631",
"0.49452806",
"0.49452806",
"0.49452806",
"0.49452806",
"0.492... | 0.67667943 | 1 |
Setter method for localLocator, mapped from YANG variable /input/LocatorRecord/localLocator (boolean) | def _set_localLocator(self, v, load=False):
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="localLocator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""localLocator must be of a type ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_localLocator(self):\n return self.__localLocator",
"def local(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"local\")",
"def local(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"local\")",
"def local(self) -> pulumi.Output[Optional[bool]]:\n ... | [
"0.6287664",
"0.5828949",
"0.5828949",
"0.55667734",
"0.5547197",
"0.553913",
"0.54638076",
"0.52337706",
"0.52014136",
"0.51928854",
"0.51270527",
"0.51270527",
"0.51270527",
"0.51270527",
"0.50773776",
"0.5034757",
"0.5028427",
"0.5021666",
"0.50191003",
"0.49850848",
"0.49... | 0.8276338 | 0 |
Getter method for rlocProbed, mapped from YANG variable /input/LocatorRecord/rlocProbed (boolean) | def _get_rlocProbed(self):
return self.__rlocProbed | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_rlocProbed(self, v, load=False):\n try:\n t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name=\"rlocProbed\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"rlocProbed must be of... | [
"0.73260176",
"0.46317473",
"0.46158537",
"0.45694757",
"0.45441782",
"0.45398918",
"0.45247114",
"0.45137352",
"0.44872126",
"0.44861192",
"0.4473698",
"0.44509727",
"0.44429824",
"0.44327995",
"0.4392198",
"0.4387672",
"0.4379323",
"0.43745342",
"0.43587065",
"0.43559256",
... | 0.7142277 | 1 |
Setter method for rlocProbed, mapped from YANG variable /input/LocatorRecord/rlocProbed (boolean) | def _set_rlocProbed(self, v, load=False):
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="rlocProbed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""rlocProbed must be of a type compat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_rlocProbed(self):\n return self.__rlocProbed",
"def _set_rloc(self, v, load=False):\n try:\n t = YANGDynClass(v,base=yc_rloc_pyangbind_example__input_LocatorRecord_rloc, is_container='container', yang_name=\"rloc\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, regi... | [
"0.65422535",
"0.4735449",
"0.45066586",
"0.45007536",
"0.44398454",
"0.4437598",
"0.44301248",
"0.43837652",
"0.43508556",
"0.43508556",
"0.4340041",
"0.4306401",
"0.42857504",
"0.428212",
"0.42812702",
"0.42800307",
"0.42746672",
"0.42536786",
"0.42527962",
"0.42236567",
"0... | 0.8125802 | 0 |
Getter method for routed, mapped from YANG variable /input/LocatorRecord/routed (boolean) | def _get_routed(self):
return self.__routed | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_route_throu(self):\n\n # VPR stores route-through LUTs as \"open\" blocks with mode set to\n # \"wire\".\n return self.is_leaf and self.name == \"open\" and self.mode == \"wire\"",
"def can_location_be_routed_to(location: CommonLocation) -> bool:\n return CommonLocationUtils.ca... | [
"0.57929003",
"0.57313263",
"0.56877166",
"0.5655214",
"0.5447337",
"0.54195905",
"0.54025376",
"0.54025376",
"0.54015297",
"0.5378665",
"0.5280592",
"0.5280592",
"0.52611727",
"0.5238895",
"0.5148455",
"0.50744885",
"0.50203764",
"0.5011416",
"0.49734855",
"0.49599394",
"0.4... | 0.5745694 | 1 |
Setter method for routed, mapped from YANG variable /input/LocatorRecord/routed (boolean) | def _set_routed(self, v, load=False):
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="routed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""routed must be of a type compatible with ba... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def routed_to(self, routed_to):\n\n self._routed_to = routed_to",
"def can_location_be_routed_to(location: CommonLocation) -> bool:\n return CommonLocationUtils.can_position_be_routed_to(location.transform.translation, location.routing_surface)",
"def use_routes(self) -> Optional[pulumi.Input[boo... | [
"0.6153026",
"0.5552645",
"0.5525019",
"0.53847706",
"0.5309402",
"0.52833045",
"0.5196852",
"0.5075154",
"0.50694686",
"0.50254524",
"0.49547634",
"0.4937431",
"0.49291715",
"0.49152592",
"0.49117863",
"0.48675567",
"0.48675567",
"0.48473886",
"0.48398617",
"0.48210603",
"0.... | 0.6550641 | 0 |
Getter method for rloc, mapped from YANG variable /input/LocatorRecord/rloc (container) | def _get_rloc(self):
return self.__rloc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_rloc(self, v, load=False):\n try:\n t = YANGDynClass(v,base=yc_rloc_pyangbind_example__input_LocatorRecord_rloc, is_container='container', yang_name=\"rloc\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n r... | [
"0.7430711",
"0.5485765",
"0.5229584",
"0.5177095",
"0.5112131",
"0.5112131",
"0.5078246",
"0.49354967",
"0.48200157",
"0.48152867",
"0.47953466",
"0.4789419",
"0.47867963",
"0.47811654",
"0.47619376",
"0.4741405",
"0.4719583",
"0.4718814",
"0.4703106",
"0.46604514",
"0.46533... | 0.7014321 | 1 |
Setter method for rloc, mapped from YANG variable /input/LocatorRecord/rloc (container) | def _set_rloc(self, v, load=False):
try:
t = YANGDynClass(v,base=yc_rloc_pyangbind_example__input_LocatorRecord_rloc, is_container='container', yang_name="rloc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_rloc(self):\n return self.__rloc",
"def setRLC(self, r, l, c):\n return",
"def RCL(self, loc):\n cmd = f\"*RCL {loc}\"\n self.instr.write(cmd)",
"def set_loc(self, loc):\n self.loc = loc",
"def _set_rlocProbed(self, v, load=False):\n try:\n t = YANGDynCla... | [
"0.64157027",
"0.54850066",
"0.5443288",
"0.51483464",
"0.50199974",
"0.5014761",
"0.48082906",
"0.47812858",
"0.47574958",
"0.4746225",
"0.4733928",
"0.471587",
"0.468939",
"0.46738097",
"0.46594927",
"0.4655104",
"0.46222645",
"0.45074654",
"0.44889754",
"0.44816402",
"0.44... | 0.8643157 | 0 |
Getter method for recordTtl, mapped from YANG variable /input/mapping_record/recordTtl (int32) | def _get_recordTtl(self):
return self.__recordTtl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_recordTtl(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.int32, is_leaf=True, yang_name=\"recordTtl\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"recordTtl must be of a ... | [
"0.7424597",
"0.5785556",
"0.5482547",
"0.5277504",
"0.5277504",
"0.5223717",
"0.51692307",
"0.51057476",
"0.5098125",
"0.5057996",
"0.50471157",
"0.49814385",
"0.49490383",
"0.4941643",
"0.4941643",
"0.4941643",
"0.48078465",
"0.47643143",
"0.4747422",
"0.47402343",
"0.47402... | 0.7055444 | 1 |
Setter method for recordTtl, mapped from YANG variable /input/mapping_record/recordTtl (int32) | def _set_recordTtl(self, v, load=False):
try:
t = YANGDynClass(v,base=np.int32, is_leaf=True, yang_name="recordTtl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""recordTtl must be of a type compatibl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_recordTtl(self):\n return self.__recordTtl",
"def ttl_seconds(self, ttl_seconds: \"int\"):\n self._attrs[\"ttlSeconds\"] = ttl_seconds",
"def record_duration(self):\n return self.config.get('record_duration', 5)",
"def ttl_seconds(self) -> \"int\":\n return self._attrs.get(\"... | [
"0.6537405",
"0.5423284",
"0.53877944",
"0.5307785",
"0.5183947",
"0.50947696",
"0.50947696",
"0.48951116",
"0.48640734",
"0.4802925",
"0.48009953",
"0.47961047",
"0.4780839",
"0.4754166",
"0.46808767",
"0.46808767",
"0.46310925",
"0.46241784",
"0.46237284",
"0.46001944",
"0.... | 0.8461138 | 0 |
Getter method for maskLength, mapped from YANG variable /input/mapping_record/maskLength (uint8) | def _get_maskLength(self):
return self.__maskLength | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_maskLength(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name=\"maskLength\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"maskLength must be of... | [
"0.7444396",
"0.6525655",
"0.59941226",
"0.5959563",
"0.59322095",
"0.58424264",
"0.57360834",
"0.5563699",
"0.54108727",
"0.53078985",
"0.5169768",
"0.51070464",
"0.5102177",
"0.5080575",
"0.5043805",
"0.50004286",
"0.49808195",
"0.4906646",
"0.4898116",
"0.4898116",
"0.4898... | 0.71786106 | 1 |
Setter method for maskLength, mapped from YANG variable /input/mapping_record/maskLength (uint8) | def _set_maskLength(self, v, load=False):
try:
t = YANGDynClass(v,base=np.uint8, is_leaf=True, yang_name="maskLength", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""maskLength must be of a type compat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_maskLength(self):\n return self.__maskLength",
"def mask_size(self):\n m = self.size * self.mask()\n return m.astype(np.int8)",
"def fieldsToLengthBits(thisPacket):\n for field in thisPacket.iter('field'):\n if fieldLooksLikeBitmask(field):\n reMatch = bitmaskRE.match(field.a... | [
"0.6653406",
"0.6379773",
"0.58128196",
"0.55888116",
"0.53854203",
"0.53751683",
"0.5288363",
"0.5091646",
"0.50880945",
"0.4921406",
"0.4910974",
"0.48586044",
"0.48586044",
"0.47661933",
"0.4757868",
"0.47240102",
"0.47114295",
"0.47114295",
"0.47114295",
"0.47114295",
"0.... | 0.8388851 | 0 |
Getter method for mapVersion, mapped from YANG variable /input/mapping_record/mapVersion (int16) | def _get_mapVersion(self):
return self.__mapVersion | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_mapVersion(self, v, load=False):\n try:\n t = YANGDynClass(v,base=np.int16, is_leaf=True, yang_name=\"mapVersion\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"mapVersion must be of... | [
"0.74593055",
"0.55581903",
"0.5232696",
"0.5110775",
"0.5033999",
"0.50145763",
"0.49021116",
"0.4732159",
"0.4721976",
"0.4653788",
"0.46497813",
"0.4641943",
"0.46388727",
"0.46224704",
"0.4616354",
"0.46102205",
"0.46023163",
"0.46010247",
"0.4586401",
"0.45821977",
"0.45... | 0.63023394 | 1 |
Setter method for mapVersion, mapped from YANG variable /input/mapping_record/mapVersion (int16) | def _set_mapVersion(self, v, load=False):
try:
t = YANGDynClass(v,base=np.int16, is_leaf=True, yang_name="mapVersion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""mapVersion must be of a type compat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_mapVersion(self):\n return self.__mapVersion",
"def SetVersion(self, addonVersion):\n self._addonVersion = addonVersion",
"def version(self, version):\n self._version = utils.VersionParser().parse(version)",
"def convert(self):\n return _libsbml.SBMLLevelVersionConverter_convert(... | [
"0.5692604",
"0.5344507",
"0.49350342",
"0.49146506",
"0.48997697",
"0.48858517",
"0.48856238",
"0.48540726",
"0.48540726",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
"0.47561356",
... | 0.83946174 | 0 |
Getter method for action, mapped from YANG variable /input/mapping_record/action (enumeration) | def _get_action(self):
return self.__action | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_action(self, v, load=False):\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type=\"dict_key\", restriction_arg={u'Drop': {}, u'NativelyForward': {}, u'SendMapRequest': {}, u'NoAction': {}},... | [
"0.6726955",
"0.66544145",
"0.6651963",
"0.6489662",
"0.64806074",
"0.6460034",
"0.64220244",
"0.63789093",
"0.63123024",
"0.63082045",
"0.63082045",
"0.63082045",
"0.63082045",
"0.63082045",
"0.63082045",
"0.6260747",
"0.6260747",
"0.6260747",
"0.6216058",
"0.6177274",
"0.61... | 0.62875503 | 15 |
Setter method for action, mapped from YANG variable /input/mapping_record/action (enumeration) | def _set_action(self, v, load=False):
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'Drop': {}, u'NativelyForward': {}, u'SendMapRequest': {}, u'NoAction': {}},), is_lea... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def action(self, action):\n if action is None:\n raise ValueError(\"Invalid value for `action`, must not be `None`\") # noqa: E501\n\n self._action = action",
"def set_action(self, action):\n self.action = action",
"def set_action(self, action):\n self.action = action",
... | [
"0.7073768",
"0.6777562",
"0.6777562",
"0.6746833",
"0.67244196",
"0.66816896",
"0.66607445",
"0.6581482",
"0.6524658",
"0.65044004",
"0.640012",
"0.6387688",
"0.6387688",
"0.6387688",
"0.6387688",
"0.6387688",
"0.6387688",
"0.6386035",
"0.62811095",
"0.6280877",
"0.6124923",... | 0.7640915 | 0 |
Getter method for authoritative, mapped from YANG variable /input/mapping_record/authoritative (boolean) | def _get_authoritative(self):
return self.__authoritative | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_authoritative(self, v, load=False):\n try:\n t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name=\"authoritative\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeError, ValueError):\n raise ValueError(\"\"\"authoritative m... | [
"0.6718088",
"0.5188267",
"0.48823407",
"0.4824742",
"0.48030117",
"0.4789381",
"0.46382806",
"0.44682306",
"0.4430279",
"0.44179815",
"0.43863338",
"0.4384197",
"0.4380008",
"0.4363615",
"0.4360782",
"0.43460184",
"0.43358245",
"0.43231368",
"0.43094635",
"0.43013746",
"0.42... | 0.6757098 | 0 |
Setter method for authoritative, mapped from YANG variable /input/mapping_record/authoritative (boolean) | def _set_authoritative(self, v, load=False):
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="authoritative", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""authoritative must be of a ty... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_authoritative(self):\n return self.__authoritative",
"def is_authorised_representative(self):\n if not hasattr(self, '_is_authorised_representative'):\n self._is_authorised_representative = hasattr(self, 'authorised_representative')\n\n return self._is_authorised_representati... | [
"0.6427643",
"0.49042958",
"0.48028368",
"0.46999156",
"0.4692326",
"0.46825922",
"0.45674053",
"0.44718954",
"0.44571823",
"0.44474322",
"0.4403648",
"0.43995556",
"0.4394256",
"0.4390693",
"0.43134287",
"0.43096423",
"0.43039706",
"0.4281209",
"0.42597413",
"0.42550257",
"0... | 0.75602883 | 0 |
Getter method for LocatorRecord, mapped from YANG variable /input/LocatorRecord (list) | def _get_LocatorRecord(self):
return self.__LocatorRecord | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_LocatorRecord(self, v, load=False):\n try:\n t = YANGDynClass(v,base=YANGListType(\"locator_id\",yc_LocatorRecord_pyangbind_example__input_LocatorRecord, yang_name=\"LocatorRecord\", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper), is_container='list', yang_nam... | [
"0.7702962",
"0.6407192",
"0.5898516",
"0.55848175",
"0.48844913",
"0.4773935",
"0.46494174",
"0.45777026",
"0.45454535",
"0.45231923",
"0.45080623",
"0.44717428",
"0.44609767",
"0.44564545",
"0.44507366",
"0.44452652",
"0.4416199",
"0.44136074",
"0.43898392",
"0.4389652",
"0... | 0.6818552 | 1 |
Setter method for LocatorRecord, mapped from YANG variable /input/LocatorRecord (list) | def _set_LocatorRecord(self, v, load=False):
try:
t = YANGDynClass(v,base=YANGListType("locator_id",yc_LocatorRecord_pyangbind_example__input_LocatorRecord, yang_name="LocatorRecord", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper), is_container='list', yang_name="LocatorR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def record_locator(self, record_locator):\n if record_locator is None:\n raise ValueError(\"Invalid value for `record_locator`, must not be `None`\")\n\n self._record_locator = record_locator",
"def _get_LocatorRecord(self):\n return self.__LocatorRecord",
"def _set_locator_id(self,... | [
"0.685963",
"0.63189214",
"0.567086",
"0.56593966",
"0.5313092",
"0.5301535",
"0.4916309",
"0.47038326",
"0.47023335",
"0.47008383",
"0.46737063",
"0.46672797",
"0.46672797",
"0.45666236",
"0.45338166",
"0.45061657",
"0.45037052",
"0.4468762",
"0.44054282",
"0.4387563",
"0.43... | 0.86509675 | 0 |
Getter method for mapping_record, mapped from YANG variable /input/mapping_record (container) | def _get_mapping_record(self):
return self.__mapping_record | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_mapping_record(self, v, load=False):\n try:\n t = YANGDynClass(v,base=yc_mapping_record_pyangbind_example__input_mapping_record, is_container='container', yang_name=\"mapping-record\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)\n except (TypeEr... | [
"0.71528155",
"0.6570029",
"0.49631503",
"0.48740909",
"0.48525885",
"0.4783413",
"0.47829446",
"0.47790676",
"0.47216207",
"0.4719149",
"0.4693326",
"0.46838725",
"0.46826375",
"0.46717525",
"0.4661885",
"0.46412706",
"0.46412706",
"0.46040523",
"0.45518145",
"0.45385614",
"... | 0.65431213 | 2 |
Setter method for mapping_record, mapped from YANG variable /input/mapping_record (container) | def _set_mapping_record(self, v, load=False):
try:
t = YANGDynClass(v,base=yc_mapping_record_pyangbind_example__input_mapping_record, is_container='container', yang_name="mapping-record", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, Value... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_map_record(self):\n return self.mapper.map_record(self.binding_record)",
"def _get_mapping_record(self):\n return self.__mapping_record",
"def mapping(self, mapping):\n self.set_mapping(mapping)",
"def set_mapping(self, mapping):\n mapping = pylastica.doc_type.Mapping.create(... | [
"0.5970671",
"0.5902689",
"0.5657304",
"0.55116606",
"0.5374943",
"0.5234628",
"0.50860834",
"0.50424844",
"0.50336903",
"0.50079304",
"0.50042784",
"0.4991072",
"0.49719772",
"0.4959843",
"0.49564373",
"0.4931594",
"0.49017704",
"0.48650196",
"0.4817201",
"0.481521",
"0.4772... | 0.8538443 | 0 |
Getter method for input, mapped from YANG variable /input (container) | def _get_input(self):
return self.__input | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def input(self):\n return self[\"input\"]",
"def input(self):\n return self[\"input\"]",
"def input(self):\n return self._input",
"def input(self):\n return self._input",
"def input(self):\n return self._input",
"def _set_input(self, v, load=False):\n try:\n t =... | [
"0.740578",
"0.740578",
"0.7094822",
"0.7094822",
"0.7094822",
"0.6959574",
"0.6904806",
"0.6879383",
"0.68741226",
"0.6849014",
"0.6844996",
"0.67251843",
"0.67035246",
"0.66768324",
"0.65990466",
"0.6559263",
"0.6546222",
"0.65145284",
"0.6509285",
"0.6413056",
"0.6378717",... | 0.71080166 | 8 |
Setter method for input, mapped from YANG variable /input (container) | def _set_input(self, v, load=False):
try:
t = YANGDynClass(v,base=yc_input_pyangbind_example__input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True)
except (TypeError, ValueError):
raise ValueError("""input mu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_input(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_input_openconfig_qos__qos_interfaces_interface_input, is_container='container', yang_name=\"input\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, regis... | [
"0.7814106",
"0.780715",
"0.780715",
"0.777229",
"0.7730762",
"0.7484346",
"0.71174186",
"0.68705064",
"0.677871",
"0.6680047",
"0.6550577",
"0.6451878",
"0.64363635",
"0.64027745",
"0.6382179",
"0.6357305",
"0.63393605",
"0.63311434",
"0.6296951",
"0.6284459",
"0.6236926",
... | 0.7847966 | 0 |
reset a finite sequence back to position 0 | def reset(self):
fields = vars(self)
for name, field in fields.items():
if isinstance(field, Pattern):
# print "reset: %s" % name
field.reset() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reset(self):\n self.test = 0\n self.pos = 0",
"def reset(self):\n self.test = 0\n self.pos = 0",
"def test_reset(self):\n self.p.C[0][0] = np.inf\n self.step()",
"def reset(self):\r\n\t\tself.index = 0",
"def reset_state(self):\n self.s = np.copy(self.s_... | [
"0.6987733",
"0.6987733",
"0.6978529",
"0.69737685",
"0.6948884",
"0.69404835",
"0.6911065",
"0.6876279",
"0.6846744",
"0.68259317",
"0.6825785",
"0.679674",
"0.67797256",
"0.6772002",
"0.67653245",
"0.67649394",
"0.67248136",
"0.6721646",
"0.6695807",
"0.6659343",
"0.6655571... | 0.0 | -1 |
create a new object based on this genotype | def fromgenotype(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def new_object(self):\r\n\t\tpass",
"def new(self, obj):\n pass",
"def create_individual(self):\n pass",
"def new_object(cls):\n return cls.for_value([])",
"def __init__(self, *args):\n this = _libsbml.new_SpeciesType(*args)\n try: self.this.append(this)\n except: ... | [
"0.728881",
"0.6973893",
"0.6677975",
"0.64741004",
"0.6446734",
"0.6379876",
"0.6334149",
"0.62880665",
"0.6268098",
"0.6260632",
"0.624735",
"0.6235976",
"0.62314445",
"0.6190096",
"0.61697304",
"0.61627156",
"0.61618036",
"0.6153238",
"0.6152914",
"0.61267525",
"0.61266625... | 0.71769667 | 1 |
return a string representation of this pattern, suitable for breeding | def genotype(self):
genotype = ""
fields = vars(self)
for name, field in fields.items():
if isinstance(field, Pattern):
genotype += field.genotype()
else:
genotype += str(field)
genotype += "\0"
return genotype | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _patternAsString(self, thePattern):\n display = ''\n for i in range(self._lengthOfPattern):\n display += self._colorOptions[thePattern.getPegColor(i)]\n return display",
"def __str__(self):\n return '{}¥{}¥{}¥{}'.format(self.id, self.pattern_type, self.experimental_scenario_id, self.patt... | [
"0.7327472",
"0.72351664",
"0.7075111",
"0.70339113",
"0.7027271",
"0.7019748",
"0.70123875",
"0.6931614",
"0.69105256",
"0.68442464",
"0.68435144",
"0.6831233",
"0.6825524",
"0.6825373",
"0.68093336",
"0.6798348",
"0.6790486",
"0.6786028",
"0.6783735",
"0.6779544",
"0.675466... | 0.0 | -1 |
Gets the ParaMeshBodies object from a component. | def getFromComponent(self, component):
return ParaMeshBodies() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nativeObject(self):\n return ParaMeshBody()",
"def item(self, index):\n return ParaMeshBody()",
"def item(self, index):\n return ParaMeshBody()",
"def createForAssemblyContext(self, occurrence):\n return ParaMeshBody()",
"def getMesh(self):\n return self.mesh",
"def... | [
"0.6462085",
"0.6373467",
"0.6373467",
"0.59029144",
"0.54926586",
"0.5220117",
"0.5198538",
"0.50059587",
"0.50059587",
"0.50059587",
"0.50059587",
"0.4859322",
"0.48247197",
"0.47570008",
"0.45531186",
"0.45432347",
"0.44658598",
"0.44331133",
"0.4367574",
"0.43619215",
"0.... | 0.90093076 | 0 |
Creates a new mesh body by importing an .stl or .obj file. Because of a current limitation, if you want to create a mesh body in a parametric model, you must first call the edit method of the base or form feature, use this method to create the mesh body, and then call the finishEdit method of the base or form feature. ... | def add(self, fullFilename, units, baseOrFormFeature):
return ParaMeshBodyList() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_mesh(self):\n print(\"create_mesh\")\n faces = self.get_faces()\n print(\"num faces: {}\".format(len(faces)))\n\n # TODO: perform face filtering to remove long edges in Z direction\n # filtered_faces = self.get_filtered_faces(faces)\n # print(\"num filtered face... | [
"0.5972571",
"0.59495294",
"0.5882489",
"0.5880396",
"0.58730125",
"0.5865938",
"0.56890905",
"0.56812716",
"0.5676533",
"0.56725544",
"0.5665458",
"0.5633514",
"0.56177545",
"0.56158864",
"0.5609427",
"0.5551452",
"0.5526342",
"0.5510303",
"0.5461769",
"0.54555094",
"0.54292... | 0.63767177 | 0 |
Provides access to a mesh body within the collection. | def item(self, index):
return ParaMeshBody() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nativeObject(self):\n return ParaMeshBody()",
"def get_mesh(self):\n return self.mesh",
"def getMesh(self):\n return self.mesh",
"def mesh(self):\n return self._mesh",
"def mesh(self):\n return self._mesh",
"def mesh(self):\n return self._mesh",
"def mesh(s... | [
"0.6957442",
"0.6633259",
"0.6631735",
"0.6371821",
"0.6371821",
"0.6371821",
"0.6371821",
"0.63649315",
"0.62939316",
"0.5899391",
"0.57027155",
"0.5660068",
"0.56338304",
"0.55298495",
"0.5479331",
"0.547045",
"0.5432832",
"0.5420212",
"0.54182005",
"0.53654414",
"0.5365441... | 0.752903 | 0 |
Returns the number of mesh bodies in the collection. | def count(self):
return int() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def numnems(self):\n count = 0\n for o in self._objs.values():\n count += len(o.netifs())\n return count",
"def n_rays(self):\n try: \n return self._n_rays\n except AttributeError:\n self._n_rays = 0\n for r in self.rays(): self._n_ra... | [
"0.6592899",
"0.6562196",
"0.6492465",
"0.6490426",
"0.6490426",
"0.63891214",
"0.6374162",
"0.6371211",
"0.6367845",
"0.6366196",
"0.6363674",
"0.63497156",
"0.63456136",
"0.6343821",
"0.6334106",
"0.6313597",
"0.6312238",
"0.6303904",
"0.6288599",
"0.62479997",
"0.62390107"... | 0.0 | -1 |
Reduces the number of triangles on a mesh. | def reduce(self, inputProportions, maxDeviation, triangleBudget, remeshType, reduceType):
return bool() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _uniform_refine_triangles(mesh):\n\n # get current cells and edges\n cells = mesh.cells\n edges = mesh.edges\n\n assert np.size(cells, axis=1) == 3\n\n # get number of current nodes\n n_nodes = np.size(mesh.nodes, axis=0)\n \n # first we create additional nodes as midpoints of the curre... | [
"0.6571754",
"0.62510157",
"0.6021851",
"0.5736714",
"0.5707728",
"0.56179523",
"0.5597383",
"0.5594991",
"0.55734795",
"0.55310386",
"0.5524291",
"0.55023897",
"0.5497856",
"0.5495947",
"0.54838336",
"0.54805076",
"0.5456282",
"0.5443932",
"0.5422648",
"0.5416763",
"0.540110... | 0.0 | -1 |
Creates or returns a proxy for the native object i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Fails if this object is not the NativeObject. | def createForAssemblyContext(self, occurrence):
return ParaMeshBody() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, native, conn=None, object_path=None, bus_name=None):\n super(ObjectWrapper, self).__init__(conn, object_path, bus_name)\n with self._native_id_map_lock:\n self._native_id_to_wrapper_map[id(native)] = self\n self._native = native",
"def init_native():\n return... | [
"0.5905607",
"0.5693172",
"0.54426616",
"0.53674",
"0.53674",
"0.5366804",
"0.53642464",
"0.5291969",
"0.5291969",
"0.5271465",
"0.5200989",
"0.51959115",
"0.51884115",
"0.51699597",
"0.51033413",
"0.5085035",
"0.50808275",
"0.5044601",
"0.50370556",
"0.5000812",
"0.49749088"... | 0.4650937 | 53 |
Gets and sets the name of the mesh body as displayed in the browser. | def name(self):
return str() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self):\n return self.mesh.name",
"def name(self):\n return self.mesh.name",
"def name(self):\n return self._scene_name",
"def get_scene_name(self):\n return self._document.GetDocumentName()",
"def name(self):\r\n return self.component.get(\"Name\", \"\")",
"def nam... | [
"0.7586636",
"0.7586636",
"0.61862105",
"0.611901",
"0.6037799",
"0.6037799",
"0.570511",
"0.5682237",
"0.5663676",
"0.5663676",
"0.5663676",
"0.5635279",
"0.56116736",
"0.56084555",
"0.56052715",
"0.558528",
"0.55814725",
"0.5563571",
"0.5561706",
"0.55576056",
"0.55543464",... | 0.0 | -1 |
Gets and sets the name of the mesh body as displayed in the browser. | def name(self, name):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self):\n return self.mesh.name",
"def name(self):\n return self.mesh.name",
"def name(self):\n return self._scene_name",
"def get_scene_name(self):\n return self._document.GetDocumentName()",
"def name(self):\r\n return self.component.get(\"Name\", \"\")",
"def nam... | [
"0.7586636",
"0.7586636",
"0.61862105",
"0.611901",
"0.6037799",
"0.6037799",
"0.570511",
"0.5682237",
"0.5663676",
"0.5663676",
"0.5663676",
"0.5635279",
"0.56116736",
"0.56084555",
"0.56052715",
"0.558528",
"0.55814725",
"0.5563571",
"0.5561706",
"0.55576056",
"0.55543464",... | 0.0 | -1 |
Returns the parent Component. | def parentComponent(self):
return fusion.Component() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_parent(self):\n return self._find_by_locator().parent",
"def get_parent(self):\n return self.__parent",
"def get_parent(self):\n return self.__parent",
"def get_parent(self):\n return self.parent",
"def get_parent(self):\n return self.parent",
"def get_parent(se... | [
"0.8493198",
"0.8421001",
"0.8421001",
"0.84084857",
"0.84084857",
"0.84084857",
"0.838501",
"0.8367333",
"0.8352728",
"0.83304477",
"0.82310194",
"0.81645995",
"0.81499857",
"0.8140345",
"0.81360763",
"0.81360763",
"0.81360763",
"0.81360763",
"0.81360763",
"0.81360763",
"0.8... | 0.8622309 | 0 |
Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object. | def assemblyContext(self):
return fusion.Occurrence() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def assembly(self):\n return self._assembly",
"def _getReflectiveDuplicateAssembly(self, neighborLoc):\n duplicates = []\n otherTwoLocations = self.spatialGrid.getSymmetricEquivalents(neighborLoc)\n for i, j in otherTwoLocations:\n neighborLocation2 = self.spatialGrid[i, j,... | [
"0.540894",
"0.51332605",
"0.50047857",
"0.49513108",
"0.48807183",
"0.48727012",
"0.48692793",
"0.4843391",
"0.4826178",
"0.47773117",
"0.46998453",
"0.46970183",
"0.46879742",
"0.46757603",
"0.46634528",
"0.4658668",
"0.46533868",
"0.46437517",
"0.46167672",
"0.46072188",
"... | 0.5453074 | 0 |
The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object. | def nativeObject(self):
return ParaMeshBody() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_current_object(self):\n if not hasattr(self.__local, '__release_local__'):\n return self.__local()\n try:\n return getattr(self.__local, self.__name__)\n except AttributeError:\n raise RuntimeError('no object bound to %s' % self.__name__)",
"def _get... | [
"0.54153144",
"0.54153144",
"0.53899294",
"0.52610415",
"0.52530104",
"0.5164691",
"0.5119779",
"0.5101481",
"0.5047954",
"0.50460637",
"0.50460637",
"0.50460637",
"0.5009915",
"0.49685264",
"0.49538663",
"0.49503237",
"0.4922814",
"0.4911784",
"0.48714194",
"0.48690018",
"0.... | 0.49642462 | 14 |
Provides access to a mesh body within the collection. | def item(self, index):
return ParaMeshBody() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nativeObject(self):\n return ParaMeshBody()",
"def get_mesh(self):\n return self.mesh",
"def getMesh(self):\n return self.mesh",
"def mesh(self):\n return self._mesh",
"def mesh(self):\n return self._mesh",
"def mesh(self):\n return self._mesh",
"def mesh(s... | [
"0.6957442",
"0.6633259",
"0.6631735",
"0.6371821",
"0.6371821",
"0.6371821",
"0.6371821",
"0.63649315",
"0.62939316",
"0.5899391",
"0.57027155",
"0.5660068",
"0.56338304",
"0.55298495",
"0.5479331",
"0.547045",
"0.5432832",
"0.5420212",
"0.54182005",
"0.53654414",
"0.5365441... | 0.752903 | 1 |
Returns the number of mesh bodies in the collection. | def count(self):
return int() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def numnems(self):\n count = 0\n for o in self._objs.values():\n count += len(o.netifs())\n return count",
"def n_rays(self):\n try: \n return self._n_rays\n except AttributeError:\n self._n_rays = 0\n for r in self.rays(): self._n_ra... | [
"0.6592899",
"0.6562196",
"0.6492465",
"0.6490426",
"0.6490426",
"0.63891214",
"0.6374162",
"0.6371211",
"0.6367845",
"0.6366196",
"0.6363674",
"0.63497156",
"0.63456136",
"0.6343821",
"0.6334106",
"0.6313597",
"0.6312238",
"0.6303904",
"0.6288599",
"0.62479997",
"0.62390107"... | 0.0 | -1 |
Create object session from the app key, secret and type | def create_session(self):
try:
self.session = session.DropboxSession(APP_KEY, APP_SECRET, ACCESS_TYPE)
except Exception, e:
logger.error('Exception at create_session')
logger.debug('*' + sys.exc_info()[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _createSessionObject(self, request):\n # Preload necessary data items\n user = endpoints.get_current_user()\n if not user:\n raise endpoints.UnauthorizedException('Authorization required')\n user_id = user.email()\n # Get the conference entity\n conf = _getE... | [
"0.6261222",
"0.6257226",
"0.6163003",
"0.6113781",
"0.6092789",
"0.6075058",
"0.59492284",
"0.58802646",
"0.58801895",
"0.5873072",
"0.58676744",
"0.58611274",
"0.5855583",
"0.585542",
"0.58453065",
"0.58350897",
"0.58148146",
"0.57952935",
"0.5793354",
"0.5761899",
"0.57494... | 0.6547813 | 0 |
Obtains an authorization url; After authorization, creates an access token and builds an instance of the Dropbox client. Creates the metadata cache. | def create_access_token(self):
# Wraper for also caching invalid results
#def getMetadataRofs(path):
# try:
# return self.client.metadata(path)
# except Exception, e:
# log.write('Exception at getMetadataRofs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_client(config, auth_token = None):\n if auth_token:\n pass\n\n elif not auth_token and config.get(\"auth_token\"):\n auth_token = config.get(\"auth_token\")\n\n elif not auth_token and not config.get(\"auth_token\"):\n auth_token, config = start_auth_flow(config)\n\n __lo... | [
"0.6216887",
"0.60293674",
"0.5986677",
"0.58676577",
"0.58599424",
"0.58420867",
"0.58145756",
"0.5771057",
"0.56834906",
"0.5679991",
"0.5664196",
"0.5645943",
"0.56381226",
"0.56176925",
"0.5562125",
"0.55257547",
"0.55207974",
"0.5509377",
"0.55081314",
"0.5507393",
"0.54... | 0.73717004 | 0 |
Returns the name of the generated temp file | def getFile(self, path):
try:
logger.info('getFile(%s)' % (path))
# Check if file is in cache
if self.cache_files.has_key(path):
logger.info('* Retrieving tmpfile name from the cache')
return self.cache_files[path]['tmpfile']
else:
logger.info('* Needs to download the file')
# Generate t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_temp_file_name():\n tmpfile = tempfile.NamedTemporaryFile(prefix=\"TESS_\")\n h, t = ntpath.split(tmpfile.name)\n return t or ntpath.basename(h)",
"def generate_temp_filename(self):\n prefix = self.generate_filename_prefix()\n now = datetime.now()\n # Ok that might not be t... | [
"0.82129097",
"0.8096047",
"0.80427927",
"0.80158895",
"0.7935635",
"0.79206693",
"0.78526604",
"0.7773518",
"0.77492666",
"0.74737537",
"0.73816663",
"0.7295245",
"0.7284259",
"0.7275927",
"0.7270338",
"0.7225438",
"0.7215907",
"0.7187269",
"0.7140327",
"0.7045268",
"0.70170... | 0.0 | -1 |
Downloads the file given by path and writes using the file descriptor out | def downloadFile(self, path, out):
try:
logger.info("downloadFile('%s', ...)" % (path))
# Downloads from dropbox
# Manually :( update the metadata cache
f, metadata = self.client.get_file_and_metadata(path)
f = f.read()
logger.info('* file downloaded')
self.cache_metadata.setNewValue(path, metad... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def download_file(self, url, path):\n print('\\tDownloading: ', path)\n with open(path, 'w') as outfile:\n try:\n response = self._http_client.get(url)\n outfile.write(response.text)\n finally:\n response.close()\n outf... | [
"0.73627925",
"0.6694261",
"0.65461224",
"0.65308464",
"0.65222704",
"0.65146464",
"0.6499754",
"0.6463992",
"0.6460364",
"0.64219147",
"0.64182365",
"0.6414628",
"0.6405327",
"0.6385253",
"0.63750607",
"0.63738686",
"0.63608336",
"0.63561326",
"0.6352939",
"0.63480806",
"0.6... | 0.7041003 | 1 |
Allow func(X, y) to be called as func(df, col_name). | def _parse_df_y(df, y):
if isinstance(df, pd.DataFrame) and isinstance(y, str):
df, y = df, df[y]
return df, y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _apply_as_series_or_frame(self, func: Callable[[Column], Column]) -> FrameLike:\n pass",
"def _apply_as_series_or_frame(self, func: Callable[[Column], Column]) -> FrameLike:\n pass",
"def my_shared_func(df,my_param):\n# df_result = df.something\n return df_result",
"def wrap_in_func(... | [
"0.66748714",
"0.66748714",
"0.6211787",
"0.6205698",
"0.6190309",
"0.6126378",
"0.61161506",
"0.60860187",
"0.60309535",
"0.60290617",
"0.59593344",
"0.59453",
"0.5929404",
"0.5777755",
"0.5733886",
"0.5717688",
"0.56668365",
"0.5639282",
"0.5625869",
"0.55265206",
"0.544694... | 0.5099455 | 49 |
Iterate over groups of `df`, and, if provided, matching labels. | def _iter_groups(self, df, y=None):
groups = df.groupby(self.groupby).indices
for key, sub_idx in groups.items():
sub_df = df.iloc[sub_idx]
if y is not None:
# y is either a numpy array or a pd.Series so index accordingly
sub_y = y.iloc[sub_idx] if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _iter_objs_labels(objs):\n # Account for (1) multiple columns of data, (2) functions that return\n # multiple values (e.g. hist() returns (bins, values, patches)), and\n # (3) matplotlib.Collection list subclasses.\n label = _get_label(objs)\n if label:\n yield (objs, label)\n elif isi... | [
"0.5890573",
"0.5568137",
"0.55283284",
"0.5486085",
"0.5446619",
"0.5348538",
"0.5325845",
"0.53036046",
"0.52931404",
"0.52764827",
"0.52207327",
"0.51904327",
"0.51854444",
"0.5157948",
"0.51359797",
"0.5110827",
"0.5092669",
"0.5082624",
"0.50786346",
"0.50476575",
"0.503... | 0.66742736 | 0 |
json encode the message and prepend the topic | def themify(topic,msg):
return topic + ' ' + json.dumps(msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mogrify(topic, msg):\n return topic + ' ' + json.dumps(msg)",
"def _send(self, topic, message):\n\n body = {'message': encode(message)}\n result = requests.post('{0}/topics/{1}'.format(self.apiUrl, topic), json=body)\n return result.json()",
"def publish(self, topic, msg):\n ... | [
"0.79083043",
"0.671766",
"0.6527758",
"0.64427924",
"0.6238984",
"0.6164169",
"0.6155834",
"0.6121196",
"0.6061571",
"0.59668523",
"0.5952764",
"0.5930898",
"0.5930898",
"0.5927398",
"0.591593",
"0.59124506",
"0.58600277",
"0.58495414",
"0.5837054",
"0.58189356",
"0.57878685... | 0.8218022 | 1 |
check if specified connector has rights to send actions on the behaf of a user check app id of connector | def filter_action(action):
return True
if not action.get('app_id'):
return None
if not action.get('user_id'):
return None
return action | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def perms_check(self, ctx):\r\n\t\tcommand = ctx.invoked_with\r\n\t\ttry:\r\n\t\t\tif config.cfg[\"main\"][\"perms\"][command] in [x.id for x in ctx.author.roles]:\r\n\t\t\t\treturn True\r\n\t\t\treturn False\r\n\t\texcept KeyError:\r\n\t\t\tif config.cfg[\"main\"][\"perms\"][\"global\"] in [x.id for x in ctx.auth... | [
"0.6390886",
"0.6304083",
"0.6201954",
"0.6170566",
"0.6170566",
"0.61660624",
"0.61114115",
"0.61065286",
"0.6018534",
"0.59394467",
"0.59245306",
"0.5878345",
"0.58244205",
"0.579467",
"0.5784786",
"0.57636875",
"0.575882",
"0.57171506",
"0.57171506",
"0.57171506",
"0.57155... | 0.5338038 | 89 |
standardizes the data to have zero mean and unit variance. | def standardize_data(X_train, X_test):
scaler = StandardScaler()
scaler.fit(X_train)
X_train = scaler.transform(X_train)
# apply same transformation to test data
X_test = scaler.transform(X_test)
return X_train, X_test | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def standardize(data):\n stddev = data.std()\n #if stddev == 0.:\n # sys.exit(\"data.std() == 0. !\")\n if stddev != 0.:\n data = (data - data.mean()) / (data.std())\n\n return data",
"def standardize(data):\r\n mean = data.mean(axis=0)\r\n std = data.std(axis=0)\r\n return (da... | [
"0.8369295",
"0.80917937",
"0.7926823",
"0.7876768",
"0.7635009",
"0.7605924",
"0.758358",
"0.75455606",
"0.74441236",
"0.7389172",
"0.73364043",
"0.73222905",
"0.73099726",
"0.7302933",
"0.7249535",
"0.72407126",
"0.72349095",
"0.7220804",
"0.72096926",
"0.7187791",
"0.71877... | 0.64454937 | 52 |
Configures the data mask for all the tests to use | def setUp(self):
self.frequency = 250
self.firmware = 30474
self.mask = lmdm.ListModeDataMask(self.frequency, self.firmware) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configure_masking(self, masks):\n self.masks = masks",
"def add_mask(self):\n return xr.open_dataset(f'/{test.dlfile_directory}/{test.climate}_mask_{test.mask_str}_dldata_traintest.nc')",
"def set_measurement_mask(self, program_name, mask_name, begins, lengths) -> Tuple[numpy.ndarray, numpy.n... | [
"0.6948431",
"0.63371396",
"0.6295163",
"0.6233425",
"0.6196445",
"0.6133515",
"0.61135805",
"0.6018383",
"0.597028",
"0.59426963",
"0.58654726",
"0.58444166",
"0.5812224",
"0.58024824",
"0.57432425",
"0.572335",
"0.56799185",
"0.5603782",
"0.56006145",
"0.5596226",
"0.559622... | 0.6293316 | 3 |
Tests that we can decode the first word of the header properly | def test_decode_word_zero(self):
self.assertEqual({
'channel': 13,
'slot': 2,
'crate': 0,
'header_length': 4,
'event_length': 4,
'finish_code': 0
}, decoder.decode_word_zero(td.header(self.frequency, self.firmware)[0], self.mask)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_parse_header(self):\n data = parse_header(self.header)\n self.assertEqual(data.get(\"application\"), \"my Grandma\")\n self.assertEqual(data.get(\"version\"), \"has\")\n self.assertEqual(data.get(\"reference\"), \"furry\")\n self.assertEqual(data.get(\"query_letters\"), ... | [
"0.7116298",
"0.7082112",
"0.6929032",
"0.68151975",
"0.68128604",
"0.67787254",
"0.67539996",
"0.66921365",
"0.66434336",
"0.66018856",
"0.6523167",
"0.64306104",
"0.6410873",
"0.64067334",
"0.6405578",
"0.64014935",
"0.6391744",
"0.6333045",
"0.63021696",
"0.6287637",
"0.62... | 0.62592584 | 22 |
Checks that we can decode the third word of the header properly | def test_decode_word_two(self):
self.assertEqual({
'event_time_high': 26001,
'cfd_fractional_time': 0,
'cfd_trigger_source_bit': 0,
'cfd_forced_trigger_bit': 0
}, decoder.decode_word_two(td.header(self.frequency, self.firmware)[2], self.mask)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_decode_word_three(self):\n self.assertEqual({\n 'energy': 2345,\n 'trace_length': 0,\n 'trace_out_of_range': 0\n }, decoder.decode_word_three(td.header(self.frequency, self.firmware)[3], self.mask))",
"def test_process_optional_header_data_bad_header_length... | [
"0.6903838",
"0.6795577",
"0.67356795",
"0.6441551",
"0.6389359",
"0.63468635",
"0.63352734",
"0.6238719",
"0.6222386",
"0.6129416",
"0.6109788",
"0.6080237",
"0.6057729",
"0.60016173",
"0.59383166",
"0.5921286",
"0.58907634",
"0.58900464",
"0.5884161",
"0.5856037",
"0.579498... | 0.55986345 | 43 |
Test that we can decode the final word of the header properly | def test_decode_word_three(self):
self.assertEqual({
'energy': 2345,
'trace_length': 0,
'trace_out_of_range': 0
}, decoder.decode_word_three(td.header(self.frequency, self.firmware)[3], self.mask)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_write_sff_header(self):\r\n expected = \"\"\"Common Header:\r\n Magic Number:\\t0x2E736666\r\n Version:\\t0001\r\n Index Offset:\\t7773224\r\n Index Length:\\t93365\r\n # of Reads:\\t114\r\n Header Length:\\t440\r\n Key Length:\\t4\r\n # of Flows:\\t400\r\n Flowgram Code:\\t1\r\n Flow Cha... | [
"0.6869701",
"0.6637792",
"0.65229696",
"0.6516518",
"0.6506407",
"0.6499319",
"0.6489265",
"0.6474025",
"0.6432144",
"0.6428928",
"0.63755524",
"0.6359791",
"0.63581705",
"0.6338773",
"0.6312633",
"0.6261712",
"0.62172437",
"0.61879426",
"0.61584157",
"0.6153292",
"0.6079896... | 0.6225903 | 16 |
Test that we can decode the energy sums. These can be tricky b/c the baseline is encoded in IEEE 754 format. | def test_decode_energy_sums(self):
self.assertEqual(td.esums(decoded=True),
decoder.decode_energy_sums(BytesIO(td.esums(True)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_internal_energy(self):\n buff_score = self.pdb[0].get_internal_energy(ff=self.ff)\n self.assertAlmostEqual(buff_score.total_energy, -3722.49, places=2)",
"def test_energy():\n # Test something\n \n from nose.tools import assert_equal\n assert_equal(energy([0.0,0.0],1.0), 0)\n assert_e... | [
"0.6065364",
"0.59546584",
"0.58342063",
"0.5746904",
"0.57446885",
"0.5736451",
"0.5714147",
"0.57141185",
"0.56794614",
"0.565437",
"0.5632818",
"0.5597184",
"0.55819803",
"0.5568268",
"0.5568061",
"0.5558533",
"0.55471855",
"0.55132204",
"0.55014616",
"0.55003136",
"0.5491... | 0.8079843 | 0 |
Tests that we can decode external timestamps appropriately. | def test_decode_external_timestamp(self):
self.assertEqual(td.external_timestamp(), decoder.decode_external_timestamp(
BytesIO(td.external_timestamp(True)), self.mask)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def test_process_timestamp() -> None:\n datetime_with_tzinfo = datetime(2016, 7, 9, 11, 0, 0, tzinfo=dt_util.UTC)\n datetime_without_tzinfo = datetime(2016, 7, 9, 11, 0, 0)\n est = dt_util.get_time_zone(\"US/Eastern\")\n datetime_est_timezone = datetime(2016, 7, 9, 11, 0, 0, tzinfo=est)\n nst ... | [
"0.6826415",
"0.678895",
"0.6769374",
"0.67243725",
"0.6696744",
"0.6450985",
"0.6423673",
"0.6392706",
"0.63700205",
"0.63413143",
"0.6326594",
"0.629541",
"0.62936324",
"0.62907755",
"0.62751067",
"0.62236845",
"0.6223447",
"0.6193005",
"0.61763287",
"0.6139348",
"0.6137388... | 0.87496525 | 0 |
Tests that we can decode the QDC header into an array. | def test_decode_qdc(self):
self.assertEqual(td.qdc(), decoder.decode_qdc(BytesIO(td.qdc(True)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_check_header(self):\r\n\r\n # Default header, should not generate any errors/warnings\r\n header = ['SampleID', 'BarcodeSequence', 'LinkerPrimerSequence',\r\n 'Description']\r\n errors = []\r\n warnings = []\r\n\r\n errors, warnings = check_header(header... | [
"0.5721757",
"0.56352746",
"0.56029373",
"0.55741435",
"0.5571948",
"0.5553872",
"0.5409489",
"0.53822374",
"0.5372538",
"0.53498983",
"0.53497857",
"0.53476274",
"0.534357",
"0.53414613",
"0.5300027",
"0.5283559",
"0.52749854",
"0.52655655",
"0.5253365",
"0.5250469",
"0.5244... | 0.7044205 | 0 |
Tests that we can decode a trace from the data stream. | def test_decode_trace(self):
self.assertEqual(td.trace(), decoder.decode_trace(BytesIO(td.trace(True)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_decode(self):\n pass # TODO(tlarsen)",
"def testDecode(self):\n test_cases = [\n ('1\\n', '\\n'),\n ('1 ', ' '),\n ('3a 3b', 'aaabbb'),\n ('1a 1 1b', 'a b'),\n ('3\\n', '\\n\\n\\n'),\n ('11 22 33', '122333'),\n ... | [
"0.6836183",
"0.6604363",
"0.6448971",
"0.6442332",
"0.6401186",
"0.6361264",
"0.6157366",
"0.6095047",
"0.5986678",
"0.5910711",
"0.5854313",
"0.583977",
"0.58035004",
"0.575414",
"0.5735243",
"0.5728554",
"0.5705553",
"0.5687723",
"0.56629175",
"0.5657399",
"0.562537",
"0... | 0.860621 | 0 |
Tests that we raise a Value Error when decoding a bad header length. | def test_process_optional_header_data_bad_header_length(self):
with self.assertRaises(ValueError):
decoder.process_optional_header_data(BytesIO(td.external_timestamp(True)), 3, self.mask) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bad_control_packet_header(self, data):\n with pytest.raises(StreamError) as e:\n ControlHeaderStruct.parse(data)",
"def test_bad_control_packet_header(self, data):\n with pytest.raises(StreamError) as e:\n ControlHeaderStruct.parse(data)",
"def test_error_message_he... | [
"0.69578516",
"0.69578516",
"0.69512135",
"0.6904783",
"0.6873048",
"0.6832096",
"0.6810115",
"0.68085086",
"0.67901564",
"0.67745537",
"0.67745537",
"0.67485756",
"0.67124915",
"0.66635495",
"0.66243625",
"0.6623286",
"0.6604393",
"0.64992744",
"0.64364654",
"0.6372474",
"0.... | 0.75773674 | 0 |
Test that we can process all the various header data correctly. | def test_process_optional_header_data(self):
self.assertDictEqual({'external_timestamp': td.external_timestamp()},
decoder.process_optional_header_data(
BytesIO(td.external_timestamp(True)),
decoder.HeaderCodes.HEADER... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_parse_header(self):\n data = parse_header(self.header)\n self.assertEqual(data.get(\"application\"), \"my Grandma\")\n self.assertEqual(data.get(\"version\"), \"has\")\n self.assertEqual(data.get(\"reference\"), \"furry\")\n self.assertEqual(data.get(\"query_letters\"), ... | [
"0.78624374",
"0.76068014",
"0.7540907",
"0.74937624",
"0.74638045",
"0.7417577",
"0.7256239",
"0.72331727",
"0.72244227",
"0.7216457",
"0.7197846",
"0.7154114",
"0.7136919",
"0.7113914",
"0.6917861",
"0.68381613",
"0.68257153",
"0.68054163",
"0.67863315",
"0.67728317",
"0.67... | 0.7013758 | 14 |
Test that we can decode a full 4 word header properly. | def test_decode_listmode_data(self):
self.assertEqual([td.header(decoded=True)],
decoder.decode_listmode_data(BytesIO(td.header(as_bytes=True)), self.mask))
self.assertEqual([{**td.header_with_trace(decoded=True), **{'trace': td.trace()}}],
decoder.decod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_decode_word_three(self):\n self.assertEqual({\n 'energy': 2345,\n 'trace_length': 0,\n 'trace_out_of_range': 0\n }, decoder.decode_word_three(td.header(self.frequency, self.firmware)[3], self.mask))",
"def test_decode_word_zero(self):\n self.assertEq... | [
"0.6455097",
"0.645249",
"0.63244706",
"0.63169897",
"0.6315922",
"0.6209735",
"0.6195852",
"0.6192095",
"0.61917824",
"0.61515397",
"0.61398387",
"0.60793066",
"0.603607",
"0.6024809",
"0.60140145",
"0.6012667",
"0.59706235",
"0.5939403",
"0.5893156",
"0.5845499",
"0.5797038... | 0.55377585 | 52 |
The instructions the command executes. | def execute(self, outer_instance):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cmd(self):",
"def commands():",
"def command():\n pass",
"def do_command(self, args):\n pass",
"def commands():\n pass",
"def commands():\n pass",
"def commands():\n pass",
"def commands():\n pass",
"def execute(self, args):",
"def __instructions(self):\n\n se... | [
"0.7435844",
"0.73787296",
"0.7182542",
"0.7171159",
"0.71085685",
"0.71085685",
"0.71085685",
"0.71085685",
"0.6951578",
"0.690298",
"0.68274945",
"0.6806004",
"0.67056584",
"0.67056584",
"0.67056584",
"0.67056584",
"0.67056584",
"0.67056584",
"0.6704491",
"0.6683751",
"0.66... | 0.0 | -1 |
The instructions the command's undo executes. | def undo(self, outer_instance):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def undo(*args, **kwargs)->None:\n pass",
"def undo():",
"def undo(self):\n if self._history_position > 0:\n self._history_position -= 1\n self._commands[\n self._history[self._history_position][1]\n ].execute(self._history[self._history_position][2])\n... | [
"0.7796077",
"0.7768907",
"0.7686347",
"0.7514232",
"0.74872017",
"0.74611974",
"0.73734057",
"0.7291286",
"0.7251718",
"0.7071507",
"0.69696057",
"0.69659215",
"0.69654554",
"0.69020116",
"0.68220097",
"0.6725726",
"0.66980076",
"0.66249967",
"0.65838397",
"0.658048",
"0.655... | 0.58454365 | 50 |
Description of measurement type | def description(self):
return self._description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unit_type(self) -> str:",
"def unit_of_measurement(self):\n return 'shows'",
"def type_short_description(self):\n return self.properties.get('TypeShortDescription', None)",
"def metertype(self):\n return self._metertype.get_waarde()",
"def unit_of_measurement(self):\n return... | [
"0.7772336",
"0.6826864",
"0.6757931",
"0.6721329",
"0.66571134",
"0.66571134",
"0.66517615",
"0.6633841",
"0.6609533",
"0.65498585",
"0.6546459",
"0.65346",
"0.65346",
"0.64425594",
"0.6416437",
"0.64155805",
"0.63798714",
"0.6369868",
"0.6369868",
"0.6369868",
"0.6369868",
... | 0.0 | -1 |
A short name for the measurement type | def name(self):
return self._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unit_type(self) -> str:",
"def name(self):\n return f\"{self._name} {SENSOR_TYPES[self.sensor][0]}\"",
"def name(self):\n return f\"{self._tc_object.name} {SENSOR_TYPES[self.type][0]}\"",
"def name(self) -> str:\n return self.type_data.name",
"def name(self):\n return self.d... | [
"0.76026946",
"0.71601385",
"0.71546084",
"0.7009633",
"0.6961777",
"0.6867043",
"0.676692",
"0.6710373",
"0.6681874",
"0.6672308",
"0.6664104",
"0.66614926",
"0.66579384",
"0.66579384",
"0.6629964",
"0.65916",
"0.6588248",
"0.6578761",
"0.6554102",
"0.6553618",
"0.65481985",... | 0.0 | -1 |
List of the valid units of measure for this type. | def unitsofmeasure(self):
return self._unitsofmeasure | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_units(self, obj: Dimension) -> [Unit]:\n try:\n return obj.units()\n except KeyError as e:\n logging.error(str(e))\n return []",
"def list_data_units(self):\n return self.data_units.items()",
"def units(self):\n return self._units",
"def un... | [
"0.78333354",
"0.7298863",
"0.72212994",
"0.72212994",
"0.71799505",
"0.7144857",
"0.7069483",
"0.69528997",
"0.6926764",
"0.6894928",
"0.6879163",
"0.68667114",
"0.68334574",
"0.67959476",
"0.67511106",
"0.6689399",
"0.664782",
"0.6642333",
"0.6621156",
"0.6603523",
"0.66010... | 0.7202679 | 4 |
Unit of measurment for this type. Defined and specific to the type itself. | def units(self):
return self._units | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unit_of_measurement(self):\n return None",
"def unit_of_measurement(self):\n return self._unit_of_measurement",
"def unit_of_measurement(self):\n return self._unit_of_measurement",
"def unit_of_measurement(self):\n return self._unit_of_measurement",
"def unit_of_measurement(... | [
"0.8209959",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.76524574",
"0.7621946",
"0.75941557",
"0.75941557",
"0.75941557",
"0.75941557",
... | 0.0 | -1 |
Return a new array with capacity c | def _make_array(self, c):
return (c * ctypes.py_object)() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_array(self, new_capacity):\n return (new_capacity * ctypes.py_object)()",
"def _make_array(self, capacity):\n return (capacity * ctypes.py_object)()",
"def c_array(ctype, values):\n\n arr = (ctype*len(values))()\n arr[:] = values\n return arr",
"def _create_array(capacity):\n ... | [
"0.72728163",
"0.69640464",
"0.6764715",
"0.6693896",
"0.64812934",
"0.6355106",
"0.62838227",
"0.6222287",
"0.6151844",
"0.6029347",
"0.59984475",
"0.5971656",
"0.5932274",
"0.5911736",
"0.589929",
"0.58850855",
"0.5883915",
"0.5881704",
"0.5760411",
"0.5748259",
"0.57417834... | 0.6280682 | 7 |
This wraps `importlib.metadata.requires` to not be garbage. | def get_requirements(package):
requirements: list = requires(package)
requires_dict = defaultdict(dict)
for requirement in requirements:
req = Requirement(requirement)
package_name, package_marker = req.name, req.marker
if package_marker and "extra ==" in str(package_marker):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def requires(self):",
"def requires(self):\n raise NotImplementedError()",
"def requires(self):\n return []",
"def GetMissingRequires(self):\n external_dependencies = set(self._required_namespaces)\n\n # Assume goog namespace is always available.\n external_dependencies.add('goog')\n ... | [
"0.6486718",
"0.62650573",
"0.6173843",
"0.6140559",
"0.60132354",
"0.5872128",
"0.5832406",
"0.5826215",
"0.57347125",
"0.57058716",
"0.5689134",
"0.56868213",
"0.5636937",
"0.55920804",
"0.557205",
"0.554945",
"0.5546663",
"0.55184084",
"0.55179524",
"0.5489475",
"0.5484288... | 0.49816108 | 76 |
Resolves a list of requirements for the same package. Given a list of package details in the form of `packaging.requirements.Requirement` objects, combine the specifier, extras, url and marker information to create a new requirement object. | def resolve_requirement_versions(package_versions):
resolved = Requirement(str(package_versions[0]))
for package_version in package_versions[1:]:
resolved.specifier = resolved.specifier & package_version.specifier
resolved.extras = resolved.extras.union(package_version.extras)
resolved.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_dependencies(package=\"sunpy\", extras=None):\n requirements = get_requirements(package)\n installed_requirements = {}\n missing_requirements = defaultdict(list)\n extras = extras or [\"required\"]\n for group in requirements:\n if group not in extras:\n continue\n ... | [
"0.6731303",
"0.6638183",
"0.64004624",
"0.6214947",
"0.60815656",
"0.6050588",
"0.60242367",
"0.6014201",
"0.5969914",
"0.59190315",
"0.58537954",
"0.5825504",
"0.578931",
"0.5785204",
"0.5728535",
"0.57212466",
"0.56810987",
"0.56708723",
"0.5663251",
"0.5650628",
"0.563003... | 0.7085873 | 0 |
List installed and missing dependencies. Given a package and, optionally, a tuple of extras, identify any packages which should be installed to match the requirements and return any which are missing. | def find_dependencies(package="sunpy", extras=None):
requirements = get_requirements(package)
installed_requirements = {}
missing_requirements = defaultdict(list)
extras = extras or ["required"]
for group in requirements:
if group not in extras:
continue
for package, pack... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def missing_dependencies_by_extra(package=\"sunpy\", exclude_extras=None):\n exclude_extras = exclude_extras or []\n requirements = get_requirements(package)\n missing_dependencies = {}\n for group in requirements.keys():\n if group in exclude_extras:\n continue\n missing_depen... | [
"0.76459414",
"0.6849081",
"0.67575186",
"0.666805",
"0.6547717",
"0.654318",
"0.6514373",
"0.6467595",
"0.6462847",
"0.6381039",
"0.6121573",
"0.6098772",
"0.6093863",
"0.6074484",
"0.60300785",
"0.5925275",
"0.59156656",
"0.5831861",
"0.582028",
"0.58077604",
"0.5804144",
... | 0.818115 | 0 |
Get all the specified extras for a package and report any missing dependencies. This function will also return a "required" item in the dict which is the dependencies associated with no extras. | def missing_dependencies_by_extra(package="sunpy", exclude_extras=None):
exclude_extras = exclude_extras or []
requirements = get_requirements(package)
missing_dependencies = {}
for group in requirements.keys():
if group in exclude_extras:
continue
missing_dependencies[group]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_dependencies(package=\"sunpy\", extras=None):\n requirements = get_requirements(package)\n installed_requirements = {}\n missing_requirements = defaultdict(list)\n extras = extras or [\"required\"]\n for group in requirements:\n if group not in extras:\n continue\n ... | [
"0.750957",
"0.72501034",
"0.67800206",
"0.66262317",
"0.6523681",
"0.6490982",
"0.63194853",
"0.62972224",
"0.62286425",
"0.60691607",
"0.60094035",
"0.59347016",
"0.58882934",
"0.5886922",
"0.5747453",
"0.57250464",
"0.5711906",
"0.5701838",
"0.5681736",
"0.5658716",
"0.562... | 0.7773356 | 0 |
Prints ones' system info in an "attractive" fashion. | def system_info():
requirements = get_requirements("sunpy")
groups = get_keys_list(requirements)
extra_groups = get_extra_groups(groups, ['all', 'dev'])
base_reqs = get_keys_list(requirements['required'])
extra_reqs = get_keys_list(requirements['all'])
missing_packages, installed_packages = find... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sys_info(self):\n\n for i in self._nodes.items():\n print(\"\\n==============================\")\n name = i[0]\n node = i[1]\n\n print(\"NODE: {}\\n\".format(name))\n\n # CPU\n print(\"CPU:\")\n self.cpu_info(node)\n\n ... | [
"0.6868147",
"0.6798727",
"0.6470592",
"0.6452295",
"0.6356924",
"0.6207899",
"0.61943924",
"0.6177612",
"0.6118809",
"0.6074527",
"0.60507464",
"0.6049711",
"0.60185146",
"0.5990618",
"0.5982109",
"0.5871364",
"0.58622456",
"0.5839884",
"0.5812894",
"0.5809481",
"0.57959634"... | 0.64566565 | 3 |
Load zoning districts from the given shapefile. | def load_zoning_districts(source=ZONING_DATA_FILE):
layer = DataSource(source)[0]
for feature in layer:
try:
_save_base_district(feature)
except:
print ('Could not save base district for feature with OBJECTID=%s.'
' Skipping.') % feature['OBJECTID']
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_graph(self, graph: nx.Graph) -> None:\n\n self.pos = dict()\n self.polygons = dict()\n districts = len(self.data[\"features\"])\n\n for i in range(districts):\n\n # Get shape information from file\n nodes = self.data[\"features\"][i][\"geometry\"][\"coor... | [
"0.63071585",
"0.62551874",
"0.62253094",
"0.60826",
"0.6047353",
"0.5942383",
"0.5731001",
"0.5591916",
"0.5538651",
"0.54869246",
"0.53558475",
"0.5330665",
"0.529415",
"0.5255251",
"0.5226903",
"0.51566815",
"0.514738",
"0.5143",
"0.51270646",
"0.512447",
"0.5090616",
"0... | 0.72876954 | 0 |
Create an hmac keyed hash for the given message using the SHA256 digest algorithm. | def create_hmac(mac_pass, msg_bytes):
return hmac.new(
mac_pass, msg_bytes, digestmod=hashlib.sha256).digest() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_hmac(self, msg):\r\n return hmac.new(self.hmacKey, msg, sha256).digest()",
"def _hmac_sha256(key, msg):\n\n return hmac.new(key, msg, hashlib.sha256).digest()",
"def make_hmac(message, key):\n h = HMAC.new(key)\n h.update(message)\n return h.hexdigest()",
"def get_hmac(secret, message):... | [
"0.79364747",
"0.78883725",
"0.7638556",
"0.7233106",
"0.70357126",
"0.70239246",
"0.6951967",
"0.6889313",
"0.6825473",
"0.67606384",
"0.664823",
"0.6609326",
"0.65936446",
"0.65790445",
"0.65119046",
"0.6475511",
"0.6444066",
"0.6442702",
"0.6353807",
"0.63512695",
"0.62898... | 0.6987447 | 6 |
Extract the hidden message fro the given image. Authenticate the hidden message by validating the hmac hash sliced from the hidden message. | def get_msg(img):
i = Image.open('%s.ste' % img)
secret = stg.extract_msg(i)
mac = secret.split('--:--')[0]
print 'HMAC hex is: \n%s\n' % mac.encode('hex')
data = secret.split('--:--')[1]
print 'The hidden message is: \n%s\n' % data
check_hmac(mac)
i.show() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hide(self, img, message):\r\n encoded = img.copy()\r\n width, height = img.size\r\n index = 0\r\n\r\n message = message + '~~~'\r\n message_bits = \"\".join(tools.a2bits_list(message))\r\n\r\n npixels = width * height\r\n if len(message_bits) > npixels * 3:\r\n ... | [
"0.6304911",
"0.5306204",
"0.5240656",
"0.5205463",
"0.51036364",
"0.5082488",
"0.50332326",
"0.50201464",
"0.49953687",
"0.4965542",
"0.4962028",
"0.49606332",
"0.49157923",
"0.49048188",
"0.4883517",
"0.48731127",
"0.48006538",
"0.47986904",
"0.47594568",
"0.47593972",
"0.4... | 0.8221424 | 0 |
Check if the given hmac ist valid by creating a new hmac with the supplied password and the data. | def check_hmac(mac, data):
h_mac = hmac.new(args['m'], bytes(data), digestmod=hashlib.sha256).digest()
print 'HMAC validation: \n%s\n' % str(h_mac == mac) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def verify_hmac(self, payload):\r\n \r\n new_hmac = hmac.new(bytes(self.passphrase), b'%s'%(payload['eiv']) , hashlib.sha224)\r\n new_hmac.update(b'%s'%(payload['enid']))\r\n new_hmac.update(b'%s'%(payload['ed']))\r\n new_hmac.update(self.sessionID)\r\n #print(new_hmac.digest... | [
"0.67652047",
"0.6743941",
"0.64469117",
"0.63084877",
"0.6117735",
"0.60767394",
"0.6014057",
"0.60025823",
"0.5932569",
"0.58754456",
"0.5839325",
"0.5813827",
"0.5786236",
"0.57454073",
"0.5742142",
"0.57346916",
"0.57076555",
"0.56693023",
"0.5610851",
"0.5534866",
"0.552... | 0.7753446 | 0 |
Create a hash of the given password using the SHA256 digest algorithm. | def hash_128_bit_pass(passwd):
h = hashlib.sha256()
h.update(passwd)
return h.hexdigest()[:16] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hash(password):\n return sha256_crypt.encrypt(password)",
"def create_password_hash(self, password):\n return pbkdf2_sha256.encrypt(password, rounds=1000, salt_size=16)",
"def generate_hash(password):\n return pbkdf2_sha256.hash(password)",
"def hash_password(password):\n #ret... | [
"0.81693244",
"0.7855119",
"0.76830536",
"0.7674545",
"0.74575865",
"0.7407218",
"0.73847663",
"0.73093057",
"0.7185684",
"0.7150351",
"0.70911676",
"0.70568204",
"0.705129",
"0.70160323",
"0.69834554",
"0.69465935",
"0.6927447",
"0.69201213",
"0.691549",
"0.690722",
"0.69020... | 0.66457325 | 51 |
Encrypt or decrypt the given data with the given key using the XTEA algorithm in CFB mode. | def crypt(key, data, iv):
return xtea.crypt(key, data, iv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aes_encrypt(data, key):\r\n cipher = aes_cipher_from_key(key)\r\n padded_data = pad(data)\r\n return cipher.encrypt(padded_data)",
"def encrypt_data ( aes_key, data ) :\n salt = Crypto.Random.new( ).read( Crypto.Cipher.AES.block_size )\n cipher = Crypto.Cipher.AES.new( aes_key, Crypto.Cipher.AES... | [
"0.6930832",
"0.673996",
"0.6508346",
"0.62588924",
"0.6219696",
"0.61932915",
"0.6129721",
"0.60209644",
"0.5947178",
"0.59384453",
"0.5836603",
"0.5817147",
"0.5781398",
"0.5755413",
"0.5704596",
"0.5699874",
"0.5683898",
"0.5645697",
"0.5633051",
"0.56117266",
"0.56020063"... | 0.6382199 | 3 |
Read the image data of the given path and return an Image object | def read_image(image_path):
if not os.path.exists(image_path):
raise IOError('File does not exist: %s' % image_path)
else:
return Image.open(image_path) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_image(path: str):\n return Image.open(path, mode=\"r\")",
"def read_image(path):\n img = misc.imread(path)\n return img",
"def read_image(img_path):\n img = imageio.imread(uri=img_path)\n return img",
"def load(path) -> Image:\n return Image.open(path)",
"def imread(path):\n ... | [
"0.88076556",
"0.8642996",
"0.8330374",
"0.8086038",
"0.7910456",
"0.7901835",
"0.7893872",
"0.78067493",
"0.7765091",
"0.7754277",
"0.7656238",
"0.7632126",
"0.76054746",
"0.7591819",
"0.7562191",
"0.7488007",
"0.7487986",
"0.74737996",
"0.746875",
"0.7440703",
"0.7433175",
... | 0.81350935 | 3 |
Read the content of the given text file and return the content as a string | def read_text(text_path):
if not os.path.exists(text_path):
raise IOError('File does not exist: %s' % text_path)
return open(text_path).read() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_text_file(str_name_file: str):\n content: str = ''\n with open(str_name_file, mode=\"r\", encoding='utf-8') as file:\n print(\"file being read: \" + str_name_file + \"\\n\")\n content = file.read()\n return content",
"def readText(fileName):\n fileText = \"\"\n with open(fil... | [
"0.8550748",
"0.82607615",
"0.8141484",
"0.80884755",
"0.8078403",
"0.8068108",
"0.80314916",
"0.80090874",
"0.7974387",
"0.7947962",
"0.79469347",
"0.7939634",
"0.7921594",
"0.7908735",
"0.7899936",
"0.7889192",
"0.78745615",
"0.78711563",
"0.78597575",
"0.78250796",
"0.7810... | 0.72988856 | 60 |
returns text taking new lines into account. | def wrap_multi_line(self, text, maxwidth, font=None):
if font is None:
font = self.get_font()
lines = chain(*(self.wrapline(line, maxwidth, font) for line in text.splitlines()))
return list(lines) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def text(self):\n return \"\\n\".join(self.raw_text)",
"def strip_newlines(text):\n return text.replace('\\n', ' ').replace('\\r', '').rstrip()",
"def get_plain_text(text):\n if not text or not isinstance(text, str):\n return \"\"\n\n return text.lstrip().replace(\"\\n\", \"\").replace(\... | [
"0.7274624",
"0.72395724",
"0.69826627",
"0.68046707",
"0.6786448",
"0.6671665",
"0.6618142",
"0.6568718",
"0.65389484",
"0.6535787",
"0.6535787",
"0.6535787",
"0.6535787",
"0.6535787",
"0.6521789",
"0.65048563",
"0.64867187",
"0.642651",
"0.6389692",
"0.6387929",
"0.6353859"... | 0.0 | -1 |
If s is the numer of sides in a polygon, then the formula for the nth | def polygonal_number(s, n):
return (n*n*(s-2)-n*(s-4))/2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def area_polygon(n, s):\n area = ((float(1)/float(4)) * n * s ** 2) / (math.tan(math.pi / n))\n return area",
"def polysum(n, s):\n area = 0\n \n #avoiding division by zero\n if n != 0: \n area = (0.25 * n * (s**2)) / math.tan(math.pi / n)\n perimeter = n * s\n \n return ... | [
"0.7027547",
"0.6960124",
"0.6618643",
"0.62399167",
"0.6210337",
"0.6153565",
"0.60968953",
"0.6084945",
"0.6028545",
"0.60198605",
"0.59947395",
"0.58944356",
"0.58530086",
"0.5812029",
"0.5808305",
"0.57551855",
"0.5749107",
"0.5730243",
"0.57258356",
"0.5722142",
"0.57036... | 0.8311902 | 0 |
Returns an iterator generating, for a fixed s, all the sgonal | def polygon_gen(s):
f = functools.partial(polygonal_number, s)
return itertools.imap(f, itertools.count(1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __iter__(self):\n for i in range(len(self.ks)):\n yield self.get_neighs([i]), self.get_sp_rel_pos([i]),\\\n [self.ks[i]], self.iss",
"def marker():\n\n\tsyms = ['o', '^', 's']\n\twhile True:\n\t\tfor s in syms:\n\t\t\tyield s",
"def per_shoebox_whitelist_iterator(self, sidx... | [
"0.6403529",
"0.6033338",
"0.59872353",
"0.59764975",
"0.58805764",
"0.58409125",
"0.56991136",
"0.56713444",
"0.5668757",
"0.56453276",
"0.5617222",
"0.55903953",
"0.5547486",
"0.55474216",
"0.5511342",
"0.54974675",
"0.54916203",
"0.54659927",
"0.54564786",
"0.54493475",
"0... | 0.5518812 | 14 |
Create a list of figurate numbers for a given s, between 1000 and 9999, with the additional property that the third digit of each number will not be 0. | def figurate_list(s):
f = polygon_gen(s)
ans = []
c = next(f)
while c < 999: c = next(f)
while c < 10000:
c = str(c)
if c[2] != '0': ans.append(FigurateNode(c[:2], c[-2:], s))
c = next(f)
return ans | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fnum(num, sf = 0):\n\n\ts = []\n\tnf = 0\n\tppos = -1\n\tfor x in str(num):\n#\t\tprint((x, s))\n\t\tif x == '.':\n\t\t\tppos = len(s)\n\t\t\tcontinue\n\t\tif nf == 0 and ppos < 0 and x == '0':\n\t\t\tcontinue\n\t\ts.append(x)\n\t\tif x != '-' and (x != '0' or nf > 0):\n\t\t\tnf += 1\n\t\tif ppos >= 0 and sf >... | [
"0.617936",
"0.61459374",
"0.5946138",
"0.5857729",
"0.5823544",
"0.57899886",
"0.57853043",
"0.5770208",
"0.5769795",
"0.57615775",
"0.5737207",
"0.57371724",
"0.5700131",
"0.56913346",
"0.56819487",
"0.566019",
"0.5638854",
"0.56227523",
"0.56187755",
"0.5614714",
"0.557821... | 0.66711605 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.