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 |
|---|---|---|---|---|---|---|
Returns the dict as a model | def from_dict(cls, dikt) -> 'ConnectionEndPoint':
return util.deserialize_model(dikt, cls) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, dikt) -> 'ModelClass':\n return util.deserialize_model(dikt, cls)",
"def to_dict_model(self) -> dict:\n return dict((key, getattr(self, key)) for key in self.__mapper__.c.keys())",
"def from_dict(cls, dikt):\n return util.deserialize_model(dikt, cls)",
"def from_dict(cls, ... | [
"0.6939894",
"0.68444926",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.6739522",
"0.6698291",
"0.6698291",
"0.66464084",
"0.66383654",
"0.66022646",
"0.660082",
"0.65999925",
"0.6593835",
"0.6580194",
"0.65621036",
"0.64150435",
"0.6... | 0.0 | -1 |
Gets the uuid of this ConnectionEndPoint. | def uuid(self) -> str:
return self._uuid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uuid(self) -> str:\n return self.__uuid",
"def uuid(self):\n\n return self.__uuid",
"def uuid(self): # type: ignore\n return self._uuid",
"def uuid(self):\n return self._uuid",
"def uuid(self):\n return self._uuid",
"def uuid(self):\n return self.__uuid",
... | [
"0.7309623",
"0.72664577",
"0.7230148",
"0.718938",
"0.718938",
"0.7181145",
"0.7181145",
"0.71802694",
"0.70388645",
"0.6739499",
"0.6739499",
"0.6739499",
"0.67321247",
"0.66511244",
"0.66511244",
"0.66511244",
"0.6575948",
"0.6560892",
"0.6525945",
"0.64700735",
"0.6458992... | 0.73261946 | 2 |
Sets the uuid of this ConnectionEndPoint. | def uuid(self, uuid: str):
self._uuid = uuid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uuid(self, uuid):\n\n self._uuid = uuid",
"def uuid(self, uuid):\n\n self._uuid = uuid",
"def uuid(self, uuid):\n\n self._uuid = uuid",
"def uuid(self, uuid):\n\n self._uuid = uuid",
"def uuid(self, uuid: str):\n \n self._uuid = uuid",
"def endpointuuid(self,... | [
"0.7402094",
"0.7402094",
"0.7402094",
"0.7402094",
"0.7364295",
"0.72069186",
"0.6807352",
"0.67941815",
"0.6685197",
"0.6685197",
"0.59281915",
"0.5862712",
"0.5737659",
"0.55736667",
"0.5573157",
"0.5480015",
"0.5465912",
"0.5465912",
"0.5465912",
"0.54644835",
"0.53968185... | 0.7317109 | 5 |
Gets the name of this ConnectionEndPoint. | def name(self) -> List[NameAndValue]:
return self._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self):\n return '{} {}'.format(self._device,\n self._endpoint)",
"def peername(self):\n return self.socket_.getpeername()",
"def get_name(self):\n \n return 'Socket/IP'",
"def getsockname(self):\r\n return self._fd.getsockname()",
"de... | [
"0.756051",
"0.7227606",
"0.7097569",
"0.7072862",
"0.7072641",
"0.70398873",
"0.70217276",
"0.6980249",
"0.6921586",
"0.690786",
"0.689965",
"0.6873805",
"0.68566614",
"0.67906415",
"0.6777492",
"0.67392117",
"0.6666829",
"0.6663832",
"0.6663832",
"0.6663832",
"0.66534466",
... | 0.0 | -1 |
Sets the name of this ConnectionEndPoint. | def name(self, name: List[NameAndValue]):
self._name = name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_name(self, name):\n self._name = name",
"def set_name(self, name):\n self.__name = name",
"def set_name(self, name):\n self.__name = name",
"def set_name(self, name):\r\n self.__name = name",
"def setname(self, name):\n self.__name = name",
"def set_name(self, n... | [
"0.71360976",
"0.71320254",
"0.71320254",
"0.7090261",
"0.7078964",
"0.7067687",
"0.7067687",
"0.7067687",
"0.7067687",
"0.7067687",
"0.70375973",
"0.70223016",
"0.6999807",
"0.6930449",
"0.6930449",
"0.6898523",
"0.68954396",
"0.68885785",
"0.68592894",
"0.68592894",
"0.6801... | 0.0 | -1 |
Gets the operational_state of this ConnectionEndPoint. | def operational_state(self) -> str:
return self._operational_state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_status(self):\n return self._conn_state",
"def get_connection_state(self):\n return self.connection_state",
"def state(self):\n return pn_connection_state(self._impl)",
"def connection_status(self):\n return self._connection_status",
"def status(self) -> Optional[pulumi.... | [
"0.68319815",
"0.68308073",
"0.6515286",
"0.64101964",
"0.6124702",
"0.6124702",
"0.6124702",
"0.6124702",
"0.6071668",
"0.5983941",
"0.5983941",
"0.5983941",
"0.59587127",
"0.59099543",
"0.5899447",
"0.58726335",
"0.5847335",
"0.5847335",
"0.5847335",
"0.5847335",
"0.5847335... | 0.75950426 | 0 |
Sets the operational_state of this ConnectionEndPoint. | def operational_state(self, operational_state: str):
allowed_values = ["DISABLED", "ENABLED"] # noqa: E501
if operational_state not in allowed_values:
raise ValueError(
"Invalid value for `operational_state` ({0}), must be one of {1}"
.format(operational_stat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def operational_status(self, operational_status):\n\n self._operational_status = operational_status",
"def operational_status(self, operational_status):\n\n self._operational_status = operational_status",
"def operation_state(self, operation_state):\n\n self._operation_state = operation_st... | [
"0.6623259",
"0.6623259",
"0.6101698",
"0.5693205",
"0.56924415",
"0.5691022",
"0.56134856",
"0.5601487",
"0.5581799",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
"0.5563682",
... | 0.70021296 | 0 |
Gets the lifecycle_state of this ConnectionEndPoint. | def lifecycle_state(self) -> str:
return self._lifecycle_state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lifecycle_state(self):\n return self._lifecycle_state",
"def lifecycle_state(self):\n return self._lifecycle_state",
"def lifecycle_state(self):\n return self._lifecycle_state",
"def lifecycle_state(self):\n return self._lifecycle_state",
"def lifecycle_state(self):\n ... | [
"0.77957743",
"0.77957743",
"0.77957743",
"0.77957743",
"0.77957743",
"0.6779853",
"0.637915",
"0.6131513",
"0.612186",
"0.59888816",
"0.5882657",
"0.5882657",
"0.5882657",
"0.5882657",
"0.5882657",
"0.57937056",
"0.57937056",
"0.57503927",
"0.57503927",
"0.57503927",
"0.5750... | 0.7214624 | 5 |
Sets the lifecycle_state of this ConnectionEndPoint. | def lifecycle_state(self, lifecycle_state: str):
allowed_values = ["PLANNED", "POTENTIAL_AVAILABLE", "POTENTIAL_BUSY", "INSTALLED", "PENDING_REMOVAL"] # noqa: E501
if lifecycle_state not in allowed_values:
raise ValueError(
"Invalid value for `lifecycle_state` ({0}), must be... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lifecycle_state(self, lifecycle_state):\n self._lifecycle_state = lifecycle_state",
"def lifecycle_state(self, lifecycle_state):\n self._lifecycle_state = lifecycle_state",
"def lifecycle_state(self, lifecycle_state):\n allowed_values = [\"PROVISIONING\", \"AVAILABLE\", \"TERMINATING\"... | [
"0.76882446",
"0.76882446",
"0.711779",
"0.6429857",
"0.6426587",
"0.5568759",
"0.5564795",
"0.54914594",
"0.5471709",
"0.5448473",
"0.54143035",
"0.53845024",
"0.53814214",
"0.5353936",
"0.53213865",
"0.53213865",
"0.53213865",
"0.53213865",
"0.53213865",
"0.53213865",
"0.53... | 0.6455731 | 3 |
Gets the termination_direction of this ConnectionEndPoint. | def termination_direction(self) -> str:
return self._termination_direction | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def termination_direction(self, termination_direction: str):\n allowed_values = [\"BIDIRECTIONAL\", \"SINK\", \"SOURCE\", \"UNDEFINED_OR_UNKNOWN\"] # noqa: E501\n if termination_direction not in allowed_values:\n raise ValueError(\n \"Invalid value for `termination_directio... | [
"0.6747025",
"0.6339703",
"0.6330633",
"0.6314831",
"0.6202958",
"0.61843795",
"0.61089504",
"0.6067965",
"0.60548645",
"0.5998903",
"0.5955845",
"0.59224766",
"0.58646476",
"0.5852054",
"0.5817432",
"0.5813375",
"0.5800287",
"0.57266474",
"0.5713044",
"0.57085085",
"0.570361... | 0.8100644 | 0 |
Sets the termination_direction of this ConnectionEndPoint. | def termination_direction(self, termination_direction: str):
allowed_values = ["BIDIRECTIONAL", "SINK", "SOURCE", "UNDEFINED_OR_UNKNOWN"] # noqa: E501
if termination_direction not in allowed_values:
raise ValueError(
"Invalid value for `termination_direction` ({0}), must be ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_termination(self, termination):\n # FIXME should be internally accessible only?\n self.__termination = termination",
"def termination_direction(self) -> str:\n return self._termination_direction",
"def direction(self, direction):\n\n self._direction = direction",
"def set_... | [
"0.640824",
"0.63931453",
"0.56420517",
"0.5394109",
"0.53315324",
"0.52557427",
"0.52557427",
"0.52557427",
"0.5211987",
"0.51994586",
"0.5056376",
"0.5056376",
"0.5051297",
"0.5051297",
"0.5045381",
"0.5027594",
"0.4985935",
"0.4943825",
"0.49381512",
"0.49232072",
"0.48966... | 0.7977831 | 0 |
Gets the termination_state of this ConnectionEndPoint. | def termination_state(self) -> str:
return self._termination_state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def termination(self):\n return self.__termination",
"def get_ssl_termination(self):\n return self.manager.get_ssl_termination(self)",
"def terminating_on(self):\n return self._terminating_on",
"def terminated(self):\n return self._terminated",
"def terminated(self):\n re... | [
"0.65559936",
"0.6262929",
"0.62271124",
"0.6188171",
"0.6188171",
"0.6125202",
"0.60600793",
"0.6005115",
"0.5923498",
"0.56676537",
"0.5665788",
"0.56531096",
"0.5590717",
"0.557181",
"0.5468976",
"0.5463126",
"0.5419899",
"0.5410675",
"0.5404743",
"0.5395988",
"0.5296206",... | 0.7544638 | 0 |
Sets the termination_state of this ConnectionEndPoint. | def termination_state(self, termination_state: str):
allowed_values = ["LP_CAN_NEVER_TERMINATE", "LT_NOT_TERMINATED", "TERMINATED_SERVER_TO_CLIENT_FLOW", "TERMINATED_CLIENT_TO_SERVER_FLOW", "TERMINATED_BIDIRECTIONAL", "LT_PERMENANTLY_TERMINATED", "TERMINATION_STATE_UNKNOWN"] # noqa: E501
if termination... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_termination(self, termination):\n # FIXME should be internally accessible only?\n self.__termination = termination",
"def terminated(self, terminated):\n\n self._terminated = terminated",
"def terminated(self, terminated):\n\n self._terminated = terminated",
"def terminate... | [
"0.6452473",
"0.5807092",
"0.5807092",
"0.5807092",
"0.5624698",
"0.55612886",
"0.54337186",
"0.5364221",
"0.5222837",
"0.4969389",
"0.4969389",
"0.49535656",
"0.48852345",
"0.4882801",
"0.48434332",
"0.48371",
"0.48204172",
"0.47924957",
"0.47783226",
"0.47641855",
"0.476255... | 0.6799398 | 0 |
Gets the layer_protocol_name of this ConnectionEndPoint. | def layer_protocol_name(self) -> str:
return self._layer_protocol_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def layer_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"layer_name\")",
"def layer_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"layer_name\")",
"def protocol(self) -> str:\n return self.__parameters.protocol",
"def layer_protocol_name(self, layer... | [
"0.6991893",
"0.6737981",
"0.6655885",
"0.66094315",
"0.6580004",
"0.6526617",
"0.64756644",
"0.64686406",
"0.6449779",
"0.6433681",
"0.6416226",
"0.64074725",
"0.63770485",
"0.63522774",
"0.63161236",
"0.62349397",
"0.61921996",
"0.618826",
"0.6171238",
"0.6171238",
"0.61439... | 0.87370723 | 0 |
Sets the layer_protocol_name of this ConnectionEndPoint. | def layer_protocol_name(self, layer_protocol_name: str):
allowed_values = ["OTSiA", "OCH", "OTU", "ODU", "ETH", "ETY", "DSR"] # noqa: E501
if layer_protocol_name not in allowed_values:
raise ValueError(
"Invalid value for `layer_protocol_name` ({0}), must be one of {1}"
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def layer_protocol_name(self) -> str:\n return self._layer_protocol_name",
"def layer(self, layer):\n self._layer = layer",
"def protocol_id(self, protocol_id):\n self._protocol_id = protocol_id",
"def protocol_id(self, protocol_id):\n\n self._protocol_id = protocol_id",
"def pr... | [
"0.70598274",
"0.5782147",
"0.57290965",
"0.57289034",
"0.5708312",
"0.5688233",
"0.56085056",
"0.56085056",
"0.56085056",
"0.56085056",
"0.5562985",
"0.54273206",
"0.5392024",
"0.53690857",
"0.53411305",
"0.52844375",
"0.5257484",
"0.52147466",
"0.5196867",
"0.50834507",
"0.... | 0.79915446 | 0 |
Gets the connectivity_service_end_point of this ConnectionEndPoint. | def connectivity_service_end_point(self) -> str:
return self._connectivity_service_end_point | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def connectivity_service_end_point(self, connectivity_service_end_point: str):\n\n self._connectivity_service_end_point = connectivity_service_end_point",
"def get_endpoint(self):\r\n return self._endpoint",
"def __get_endpoint(self):\n return self._endpoint",
"def connected_endpoint(sel... | [
"0.70261055",
"0.63055533",
"0.62776625",
"0.6240966",
"0.61877346",
"0.6100025",
"0.60089487",
"0.60035914",
"0.59879875",
"0.5943736",
"0.5943736",
"0.56929696",
"0.5629272",
"0.5618605",
"0.56028825",
"0.55782425",
"0.5570696",
"0.5567195",
"0.5560139",
"0.5560139",
"0.556... | 0.825556 | 0 |
Sets the connectivity_service_end_point of this ConnectionEndPoint. | def connectivity_service_end_point(self, connectivity_service_end_point: str):
self._connectivity_service_end_point = connectivity_service_end_point | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def connectivity_service_end_point(self) -> str:\n return self._connectivity_service_end_point",
"def graph_endpoint(self, graph_endpoint):\n\n self._graph_endpoint = graph_endpoint",
"def setEndpoint(self, endpoint):\n self.__lockobj.acquire()\n self.__endpoints[endpoint.getEndpoin... | [
"0.635812",
"0.5773693",
"0.56269103",
"0.53948677",
"0.53651756",
"0.53116417",
"0.525991",
"0.5178036",
"0.5159906",
"0.5135377",
"0.50487715",
"0.50400984",
"0.49996492",
"0.4988267",
"0.4931792",
"0.48966828",
"0.48765537",
"0.4869402",
"0.48534063",
"0.48342404",
"0.4833... | 0.85730124 | 0 |
Gets the parent_node_edge_point of this ConnectionEndPoint. | def parent_node_edge_point(self) -> List[str]:
return self._parent_node_edge_point | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getParent(self):\n return self.parent_edge",
"def edges_parent(self):\n return self._edges_parent",
"def get_parent_id(self):\n return self._parent_id",
"def get_parent(self):\n return BinaryNode.or_none(self.parent)",
"def parent_id(self):\n return self._parent_id",
... | [
"0.7909449",
"0.7849635",
"0.72225994",
"0.71083087",
"0.6985489",
"0.6985489",
"0.69378465",
"0.6932805",
"0.6929256",
"0.6897707",
"0.6897707",
"0.6897707",
"0.68958336",
"0.686817",
"0.68395025",
"0.68314517",
"0.6809207",
"0.6806697",
"0.6785802",
"0.6785802",
"0.67726624... | 0.7929555 | 0 |
Sets the parent_node_edge_point of this ConnectionEndPoint. | def parent_node_edge_point(self, parent_node_edge_point: List[str]):
self._parent_node_edge_point = parent_node_edge_point | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setParent(self, edge):\n self.parent_edge = edge",
"def set_parent(self, parent_node):\n self.set_parent = parent_node",
"def set_parent(self, parent: \"BaseSegment\") -> None:\n self._parent = weakref.ref(parent)",
"def set_parent(self, parent):\n self._parent = parent",
"d... | [
"0.77046937",
"0.7487442",
"0.6870154",
"0.65892845",
"0.6562548",
"0.6562548",
"0.6562548",
"0.6562548",
"0.65572673",
"0.6549818",
"0.65178555",
"0.64919025",
"0.6487479",
"0.6479882",
"0.64650625",
"0.64650625",
"0.64604414",
"0.63897806",
"0.63681376",
"0.63280916",
"0.63... | 0.8324284 | 0 |
Gets the client_node_edge_point of this ConnectionEndPoint. | def client_node_edge_point(self) -> List[str]:
return self._client_node_edge_point | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def client_node_edge_point(self, client_node_edge_point: List[str]):\n\n self._client_node_edge_point = client_node_edge_point",
"def parent_node_edge_point(self) -> List[str]:\n return self._parent_node_edge_point",
"def edges_parent(self):\n return self._edges_parent",
"def get_edge_co... | [
"0.7040182",
"0.6694296",
"0.6014033",
"0.579763",
"0.5779725",
"0.5725222",
"0.5720722",
"0.56671035",
"0.566444",
"0.5613887",
"0.56126505",
"0.5602985",
"0.55665207",
"0.5564498",
"0.5508583",
"0.55030704",
"0.54853576",
"0.54559284",
"0.545324",
"0.545324",
"0.54242283",
... | 0.78359306 | 0 |
Sets the client_node_edge_point of this ConnectionEndPoint. | def client_node_edge_point(self, client_node_edge_point: List[str]):
self._client_node_edge_point = client_node_edge_point | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parent_node_edge_point(self, parent_node_edge_point: List[str]):\n\n self._parent_node_edge_point = parent_node_edge_point",
"def setParent(self, edge):\n self.parent_edge = edge",
"def client_node_edge_point(self) -> List[str]:\n return self._client_node_edge_point",
"def set_node(s... | [
"0.64545894",
"0.5764588",
"0.5657335",
"0.5621235",
"0.56201965",
"0.5616962",
"0.54884785",
"0.54075307",
"0.53285813",
"0.5285194",
"0.527346",
"0.52295053",
"0.50200117",
"0.49891022",
"0.4982168",
"0.49503762",
"0.49278897",
"0.49262947",
"0.49262947",
"0.49262947",
"0.4... | 0.84220517 | 0 |
Gets the connection_port_direction of this ConnectionEndPoint. | def connection_port_direction(self) -> str:
return self._connection_port_direction | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_port_direction(self, port):\n if port == 1:\n self.__port_b_direction = self.__bus.read_byte_data(\n self.__ioaddress, self.IODIRB)\n return self.__port_b_direction\n else:\n self.__port_a_direction = self.__bus.read_byte_data(\n ... | [
"0.7422299",
"0.7100193",
"0.6954227",
"0.6906184",
"0.6850313",
"0.6784414",
"0.6750329",
"0.6648726",
"0.6547236",
"0.65026873",
"0.64180374",
"0.6364987",
"0.63177645",
"0.6307946",
"0.6284133",
"0.6239046",
"0.62192076",
"0.6218952",
"0.6201423",
"0.6183298",
"0.61322004"... | 0.8515388 | 0 |
Sets the connection_port_direction of this ConnectionEndPoint. | def connection_port_direction(self, connection_port_direction: str):
allowed_values = ["BIDIRECTIONAL", "INPUT", "OUTPUT", "UNIDENTIFIED_OR_UNKNOWN"] # noqa: E501
if connection_port_direction not in allowed_values:
raise ValueError(
"Invalid value for `connection_port_direct... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_port_direction(self, port, direction):\n\n if port == 1:\n self.__bus.write_byte_data(\n self.__ioaddress, self.IODIRB, direction)\n self.__port_b_direction = direction\n else:\n self.__bus.write_byte_data(\n self.__ioaddress, sel... | [
"0.72491103",
"0.6883171",
"0.61560464",
"0.59813505",
"0.5803918",
"0.5802289",
"0.5751801",
"0.56792367",
"0.56702006",
"0.56702006",
"0.5623771",
"0.5623771",
"0.5603514",
"0.55927914",
"0.558962",
"0.5573132",
"0.55627877",
"0.5492916",
"0.5368065",
"0.53601414",
"0.53387... | 0.77216226 | 0 |
Gets the connection_port_role of this ConnectionEndPoint. | def connection_port_role(self) -> str:
return self._connection_port_role | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def connection_port_role(self, connection_port_role: str):\n allowed_values = [\"SYMMETRIC\", \"ROOT\", \"LEAF\", \"TRUNK\", \"UNKNOWN\"] # noqa: E501\n if connection_port_role not in allowed_values:\n raise ValueError(\n \"Invalid value for `connection_port_role` ({0}), mu... | [
"0.6675221",
"0.6536682",
"0.64771336",
"0.643482",
"0.63028085",
"0.62838185",
"0.62733996",
"0.62726057",
"0.6268773",
"0.61741924",
"0.61579907",
"0.61579907",
"0.61579907",
"0.6105567",
"0.6075074",
"0.5997939",
"0.59857833",
"0.59406775",
"0.59406775",
"0.59406775",
"0.5... | 0.8586469 | 0 |
Sets the connection_port_role of this ConnectionEndPoint. | def connection_port_role(self, connection_port_role: str):
allowed_values = ["SYMMETRIC", "ROOT", "LEAF", "TRUNK", "UNKNOWN"] # noqa: E501
if connection_port_role not in allowed_values:
raise ValueError(
"Invalid value for `connection_port_role` ({0}), must be one of {1}"
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def connection_port_role(self) -> str:\n return self._connection_port_role",
"def set_port(self, party_port) -> None:\n\n self._port = party_port",
"def setport(self, port):\n self.__port = port",
"def set_task_role(self, task_role):\n self._task_role = task_role",
"def port(sel... | [
"0.7050339",
"0.5935539",
"0.58579373",
"0.5754634",
"0.56839955",
"0.56839955",
"0.56839955",
"0.55978996",
"0.5477563",
"0.5477563",
"0.540866",
"0.5401389",
"0.5297533",
"0.5271658",
"0.5263875",
"0.5263875",
"0.5228858",
"0.51936316",
"0.51936316",
"0.5122609",
"0.511871"... | 0.7690575 | 0 |
Method call or numba function call. | def infer_function_call(func, func_type, argtypes):
from numba2 import phase
if is_method(func_type):
func = func_type.parameters[0]
argtypes = [func_type.parameters[1]] + list(argtypes)
else:
func = func.const
# TODO: Support recursion !
if len(func.overloads) == 1 and no... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __call__(self, *args, **kwargs):\n if Numba.numba_flag:\n return self.numba_fn(*args, **kwargs)\n else:\n return self.function(*args, **kwargs)",
"def njit(func):\n return func",
"def jit(func):\n return func",
"def __call__(self, *args, **kwargs):\n ... | [
"0.7774511",
"0.69152695",
"0.69043785",
"0.6508708",
"0.62388897",
"0.6089687",
"0.60264933",
"0.58314914",
"0.5830994",
"0.5821419",
"0.573364",
"0.5721394",
"0.571856",
"0.5670722",
"0.564891",
"0.55674577",
"0.5557046",
"0.5556176",
"0.5554894",
"0.5538145",
"0.5538092",
... | 0.5141022 | 80 |
Higherorder or foreign function call. | def infer_foreign_call(func, func_type, argtypes):
if isinstance(func_type, type(ForeignFunction.type)):
restype = func_type.parameters[-1]
else:
restype = func_type.restype
assert restype
expected_argtypes = func_type.parameters[:-1]
if len(argtypes) != len(expected_argtypes):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def call(fn, arg):\n return fn(arg)",
"def __call__(fun_name):",
"def getCallable():",
"def squared_call(fn, arg):\n return fn(fn(arg))",
"def callFunction(cmdname, far_args, far_kwargs, fn):\n ret = None\n if fn not in registered_functions:\n print(\"%s is not a registered function!\" ... | [
"0.6889919",
"0.6788659",
"0.6307136",
"0.62818515",
"0.6266402",
"0.6254093",
"0.6238643",
"0.62148356",
"0.62122935",
"0.61882347",
"0.6185572",
"0.6116538",
"0.61162215",
"0.6050042",
"0.6017386",
"0.59931475",
"0.598559",
"0.5906095",
"0.5900978",
"0.58963853",
"0.5888179... | 0.5608427 | 63 |
Resolve the free type variables of a constructor given the argument types we instantiate the class with. This means we need to match up argument types with variables from the class layout. In the most general case this means we need to fixpoint infer all methods called from the constructor. | def infer_constructor_application(classtype, argtypes):
# Figure out the list of argtypes
cls = classtype.impl
init = cls.__init__.py_func
argtypes = fill_missing_argtypes(init, tuple(argtypes))
# Determine __init__ argnames
argspec = inspect.getargspec(init)
assert not argspec.varargs
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n self.types = tuple([trait_from(arg) for arg in args])\n self.fast_validate = (9, self.types)",
"def resolve_types(cls, types: dict) -> Callable:\n return functools.partial(resolve_annotations, annotations=cls.annotations(types))",
"def __init__(self):\n\n ... | [
"0.61208606",
"0.59640104",
"0.5496596",
"0.5320413",
"0.5247586",
"0.52279824",
"0.5196888",
"0.5152734",
"0.510851",
"0.50768083",
"0.50480545",
"0.50430393",
"0.5022698",
"0.4972331",
"0.4889604",
"0.48878282",
"0.48712242",
"0.48436376",
"0.48328483",
"0.4810371",
"0.4807... | 0.6475425 | 0 |
Reduce typesets in context to concrete types | def resolve_context(func, env):
context = env['numba.typing.context']
for op, typeset in context.iteritems():
if typeset:
typeset = context[op]
ty = reduce(typejoin, typeset)
context[op] = ty | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resolve_type_ids(self):\n if self.general_class_id:\n if self.general_class_id in class_ids:\n self.general_class_name = class_ids[self.general_class_id]\n else:\n if self.general_class_id in type_ids:\n self.general_class_name = typ... | [
"0.6163247",
"0.5993135",
"0.5961664",
"0.5946467",
"0.5816547",
"0.57802767",
"0.5702545",
"0.5683598",
"0.56820464",
"0.566387",
"0.5652343",
"0.559704",
"0.5565866",
"0.5558429",
"0.5517922",
"0.5517168",
"0.55133927",
"0.5505203",
"0.5485516",
"0.5485516",
"0.54698324",
... | 0.5572893 | 12 |
Figure out the return type and update the context and environment | def resolve_restype(func, env):
context = env['numba.typing.context']
restype = env['numba.typing.restype']
signature = env['numba.typing.signature']
typeset = context['return']
inferred_restype = signature.restype
if restype is None:
restype = inferred_restype
elif inferred_restyp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def return_type(self) -> global___Type:",
"def rewrite_obj_return(func, env):\n if should_skip(env):\n return\n\n context = env['flypy.typing.context']\n restype = env['flypy.typing.restype']\n envs = env['flypy.state.envs']\n\n builder = Builder(func)\n\n stack_alloc = representation.b... | [
"0.58463246",
"0.5750338",
"0.5705108",
"0.56992507",
"0.5660275",
"0.55798984",
"0.55311066",
"0.54159474",
"0.53862745",
"0.5343846",
"0.53255534",
"0.53012425",
"0.5266832",
"0.5252578",
"0.5242432",
"0.52265376",
"0.5226442",
"0.51677936",
"0.5105955",
"0.5085858",
"0.506... | 0.52305526 | 15 |
Create a new test task instance. | def make_task(layout_parameters=None):
if not layout_parameters:
layout_parameters = {
'image_url': 'http://herp.com/derp'
}
return CategorizationTaskFixture(**layout_parameters) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_task():",
"def SetUp(self):\n parser = argparse.ArgumentParser()\n parser.add_argument('--task-hash')\n args, _ = parser.parse_known_args()\n\n self.task = self.CreateNewTask(\n isolated_hash=args.task_hash,\n dimensions={'os': 'Ubuntu-14.04'},\n idle_timeout_secs=90, ... | [
"0.74645835",
"0.73350215",
"0.7079784",
"0.7044",
"0.7044",
"0.7025469",
"0.6990232",
"0.6966778",
"0.69381857",
"0.69345254",
"0.6912312",
"0.68426013",
"0.68143284",
"0.68067276",
"0.67731696",
"0.67693186",
"0.6753566",
"0.6748141",
"0.67101824",
"0.6696384",
"0.6658491",... | 0.60423136 | 63 |
Creates a new boto assignment mock class with the given fields supplied with the specified values. | def make_boto_assignment(values):
assignment = mock.MagicMock()
assignment.AssignmentId = str(uuid.uuid4())
assignment.HITId = str(uuid.uuid4())
assignment.WorkerId = str(uuid.uuid4())
assignment.answers = [[]]
for key, value in values.items():
answer_mock = mock.MagicMock()
ans... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, **attributes):\n self.set(**attributes)",
"def __init__(self, **kwargs):\n default_values = {\n 'name': 'Organization Name',\n 'ubi': 'Unified Business Identifier',\n 'address_line_1': '',\n 'address_line_2': '',\n 'city': ''... | [
"0.5649793",
"0.56196696",
"0.561045",
"0.55781025",
"0.54637",
"0.5424052",
"0.53738207",
"0.53738207",
"0.5343687",
"0.53170776",
"0.526791",
"0.52672625",
"0.5237828",
"0.52287626",
"0.52287626",
"0.52287626",
"0.5224568",
"0.52163136",
"0.52153605",
"0.52097565",
"0.52061... | 0.73545164 | 0 |
Create a new random HIT. | def make_boto_hit(hit_id=None, batch_id=None):
hit = mock.MagicMock()
hit.HITId = (hit_id if hit_id else str(uuid.uuid4()))
hit.RequesterAnnotation = (batch_id if batch_id else str(uuid.uuid4()))
return hit | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_hit(client, hit_info):\n hit_id = \"\"\n hit_type = hit_info.type\n assert(hit_type in ['gen', 'val'])\n if hit_type == 'gen':\n hit = create_generation_hit(client, hit_info)\n else:\n hit = create_validation_hit(client, hit_info)\n hit_id = hit['HIT']['HITId']\n # for... | [
"0.72450894",
"0.7173522",
"0.6329977",
"0.6214311",
"0.61912435",
"0.60509384",
"0.5991735",
"0.5664234",
"0.55024976",
"0.54898274",
"0.54750925",
"0.54602623",
"0.53949416",
"0.5280057",
"0.52617675",
"0.5224785",
"0.52216506",
"0.52157634",
"0.52018136",
"0.5199971",
"0.5... | 0.62982553 | 3 |
Assert two lists almost equal. | def assertDictAlmostEqual(self, dict1, dict2):
self.assertListEqual(dict1.keys(), dict2.keys())
for i, j in zip(dict1.keys(), dict2.keys()):
self.assertListAlmostEqual(list(dict1[i]), list(dict2[j])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def assertListEqual(self, list1, list2, msg=None):\r\n self.assertSequenceEqual(list1, list2, msg, seq_type=list)",
"def assert_lists_equal (a, b):\n assert len(a) == len(b)\n for index, expected in enumerate(a):\n actual = b[index]\n if isinstance(actual,str) and isinstance(expected, ... | [
"0.78839517",
"0.7867425",
"0.7808863",
"0.77782553",
"0.7636701",
"0.76267934",
"0.7588335",
"0.75672525",
"0.74624133",
"0.7422582",
"0.73967344",
"0.73932785",
"0.73869914",
"0.71999514",
"0.71991336",
"0.71881765",
"0.7184004",
"0.7180751",
"0.7178104",
"0.71668005",
"0.7... | 0.0 | -1 |
Assert two lists almost equal. | def assertListAlmostEqual(self, list1, list2):
for i, j in zip(list1, list2):
rounded_i, rounded_j = self.round_values(i, j)
self.assertAlmostEqual(rounded_i, rounded_j) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def assertListEqual(self, list1, list2, msg=None):\r\n self.assertSequenceEqual(list1, list2, msg, seq_type=list)",
"def assert_lists_equal (a, b):\n assert len(a) == len(b)\n for index, expected in enumerate(a):\n actual = b[index]\n if isinstance(actual,str) and isinstance(expected, ... | [
"0.7885452",
"0.7868807",
"0.7810357",
"0.77803063",
"0.7637246",
"0.7626845",
"0.7587751",
"0.75673944",
"0.74629027",
"0.7420716",
"0.7399396",
"0.73926336",
"0.7385423",
"0.72009677",
"0.7188644",
"0.7184486",
"0.71817434",
"0.71804357",
"0.71670157",
"0.70920306",
"0.7074... | 0.71981436 | 14 |
Adds some html content after the first plugin from a specific placeholder gets rendered | def add_extra_html(instance, placeholder, rendered_content, original_context):
html_before = getattr(placeholder, '_extra_html_before', '')
html_after = getattr(placeholder, '_extra_html_after', '')
if not html_before and not html_after:
return rendered_content
template_data = ['{{rendered_cont... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_render_placeholder_cache(self):\n invalidate_cms_page_cache()\n ex = Example1(\n char_1='one',\n char_2='two',\n char_3='tree',\n char_4='four'\n )\n ex.save()\n ph1 = ex.placeholder\n ###\n # add the test plugin\... | [
"0.6580603",
"0.6060545",
"0.58660084",
"0.5402581",
"0.5378079",
"0.53726566",
"0.53519636",
"0.5350145",
"0.5341262",
"0.5288138",
"0.52814656",
"0.5248689",
"0.52272385",
"0.52205735",
"0.5199112",
"0.51644737",
"0.5150898",
"0.5070091",
"0.5054961",
"0.4986646",
"0.497368... | 0.61032104 | 1 |
Test task with error in command. | def test_cmd_error(self):
task = Task("uid", False, False, "does_not_exist", None, ".")
task._checkpoint_dir = tmp_checkpoint_dir()
with self.assertRaisesRegexp(RuntimeError, ".*executing Task's command:.*"):
task.run()
task.shell = True
with self.assertRaisesRegexp(R... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_verify_error(self):\n task = Task(\"uid\", False, False, \"echo\", \"does_not_exist\", \".\", \"A\")\n task._checkpoint_dir = tmp_checkpoint_dir()\n with self.assertRaisesRegexp(RuntimeError, \".*executing Task's verification:.*\"):\n task.run()\n task.shell = True\n... | [
"0.753934",
"0.7510016",
"0.7355977",
"0.7223339",
"0.68849444",
"0.67912555",
"0.67883474",
"0.6771038",
"0.67178786",
"0.67099845",
"0.6694828",
"0.669401",
"0.6689271",
"0.6554793",
"0.6538062",
"0.6508295",
"0.647738",
"0.64662874",
"0.6459306",
"0.6447651",
"0.64386034",... | 0.8290416 | 0 |
Test task with error in verification. | def test_verify_error(self):
task = Task("uid", False, False, "echo", "does_not_exist", ".", "A")
task._checkpoint_dir = tmp_checkpoint_dir()
with self.assertRaisesRegexp(RuntimeError, ".*executing Task's verification:.*"):
task.run()
task.shell = True
with self.asser... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _test_run_with_short_error_msg(self, task_class):\r\n task_entry = self._create_input_entry()\r\n self.define_option_problem(PROBLEM_URL_NAME)\r\n expected_message = \"x\" * 900\r\n with self.assertRaises(TestTaskFailure):\r\n self._run_task_with_mock_celery(task_class, t... | [
"0.73252994",
"0.73072",
"0.73054326",
"0.7165724",
"0.7095742",
"0.70697004",
"0.70417243",
"0.69686437",
"0.6939323",
"0.67261666",
"0.6702976",
"0.66879827",
"0.661982",
"0.6608488",
"0.6605837",
"0.6578812",
"0.6557815",
"0.65573394",
"0.650568",
"0.6491746",
"0.64669424"... | 0.817874 | 0 |
function for generating the descriptions of line edits | def line_edits(s1, s2):
l1 = s1.splitlines()
l2 = s2.splitlines()
result = editDistance(l1, l2)
result = result[::-1]
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def summary_line_and_description():",
"def description():",
"def _gen_conf_changes_text(action, title, conf_list):\n if not (conf_list and\n any(c.dirty or c.has_moved for c in conf_list)):\n return \"\"\n\n lines = [\"%s %s Changes:\" % (action, title)]\n\n if an... | [
"0.7497126",
"0.65555114",
"0.6327191",
"0.6170319",
"0.6153949",
"0.61036456",
"0.6098615",
"0.6058097",
"0.6036321",
"0.6011428",
"0.6007659",
"0.591399",
"0.58425575",
"0.57923716",
"0.57755053",
"0.57566696",
"0.5752177",
"0.5752177",
"0.5745361",
"0.5731556",
"0.57275164... | 0.0 | -1 |
Helper function to generate the table for line edits | def editDistance(l1, l2):
cache = [[None for i in range(len(l2) + 1)] for j in range(len(l1) + 1)]
for row in range(len(l1) + 1):
for col in range(len(l2) + 1):
if row == 0 and col == 0:
cache[row][col] = 0
elif col == 0:
cache[row][col] = row... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_table(self, rows):\n ...",
"def generate_table(start_int=0, end_int=10, table_type='Addition'):\n lines = [r'\\documentclass{article}',\n r'\\usepackage{geometry}',\n r'\\geometry{landscape,a4paper,total={170mm,257mm},left=10mm,right=10mm,top=10mm}',\n r... | [
"0.74660087",
"0.6998546",
"0.6623267",
"0.6529327",
"0.6408147",
"0.64029264",
"0.63995045",
"0.63801795",
"0.6316316",
"0.6310929",
"0.6249782",
"0.6230088",
"0.62158096",
"0.62117547",
"0.6202375",
"0.620003",
"0.61662304",
"0.60670525",
"0.60650456",
"0.60551596",
"0.6052... | 0.0 | -1 |
Helper function to find the result after the table has been built | def findResult(l1, l2, table):
rowH = len(l1)
colH = len(l2)
resultH = []
while rowH != 0 or colH != 0:
if colH == 0:
action = ('D', l1[rowH - 1], "")
resultH.append(action)
rowH = rowH - 1
elif rowH == 0:
action = ('I', "", l2[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getResults():",
"def get_result_from_db() -> list:\n global choice, confirmation, res, data, column_names, result, choice_row\n column_names = data[0]\n try:\n confirmation.after(1, confirmation.destroy)\n except AttributeError:\n pass\n choice_row = choice.get()\n res = place... | [
"0.6065398",
"0.60606635",
"0.579604",
"0.579604",
"0.57226276",
"0.56722236",
"0.5669099",
"0.5644754",
"0.56414014",
"0.56361836",
"0.5597868",
"0.5596389",
"0.5557703",
"0.54942703",
"0.54749554",
"0.5449439",
"0.54475933",
"0.54293776",
"0.54281586",
"0.5392873",
"0.53791... | 0.57780755 | 4 |
helper method to shorten the above function | def otherHelper(table, l, rowH, colH, resultH):
l1 = l[0]
l2 = l[1]
delete = table[rowH - 1][colH]
insert = table[rowH][colH - 1]
sub = table[rowH - 1][colH - 1]
if delete <= insert and delete <= sub:
action = ('D', l1[rowH - 1], "")
resultH.append(action)
rowH = row... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fn():",
"def func():",
"def substantiate():",
"def exo2():",
"def sth():",
"def regular(self):",
"def apply(self) -> None:",
"def apply(self) -> None:",
"def common(self):",
"def apply(self):",
"def firstFunction(self):",
"def degibber(self):",
"def decide():",
"def othersn(ax):",
"... | [
"0.56646234",
"0.5632424",
"0.5554382",
"0.5520358",
"0.55145586",
"0.54825443",
"0.5387532",
"0.5387532",
"0.5269125",
"0.5217409",
"0.5140619",
"0.50795215",
"0.49901628",
"0.49571893",
"0.4942869",
"0.49418196",
"0.49272615",
"0.4917055",
"0.4917055",
"0.4917055",
"0.49170... | 0.0 | -1 |
Construct a DRACClient object. | def __init__(self,
host,
username,
password,
port=443,
path='/wsman',
protocol='https'):
super(DRACClient, self).__init__(host,
username,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_client(module):\n return drac.DRACClient(module.params['address'],\n module.params['username'],\n module.params['password'])",
"def create_client(self) -> None:\n pass",
"def make_client(self, context):\n return Client(self.settings['cl... | [
"0.731251",
"0.6760065",
"0.668501",
"0.6536412",
"0.65270746",
"0.63909245",
"0.6284677",
"0.620196",
"0.61975485",
"0.60959625",
"0.6076322",
"0.6018238",
"0.6010283",
"0.5998304",
"0.5979212",
"0.59573156",
"0.58859664",
"0.5884003",
"0.58797115",
"0.587745",
"0.5876225",
... | 0.6468904 | 5 |
List the iDRAC configuration settings | def list_idrac_settings(self):
return self._idrac_cfg.list_idrac_settings() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list_config():\n console = Console()\n _config = loadConfig()\n json_data = richJSON.from_data({**asdict(_config)})\n console.print(Panel(json_data, title=\"SubmarineCliConfig\"))",
"def list_conf(self, kwargs):\n self.display(\n self.engine.query(\n self.engine.A... | [
"0.6941069",
"0.68482906",
"0.6822821",
"0.6753772",
"0.63854384",
"0.6331615",
"0.6239787",
"0.6238235",
"0.62348956",
"0.62288743",
"0.61923677",
"0.6163021",
"0.6163021",
"0.61327124",
"0.61241364",
"0.60989195",
"0.6065206",
"0.6030643",
"0.599483",
"0.59766704",
"0.59615... | 0.7821567 | 0 |
Sets the iDRAC configuration settings To be more precise, it sets the pending_value parameter for each of the attributes passed in. For the values to be applied, a config job must be created and the node must be rebooted. | def set_idrac_settings(self, settings, idrac_fqdd='iDRAC.Embedded.1'):
return self._idrac_cfg.set_idrac_settings(idrac_fqdd, settings) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_config(self, attr, value):\n setattr(self.config, attr, value)",
"def set_config(self, attr, value):\n setattr(self.config, attr, value)",
"def set_attributes(self, settings):\n\n for key, value in settings.items():\n self.__dict__[key] = value",
"def set_config(self):... | [
"0.53611195",
"0.53611195",
"0.5321592",
"0.5236295",
"0.51050615",
"0.5098816",
"0.50828445",
"0.507972",
"0.5071323",
"0.50653404",
"0.504535",
"0.50365037",
"0.5032541",
"0.4991661",
"0.49662307",
"0.49394777",
"0.49377403",
"0.4928978",
"0.49151433",
"0.48917764",
"0.4861... | 0.0 | -1 |
Resets the iDRAC and waits for it to become ready | def wait_until_idrac_is_reset(self, force=False):
return_value = self.reset_idrac(force)
if not return_value:
LOG.debug("iDRAC failed to reset")
raise exceptions.DRACOperationFailed(
drac_messages="Failed to reset iDRAC")
else:
LOG.debug("iDRA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reset(self):\r\r\n self.read(\"*cls\")\r\r\n self.waitForCompletion()\r\r\n self.read(\"*RST\") # Reset and query\r\r\n self.dev.write(\"*cls\")\r\r\n while self.read(\"*OPC?\") != \"1\": time.sleep(1) # Wait until completion\r\r",
"def reset(self):\r\n ... | [
"0.74059904",
"0.695049",
"0.68738836",
"0.68738836",
"0.68738836",
"0.68738836",
"0.65358484",
"0.64857125",
"0.6345814",
"0.63309604",
"0.6308559",
"0.6298436",
"0.62784666",
"0.6268796",
"0.62323695",
"0.62190545",
"0.6184748",
"0.6148",
"0.61226463",
"0.61175823",
"0.6086... | 0.6479875 | 8 |
Creates a configuration job for applying all pending changes to an iDRAC. | def commit_pending_idrac_changes(
self,
idrac_fqdd='iDRAC.Embedded.1',
reboot=False,
start_time='TIME_NOW'):
return self._job_mgmt.create_config_job(
resource_uri=uris.DCIM_iDRACCardService,
cim_creation_class_name='DCIM_iDRACCardService',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def commit_pending_raid_changes(self, raid_controller, reboot=False,\n start_time='TIME_NOW'):\n return self._job_mgmt.create_config_job(\n resource_uri=ironic_uris.DCIM_RAIDService,\n cim_creation_class_name='DCIM_RAIDService',\n cim_name=... | [
"0.5808297",
"0.57016754",
"0.5615414",
"0.55733514",
"0.5548497",
"0.53404003",
"0.52409655",
"0.5188993",
"0.51454985",
"0.51232415",
"0.51201946",
"0.51161766",
"0.5100845",
"0.50881994",
"0.5061088",
"0.50133616",
"0.50033385",
"0.49992248",
"0.49333566",
"0.4930864",
"0.... | 0.6341404 | 0 |
Abandon all pending changes to a NIC. | def abandon_pending_idrac_changes(self, idrac_fqdd):
self._job_mgmt.delete_pending_config(
resource_uri=uris.DCIM_iDRACCardService,
cim_creation_class_name='DCIM_iDRACCardService',
cim_name='DCIM:iDRACCardService',
target=idrac_fqdd) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def abandon_pending_nic_changes(self, nic_id):\n self._job_mgmt.delete_pending_config(\n resource_uri=uris.DCIM_NICService,\n cim_creation_class_name='DCIM_NICService',\n cim_name='DCIM:NICService',\n target=nic_id)",
"def forget(self):\n self.ingress_tbl... | [
"0.6978521",
"0.62820935",
"0.62222147",
"0.59524524",
"0.5868029",
"0.58616334",
"0.5857593",
"0.5759517",
"0.5758769",
"0.5705075",
"0.5650668",
"0.56465757",
"0.5581244",
"0.5578446",
"0.5569457",
"0.55536485",
"0.553538",
"0.55298567",
"0.55264544",
"0.5520953",
"0.551223... | 0.5237448 | 59 |
Applies all pending changes on the BIOS by creating a config job | def commit_pending_bios_changes(self, reboot=False, start_time='TIME_NOW'):
return self._job_mgmt.create_config_job(
resource_uri=ironic_uris.DCIM_BIOSService,
cim_creation_class_name='DCIM_BIOSService',
cim_name='DCIM:BIOSService',
target=self.BIOS_DEVICE_FQDD,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply(self) -> None:\n _ba.apply_config()",
"def update(cfg, jobs):\n server = jenkins_utils.server_factory(cfg)\n libjobs.updateJobs(server, jobs)",
"def work(self):\n self.config_file = self.args.config\n self.init_config()\n self.init_db()\n\n self.kickoff()",
... | [
"0.6116701",
"0.58427554",
"0.5800472",
"0.57430637",
"0.5740192",
"0.57239777",
"0.5652123",
"0.5632307",
"0.550247",
"0.54999334",
"0.54730254",
"0.54384893",
"0.5424404",
"0.5407469",
"0.53721374",
"0.535191",
"0.53240836",
"0.53215873",
"0.5314885",
"0.52854794",
"0.52800... | 0.61689615 | 0 |
Abandon all pending changes to a NIC. | def abandon_pending_nic_changes(self, nic_id):
self._job_mgmt.delete_pending_config(
resource_uri=uris.DCIM_NICService,
cim_creation_class_name='DCIM_NICService',
cim_name='DCIM:NICService',
target=nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def forget(self):\n self.ingress_tbl.clear()\n self.rootsw_tbl.clear()",
"def wifi_off(self):\n self._clear_read_buffer()\n self._write_cmd(\"PE00\")\n time.sleep(100e-3)",
"def off_all(self):\n self._set_status(\"off\", \"11111111\")",
"def test_cancel_changes(self)... | [
"0.6279971",
"0.6219855",
"0.5948782",
"0.5866468",
"0.5858203",
"0.58529437",
"0.5757653",
"0.5757473",
"0.57033193",
"0.5649227",
"0.5646219",
"0.5580135",
"0.5578004",
"0.5567007",
"0.5552631",
"0.5535985",
"0.5527143",
"0.5524624",
"0.5520514",
"0.5509373",
"0.5508314",
... | 0.6980403 | 0 |
Apply all pending changes to a NIC by creating a configuration job. | def commit_pending_nic_changes(self, nic_id, reboot=False):
return self._job_mgmt.create_config_job(
resource_uri=uris.DCIM_NICService,
cim_creation_class_name='DCIM_NICService',
cim_name='DCIM:NICService',
target=nic_id,
reboot=reboot) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply(self, cleanup=False, activate=True):\n logger.info('applying network configs...')\n restart_interfaces = []\n restart_bridges = []\n update_files = {}\n all_file_names = []\n\n for interface_name, iface_data in self.interface_data.iteritems():\n route_... | [
"0.61803114",
"0.61700237",
"0.61677605",
"0.59301126",
"0.5694504",
"0.56244195",
"0.5596565",
"0.5453252",
"0.54015476",
"0.52718323",
"0.5243111",
"0.52348137",
"0.523452",
"0.51573193",
"0.5134133",
"0.51217157",
"0.5073438",
"0.50459903",
"0.5040554",
"0.49998853",
"0.49... | 0.7144519 | 0 |
Creates a configuration job. In CIM (Common Information Model), weak association is used to name an instance of one class in the context of an instance of another class. SystemName and SystemCreationClassName are the attributes of the scoping system, while Name and CreationClassName are the attributes of the instance o... | def create_config_job(self,
resource_uri,
cim_creation_class_name,
cim_name,
target,
cim_system_creation_class_name='DCIM_ComputerSystem',
cim_system_name='DCIM:Com... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def createJob(self, joboptions, previousId=None):\n root = self.manifest.getRootResource()\n assert self.manifest.tosca\n job = Job(self, root, joboptions, previousId)\n\n if (\n self.manifest.localEnv\n and not joboptions.parentJob\n and not joboptions.... | [
"0.5764026",
"0.5601463",
"0.55534786",
"0.55200636",
"0.5493523",
"0.5493523",
"0.54148227",
"0.5414623",
"0.5357444",
"0.5340673",
"0.52934015",
"0.52929705",
"0.5279595",
"0.5178549",
"0.51695275",
"0.515132",
"0.5135416",
"0.51059264",
"0.50979036",
"0.50941366",
"0.50646... | 0.7400147 | 0 |
Creates a configuration job for applying all pending changes to a NIC. | def create_nic_config_job(
self,
nic_id,
reboot=False,
start_time='TIME_NOW'):
return self._job_mgmt.create_config_job(
resource_uri=uris.DCIM_NICService,
cim_creation_class_name='DCIM_NICService',
cim_name='DCIM:NICService',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def commit_pending_nic_changes(self, nic_id, reboot=False):\n return self._job_mgmt.create_config_job(\n resource_uri=uris.DCIM_NICService,\n cim_creation_class_name='DCIM_NICService',\n cim_name='DCIM:NICService',\n target=nic_id,\n reboot=reboot)",
... | [
"0.6852771",
"0.57400745",
"0.5662997",
"0.55841076",
"0.52505565",
"0.5179049",
"0.5168917",
"0.5116165",
"0.50684077",
"0.50249934",
"0.50060546",
"0.49951974",
"0.49877572",
"0.4984114",
"0.49398127",
"0.48890617",
"0.4845154",
"0.48202658",
"0.4804889",
"0.47988567",
"0.4... | 0.63792557 | 1 |
Creates a reboot job. | def create_reboot_job(self,
reboot_type='graceful_reboot_with_forced_shutdown'):
return self._job_mgmt.create_reboot_job(reboot_type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_job_schedule(self):\n job_schedule_create = netapp_utils.zapi\\\n .NaElement.create_node_with_children(\n 'job-schedule-cron-create',\n **{'job-schedule-name': self.name})\n job_schedule_create.add_node_with_children(\n 'job-schedule-cron... | [
"0.57708925",
"0.5769493",
"0.5592167",
"0.55431616",
"0.5505705",
"0.5497413",
"0.53705674",
"0.53681993",
"0.5323312",
"0.5316519",
"0.5298177",
"0.5262912",
"0.52624005",
"0.5249387",
"0.52462703",
"0.5241022",
"0.5220556",
"0.5172969",
"0.51569784",
"0.50932425",
"0.50894... | 0.8060909 | 0 |
Deletes the given jobs. If no jobs are given, all jobs are deleted. | def delete_jobs(self, job_ids=['JID_CLEARALL']):
return self._job_mgmt.delete_jobs(job_ids) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete(self, jobs):\n assert isinstance(jobs, list), 'Jobs must be a list'\n assert len(jobs) > 0, 'One or more jobs required'\n\n req = list()\n if len(jobs) > 1:\n for r in self._batch_request(jobs):\n req.append(\n ''.join([self._sched... | [
"0.8024807",
"0.7764335",
"0.73224807",
"0.72803247",
"0.7052461",
"0.6834618",
"0.68255013",
"0.67485654",
"0.6677148",
"0.6632033",
"0.6413806",
"0.6378145",
"0.63686645",
"0.63380384",
"0.63329905",
"0.6238826",
"0.6130432",
"0.61263555",
"0.612368",
"0.6074361",
"0.606865... | 0.8079405 | 0 |
Obtain the legacy, nonUEFI, boot protocol of a NIC. | def get_nic_legacy_boot_protocol(self, nic_id):
return self._nic_cfg.get_nic_legacy_boot_protocol(nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_nic_legacy_boot_protocol(self, nic_id, value):\n return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, value)",
"def set_nic_legacy_boot_protocol_none(self, nic_id):\n return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, 'NONE')",
"def set_nic_legacy_boot_protocol_pxe(self, nic_i... | [
"0.69560814",
"0.66056216",
"0.63252735",
"0.62761366",
"0.610527",
"0.59243083",
"0.58971286",
"0.5884942",
"0.58824575",
"0.58585525",
"0.58509755",
"0.5845862",
"0.580865",
"0.57988596",
"0.5784832",
"0.57732546",
"0.5768472",
"0.57367367",
"0.57293147",
"0.5726689",
"0.57... | 0.81074166 | 0 |
Obtain the link status, up or down, of a NIC. | def get_nic_link_status(self, nic_id):
return self._nic_mgmt.get_nic_link_status(nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_interface_status(conn_obj, interface, device=\"dut\"):\n command = \"cat /sys/class/net/{}/operstate\".format(interface)\n if device==\"dut\":\n return utils_obj.remove_last_line_from_string(st.show(conn_obj, command, skip_tmpl=True))",
"def IsLinkup(nic,timeout):\n nic = nic.strip()\n ... | [
"0.6978756",
"0.6962209",
"0.68197346",
"0.63944924",
"0.6278568",
"0.6132206",
"0.6125867",
"0.6125867",
"0.60397744",
"0.6013797",
"0.6013276",
"0.59495616",
"0.5935399",
"0.5887618",
"0.5884482",
"0.5877811",
"0.58749413",
"0.5842111",
"0.5832965",
"0.5764003",
"0.5742055"... | 0.7465701 | 0 |
Obtain a setting of a NIC. | def get_nic_setting(self, nic_id, attribute_name):
return self._nic_cfg.get_nic_setting(nic_id, attribute_name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_nic_settings(bmc):\n nic_settings = bmc.list_nics()\n return nic_settings",
"def get_setting(self, setting):\n return self.do_rpc(\"get_setting\", key=key)",
"def set_nic_setting(self, nic_id, attribute_name, value):\n return self._nic_cfg.set_nic_setting(nic_id, attribute_name, val... | [
"0.6571858",
"0.61692965",
"0.590563",
"0.58731306",
"0.58425283",
"0.57504684",
"0.5736546",
"0.5717614",
"0.56472576",
"0.56174994",
"0.5604399",
"0.5568864",
"0.55311763",
"0.5528393",
"0.55063206",
"0.54884344",
"0.5479084",
"0.5471765",
"0.5459784",
"0.5432316",
"0.53471... | 0.7415658 | 0 |
Obtain the statistics of a NIC. | def get_nic_statistics(self, nic_id):
return self._nic_mgmt.get_nic_statistics(nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def net_if_stats():\n ret = {}\n rawdict = cext.net_if_stats()\n for name, items in rawdict.items():\n if not PY3:\n assert isinstance(name, unicode), type(name)\n name = py2_strencode(name)\n isup, duplex, speed, mtu = items\n if hasattr(_common, 'NicDuplex'):\n... | [
"0.7753599",
"0.6423824",
"0.6105017",
"0.61031115",
"0.6079203",
"0.6048821",
"0.6016919",
"0.6014767",
"0.60094005",
"0.60058945",
"0.59886146",
"0.59816986",
"0.59121054",
"0.5828287",
"0.5790003",
"0.5785249",
"0.5766392",
"0.5762208",
"0.57266897",
"0.5714033",
"0.570610... | 0.77570844 | 0 |
Return the system id. | def get_system_id(self):
return system.SystemManagement(self.client).get_system_id() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_system_id(self):\n return self.machine_config_file_value(\"DEFAULT.SID\").strip('\"')",
"def file_system_id(self) -> str:\n return pulumi.get(self, \"file_system_id\")",
"def get_clone_system_id(self):\n\n sys_id = self.user_systems_mgr.get_system_id()\n return sys_id",
"d... | [
"0.83615786",
"0.7682273",
"0.7644981",
"0.7439022",
"0.72430104",
"0.7030237",
"0.70283455",
"0.7012562",
"0.68498755",
"0.6808678",
"0.6769043",
"0.6738126",
"0.6701721",
"0.6693738",
"0.6680318",
"0.66737354",
"0.66718143",
"0.6656414",
"0.6632786",
"0.6624779",
"0.6610771... | 0.9230369 | 0 |
Return the system model name. | def get_system_model_name(self):
return system.SystemManagement(self.client).get_system_model_name() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_model_name(self) -> str:\n return self._get_string(openvr.Prop_RenderModelName_String)",
"def get_model_name(self):\n\n model_name = []\n model_name.append(self.get_model_type_hash())\n model_name.append(str(int(time.time())))\n return \"_\".join(model_name) + \".model\... | [
"0.8073972",
"0.7907462",
"0.7865882",
"0.7822895",
"0.77484596",
"0.77091956",
"0.7602069",
"0.7596205",
"0.7582411",
"0.75579596",
"0.74520415",
"0.73455113",
"0.7313186",
"0.72846437",
"0.7255404",
"0.7246455",
"0.72429657",
"0.72080094",
"0.7186412",
"0.71400344",
"0.7137... | 0.9344253 | 0 |
Return the system service tag. | def get_system_service_tag(self):
return system.SystemManagement(self.client).get_system_service_tag() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def service(self) -> str:\n return pulumi.get(self, \"service\")",
"def system_service_type(self) -> pulumi.Input[Union[str, 'SystemServiceType']]:\n return pulumi.get(self, \"system_service_type\")",
"def name(self):\n return \"systemd Service\"",
"def tag(self) -> str:\n return ... | [
"0.6653975",
"0.6572798",
"0.65147954",
"0.6493566",
"0.6415243",
"0.6226118",
"0.6220162",
"0.6183548",
"0.6183548",
"0.61804986",
"0.61804986",
"0.61804986",
"0.61514616",
"0.6142467",
"0.6142467",
"0.6120087",
"0.6049482",
"0.6047134",
"0.6006878",
"0.6002862",
"0.59983057... | 0.9170598 | 0 |
Return true if the legacy, nonUEFI, boot protocol of a NIC is NONE, false otherwise. | def is_nic_legacy_boot_protocol_none(self, nic_id):
return self._nic_cfg.is_nic_legacy_boot_protocol_none(nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_nic_legacy_boot_protocol_pxe(self, nic_id):\n return self._nic_cfg.is_nic_legacy_boot_protocol_pxe(nic_id)",
"def check_ethernet_network():\n default_iface = get_default_route()\n\n assert default_iface[1] == sc.conf.iface, \"incorrect sc.conf.iface\"\n iface_str = ''\n if sys.platform.... | [
"0.66154706",
"0.63741845",
"0.6357392",
"0.61974496",
"0.6125806",
"0.59614533",
"0.5941091",
"0.5925817",
"0.591169",
"0.58899873",
"0.5883946",
"0.58777124",
"0.5874255",
"0.5867285",
"0.586479",
"0.5854184",
"0.583347",
"0.5828231",
"0.58214307",
"0.5816505",
"0.5798436",... | 0.7572183 | 0 |
Return true if the legacy, nonUEFI, boot protocol of a NIC is PXE, false otherwise. | def is_nic_legacy_boot_protocol_pxe(self, nic_id):
return self._nic_cfg.is_nic_legacy_boot_protocol_pxe(nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _is_boot_mode_uefi(self):\n boot_mode = self.get_current_boot_mode()\n if boot_mode == 'UEFI':\n return True\n else:\n return False",
"def pilotIsBootValid (self):\n return self.isBootValid()",
"def set_nic_legacy_boot_protocol_pxe(self, nic_id):\n r... | [
"0.6369349",
"0.61551464",
"0.6151524",
"0.58789355",
"0.5854465",
"0.5850924",
"0.58316624",
"0.58264965",
"0.5778411",
"0.5718265",
"0.56990516",
"0.56512976",
"0.56229997",
"0.5622764",
"0.5621647",
"0.5593441",
"0.55838615",
"0.55536574",
"0.5550629",
"0.5543813",
"0.5538... | 0.7476674 | 0 |
Return true if the link status of a NIC is up, false otherwise. | def is_nic_link_up(self, nic_id):
return self._nic_mgmt.is_nic_link_up(nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IsLinkup(nic,timeout):\n nic = nic.strip()\n current = time.time()\n timeout += current\n while current < timeout:\n data = os.popen(\"ipconfig\").read().split(\"Ethernet adapter\")\n for item in data:\n if item.count(nic) and item.count(\"isconnected\") == 0: #Connected\n... | [
"0.7716848",
"0.72441226",
"0.7074061",
"0.70293516",
"0.6758236",
"0.6741784",
"0.67188364",
"0.66291785",
"0.66074085",
"0.6605761",
"0.6487093",
"0.64246756",
"0.6413659",
"0.63578165",
"0.6322977",
"0.62656623",
"0.6259921",
"0.62360674",
"0.6233668",
"0.62157416",
"0.621... | 0.78771025 | 0 |
Return the list of integrated NICs. | def list_integrated_nics(self, sort=False):
return self._nic_mgmt.list_integrated_nics(sort) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_network_interfaces(self):\n return self.mycam.devicemgmt.GetNetworkInterfaces()",
"def list():\n\n\treturn netifaces.interfaces()",
"def list_nics(self, sort=False):\n return self._nic_mgmt.list_nics(sort)",
"def find_nic():\n result = subprocess.run([\"iw\", \"dev\"], capture_output... | [
"0.7046846",
"0.6910179",
"0.67962945",
"0.6772716",
"0.67553645",
"0.6754463",
"0.6702723",
"0.65841603",
"0.6415843",
"0.63678586",
"0.6367431",
"0.6342075",
"0.63199943",
"0.63144964",
"0.6306874",
"0.6298536",
"0.62208396",
"0.6210721",
"0.6205201",
"0.61946857",
"0.61757... | 0.75222945 | 0 |
Return the list of attribute settings of a NIC. | def list_nic_settings(self, nic_id):
return self._nic_cfg.list_nic_settings(nic_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_nic_attributes(cls, interface):\n return NodeNICInterfaceClusterPlugin.\\\n get_all_enabled_attributes_by_interface(interface)",
"def get_nic_settings(bmc):\n nic_settings = bmc.list_nics()\n return nic_settings",
"def get_attribute_list(self):\n return self.dp.get_attrib... | [
"0.7211066",
"0.66627526",
"0.6172818",
"0.61454195",
"0.5977508",
"0.57929236",
"0.5752779",
"0.57477176",
"0.57086796",
"0.56704056",
"0.5659287",
"0.5601022",
"0.55941725",
"0.55941725",
"0.5570813",
"0.5560112",
"0.55204666",
"0.5490301",
"0.547466",
"0.54474443",
"0.5440... | 0.67747986 | 1 |
Return the list of NICs. | def list_nics(self, sort=False):
return self._nic_mgmt.list_nics(sort) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list():\n\n\treturn netifaces.interfaces()",
"def do_nic_list(cc, args):\n nics = cc.nic.list()\n names = ['%s (uuid) %s (mac)' % (nic.get('uuid'), nic.get('mac')) for nic in\n nics['nics']]\n cliutils.print_list(names, args.json)",
"def list_net(self):\n _url = \"http://\" + se... | [
"0.753512",
"0.74959314",
"0.73965627",
"0.7247876",
"0.69917715",
"0.68175",
"0.67618614",
"0.67329895",
"0.6687937",
"0.6673624",
"0.66728854",
"0.66436124",
"0.66415584",
"0.65566283",
"0.6548407",
"0.6429445",
"0.6410612",
"0.63945276",
"0.637308",
"0.6348048",
"0.6319437... | 0.760934 | 0 |
Schedules jobs for execution in a specified order. | def schedule_job_execution(self, job_ids, start_time='TIME_NOW'):
return self._job_mgmt.schedule_job_execution(job_ids, start_time) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def schedule(self, jobs):\n assert(isinstance(jobs, list) or jobs is None)\n with self.__lock:\n for job in jobs:\n while True:\n try:\n self.__queue.put(job, False)\n self.__lock.notify_all()\n ... | [
"0.64295745",
"0.5901927",
"0.58836645",
"0.5856689",
"0.5843526",
"0.5808002",
"0.574288",
"0.574288",
"0.5588306",
"0.554542",
"0.55356306",
"0.5499866",
"0.5479379",
"0.5449489",
"0.5427825",
"0.54005593",
"0.5362565",
"0.53619784",
"0.5353917",
"0.5340982",
"0.53276175",
... | 0.59230965 | 1 |
Set the legacy, nonUEFI, boot protocol of a NIC. If successful, the pending value of the NIC's legacy boot protocol attribute is set. For the new value to be applied, a configuration job must be created and the node must be rebooted. | def set_nic_legacy_boot_protocol(self, nic_id, value):
return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_nic_legacy_boot_protocol_none(self, nic_id):\n return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, 'NONE')",
"def set_nic_legacy_boot_protocol_pxe(self, nic_id):\n return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, 'PXE')",
"def set_pending_boot_mode(self, boot_mode):\n ... | [
"0.68213123",
"0.6571011",
"0.6390049",
"0.6221169",
"0.62201256",
"0.5706811",
"0.55207795",
"0.5489483",
"0.5489388",
"0.54601496",
"0.5429905",
"0.53446037",
"0.5271917",
"0.5240692",
"0.51808566",
"0.51247257",
"0.51149714",
"0.5068805",
"0.5055276",
"0.50475967",
"0.5020... | 0.79571086 | 0 |
Set the legacy, nonUEFI, boot protocol of a NIC to NONE. If successful, the pending value of the NIC's legacy boot protocol attribute is set. For the new value to be applied, a configuration job must be created and the node must be rebooted. | def set_nic_legacy_boot_protocol_none(self, nic_id):
return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, 'NONE') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_nic_legacy_boot_protocol(self, nic_id, value):\n return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, value)",
"def is_nic_legacy_boot_protocol_none(self, nic_id):\n return self._nic_cfg.is_nic_legacy_boot_protocol_none(nic_id)",
"def set_nic_legacy_boot_protocol_pxe(self, nic_id):\n... | [
"0.7080708",
"0.67770797",
"0.6196294",
"0.5887492",
"0.5865701",
"0.57495344",
"0.5609847",
"0.55483353",
"0.5510577",
"0.5472218",
"0.54610366",
"0.5409589",
"0.5379189",
"0.5184566",
"0.51787657",
"0.5177618",
"0.5174813",
"0.5163825",
"0.5162536",
"0.51537764",
"0.5110679... | 0.8150516 | 0 |
Set the legacy, nonUEFI, boot protocol of a NIC to PXE. If successful, the pending value of the NIC's legacy boot protocol attribute is set. For the new value to be applied, a configuration job must be created and the node must be rebooted. | def set_nic_legacy_boot_protocol_pxe(self, nic_id):
return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, 'PXE') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_nic_legacy_boot_protocol(self, nic_id, value):\n return self._nic_cfg.set_nic_legacy_boot_protocol(nic_id, value)",
"def set_pending_boot_mode(self, boot_mode):\n boot_mode = boot_mode.lower()\n if boot_mode not in ['uefi', 'legacy']:\n msg = 'Invalid Boot mode specified'\... | [
"0.6869364",
"0.59294105",
"0.5910383",
"0.581359",
"0.5732103",
"0.5631665",
"0.56119615",
"0.54020804",
"0.5247397",
"0.5175284",
"0.5159106",
"0.5112706",
"0.5091555",
"0.50698566",
"0.5003087",
"0.49630225",
"0.4952853",
"0.49507043",
"0.49433762",
"0.48527044",
"0.484163... | 0.7358659 | 0 |
Modify a setting of a NIC. If successful, the pending value of the attribute is set. For the new value to be applied, a configuration job must be created and the node must be rebooted. | def set_nic_setting(self, nic_id, attribute_name, value):
return self._nic_cfg.set_nic_setting(nic_id, attribute_name, value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def do_nic_update(cc, args):\n\n patch = utils.args_array_to_patch(args.attributes[0])\n result = cc.nic.update(args.uuid, patch)\n cliutils.print_dict(result)",
"def _ApplyNicMods(self, idx, nic, params, private):\n changes = []\n\n for key in [constants.INIC_MAC, constants.INIC_IP, constants.INI... | [
"0.602123",
"0.58192426",
"0.5802508",
"0.5783846",
"0.5681156",
"0.56103724",
"0.5568371",
"0.55253685",
"0.5505217",
"0.5504358",
"0.54779464",
"0.54318684",
"0.5402808",
"0.539177",
"0.53857595",
"0.5385296",
"0.53848606",
"0.53735757",
"0.53488266",
"0.53465766",
"0.53465... | 0.7097443 | 0 |
Modify one or more settings of a NIC. If successful, the pending values of the attributes are set. For the new values to be applied, a configuration job must be created and the node must be rebooted. | def set_nic_settings(self, nic_id, settings):
return self._nic_cfg.set_nic_settings(nic_id, settings) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_nic_setting(self, nic_id, attribute_name, value):\n return self._nic_cfg.set_nic_setting(nic_id, attribute_name, value)",
"def _ApplyNicMods(self, idx, nic, params, private):\n changes = []\n\n for key in [constants.INIC_MAC, constants.INIC_IP, constants.INIC_NAME]:\n if key in params:\... | [
"0.6353005",
"0.63099056",
"0.6132525",
"0.5717877",
"0.5647892",
"0.5579225",
"0.5547068",
"0.55100584",
"0.5498269",
"0.54694575",
"0.54531837",
"0.5437021",
"0.5431047",
"0.53944135",
"0.5393298",
"0.5388977",
"0.53056186",
"0.5285326",
"0.51902294",
"0.5187543",
"0.514826... | 0.64070183 | 0 |
Applies all pending changes on a RAID controller ...by creating a config job. | def commit_pending_raid_changes(self, raid_controller, reboot=False,
start_time='TIME_NOW'):
return self._job_mgmt.create_config_job(
resource_uri=ironic_uris.DCIM_RAIDService,
cim_creation_class_name='DCIM_RAIDService',
cim_name='DCIM:RAID... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply_config(dts, acg, xact, action, scratch):\n self.log.debug(\"Apply Config\")\n return rwtypes.RwStatus.SUCCESS",
"def apply_config(\n hostname: str, config: str, dry_run: bool, job_id: Optional[int] = None, scheduled_by: Optional[str] = None\n) -> NornirJobResult:\n logger = ... | [
"0.59766585",
"0.57936853",
"0.577992",
"0.5772036",
"0.57508814",
"0.5709033",
"0.5448869",
"0.5360297",
"0.5341171",
"0.52653414",
"0.5233503",
"0.52317417",
"0.51950896",
"0.5162699",
"0.5160941",
"0.51412576",
"0.50951284",
"0.5054649",
"0.5042832",
"0.50163287",
"0.49999... | 0.6687969 | 0 |
Returns a boolean array with True if points are outliers and False otherwise. Data points with a modified zscore greater than this value will be classified as outliers. | def is_outlier(points, threshold=3.5):
# transform into vector
if len(points.shape) == 1:
points = points[:,None]
# compute median value
median = np.median(points, axis=0)
# compute diff sums along the axis
diff = np.sum((points - median)**2, axis=-1)
diff = np.sqrt(diff)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_outlier(points, thresh=3.5):\n if len(points.shape) == 1:\n points = points[:,None]\n median = np.median(points, axis=0)\n diff = np.sum((points - median)**2, axis=-1)\n diff = np.sqrt(diff)\n med_abs_deviation = np.median(diff)\n\n modified_z_score = 0.6745 * diff / med_abs_deviati... | [
"0.76749617",
"0.76731247",
"0.75627464",
"0.7544557",
"0.72765946",
"0.68886274",
"0.67836773",
"0.67699665",
"0.66424376",
"0.6620131",
"0.6576165",
"0.65760356",
"0.6432134",
"0.6396712",
"0.63915414",
"0.6316066",
"0.6307188",
"0.62621516",
"0.6259861",
"0.6248001",
"0.62... | 0.7393552 | 4 |
Generate weightmaps for the images using the binary masks | def create_weightmaps(path,
folders,
w0=10.,
sigma=3.,
thresh_fn=lambda x:x>0,
name_weights_folder=True):
# set up some pipelines
w_pipe = ImageWeightMap2(w0=w0, sigma=sigma)
for d in folders:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_weight_map(masks, w0=10, sigma=5, longest_max_size=-1):\n nrows, ncols = masks.shape[1:]\n\n if longest_max_size > 0:\n old_rows, old_cols = nrows, ncols\n max_size = max(nrows, ncols)\n new_rows, new_cols = longest_max_size * nrows // max_size, longest_max_size * ncols // max_s... | [
"0.6640836",
"0.6275805",
"0.60981536",
"0.6081133",
"0.6068288",
"0.60453105",
"0.6001575",
"0.5891197",
"0.58610183",
"0.5838815",
"0.57847476",
"0.57843643",
"0.5777125",
"0.5762508",
"0.5748882",
"0.5746224",
"0.574566",
"0.57455665",
"0.5738557",
"0.5715211",
"0.5675463"... | 0.7141074 | 0 |
Updates current data with dataframe, stores old data in history | def update_current_data(self, data):
if self.current_data is not None:
current_results = self.get_results()
self._history.append((self.current_data, current_results))
self.current_data = data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_data(self, data):\n start_time = data.index[-1].strftime(\"%Y-%m-%dT%H:%M:%S.000000Z\")\n temp_data = self.gather_data(start=start_time)\n temp_data = self._list_to_df(temp_data)\n if (len(temp_data) > 1):\n # temp_data[0] is the same as data[-1]\n out_d... | [
"0.6701856",
"0.6649733",
"0.6549324",
"0.6426941",
"0.6328103",
"0.6311179",
"0.6242696",
"0.6232504",
"0.6194989",
"0.6187145",
"0.61294377",
"0.61294377",
"0.6119569",
"0.6101014",
"0.6090818",
"0.60787976",
"0.6045064",
"0.60259575",
"0.60231996",
"0.60224056",
"0.6018149... | 0.6706491 | 0 |
Keeps track of jobs given the poll_time and timeout | def monitor(self): | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def monitor(self):\r\n while True:\r\n for worker, start_time in self.workers.items():\r\n if (not worker.isAlive() or\r\n self.timeout\r\n and datetime.now() - start_time > self.timeout): \r\n\r\n self.work_count.get_nowait(... | [
"0.61435413",
"0.5949954",
"0.5710254",
"0.5683025",
"0.560069",
"0.5599449",
"0.5595849",
"0.5584626",
"0.5558775",
"0.5552031",
"0.554106",
"0.5499133",
"0.546804",
"0.54677254",
"0.54548335",
"0.54365027",
"0.5428119",
"0.5418949",
"0.5341865",
"0.533509",
"0.53112984",
... | 0.0 | -1 |
Aggregated history, i.e. in two single dataframes corresponding to "current data" attributes and results | def agg_history(self):
cd_list, cr_list = zip(*self._history)
return pd.concat(cd_list), pd.concat(cr_list) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _calculate_history(self, df: DataFrame) -> DataFrame:\n\n base_columns = {\"op\", \"id\", \"ts\"}\n data_columns = list(set(df.schema.names) - base_columns)\n\n window_spec = Window.partitionBy(\"id\").orderBy(\"ts\")\n agg_columns = [last(column, ignorenulls=True).over(window_spec)... | [
"0.68992007",
"0.6481204",
"0.62190855",
"0.60813546",
"0.60175997",
"0.6004348",
"0.5911996",
"0.58084685",
"0.58043",
"0.5802159",
"0.57765096",
"0.5699813",
"0.56859416",
"0.5673143",
"0.56662226",
"0.56241435",
"0.56107074",
"0.56097555",
"0.55994374",
"0.55979264",
"0.55... | 0.74194807 | 0 |
Simply samples the dataframe associated with the ATFSampler object according to the last submitted data | def get_results(self):
indices = self.current_data.index
return self.dataframe.loc[indices].dropna(axis=0, how='any') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_next_sample(self):",
"def create_sample_dataframe():\n ax_readings = []\n ay_readings = []\n az_readings = []\n mx_readings = []\n my_readings = []\n mz_readings = []\n gx_readings = []\n gy_readings = []\n gz_readings = []\n activity_list = [LABELS_NAMES[0] for _ in range(S... | [
"0.6255812",
"0.60481614",
"0.601828",
"0.5916922",
"0.5916239",
"0.58568954",
"0.585365",
"0.5852374",
"0.58360535",
"0.5834406",
"0.58178055",
"0.58139306",
"0.5788684",
"0.5780498",
"0.5779287",
"0.57751805",
"0.5733183",
"0.5733183",
"0.57007504",
"0.5677241",
"0.56560004... | 0.0 | -1 |
This does nothing, since the "experiments" are already done | def submit(self, data):
self.update_current_data(data)
self.job_status = "COMPLETED"
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def all_experiments():\n elo_explain_experiments()\n alpha_beta_experiments()\n mtcs_experiments()",
"def run_experiment():\n pass",
"def _problem_run_experiments_initialise(self):\n pass",
"def experiments_init(self):\n pass",
"def three_experiments(two_experiments, one_experiment):"... | [
"0.7503223",
"0.7414174",
"0.7368847",
"0.72370553",
"0.7086259",
"0.6734407",
"0.66773176",
"0.65619045",
"0.6553257",
"0.6530794",
"0.6515009",
"0.64568526",
"0.64523804",
"0.6438903",
"0.6420323",
"0.64055455",
"0.63833404",
"0.6337791",
"0.62841856",
"0.62719816",
"0.6242... | 0.0 | -1 |
Return the average of array | def number_list_average(numbers):
return sum(numbers)/len(numbers) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_average(array):\n total = sum(array)\n count = len(array)\n average = total / count\n return average",
"def avg(arr):\n return sum(arr) / float(len(arr))",
"def calculate_average(array):\n result = 0\n for item in array:\n result += float(item)\n final_result = result/len... | [
"0.88092715",
"0.8669364",
"0.8404581",
"0.8338364",
"0.8192285",
"0.7957236",
"0.7898365",
"0.7840347",
"0.7764968",
"0.77552366",
"0.7752074",
"0.7736052",
"0.7669432",
"0.7659086",
"0.763668",
"0.7617783",
"0.7617783",
"0.75944096",
"0.75838804",
"0.75792795",
"0.7440798",... | 0.68359655 | 67 |
3x3 convolution with padding | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=dilation, groups=groups, bias=False, dilation=dilation) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def conv3x3(in_planes, out_planes, stride=1, dilation=1, padding=1):\n return nn.Conv2d(in_planes,\n out_planes,\n kernel_size=3,\n stride=stride,\n padding=padding,\n dilation=dilation,\n bia... | [
"0.75487494",
"0.7377383",
"0.7326011",
"0.7300764",
"0.72812986",
"0.7276984",
"0.725113",
"0.72361106",
"0.723129",
"0.72272843",
"0.71892864",
"0.7178802",
"0.71645725",
"0.71645725",
"0.71645725",
"0.7158782",
"0.7156602",
"0.7156602",
"0.7156602",
"0.7156602",
"0.7156602... | 0.70940775 | 39 |
get the weather of your city | async def meteo(ctx, message):
""":param: ctx"""
""":param: message"""
"""return meteo url"""
print(message)
city = message
if((message == 'Fribourg') | (message == 'fribourg')):
city = message+'-fr'
await bot.say('http://www.prevision-meteo.ch/uploads/widget/%s_0.png' % city) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_weather(self):\n\n city = self.user_data[\"weatherSettings\"][\"weatherCity\"]\n country = self.user_data[\"weatherSettings\"][\"weatherCountry\"]\n\n host = \"weather.mios.com\"\n temp_scale = \"C\"\n url = \"http://%s/?tempFormat=%s&cityWeather=%s&countryWeather=%s\" % ... | [
"0.81527394",
"0.79711103",
"0.797093",
"0.78267634",
"0.7714512",
"0.77058226",
"0.7650911",
"0.76137936",
"0.759565",
"0.75871396",
"0.7578527",
"0.7533094",
"0.7445948",
"0.7430054",
"0.74223125",
"0.7415679",
"0.74089485",
"0.7369754",
"0.7339288",
"0.7307742",
"0.7290815... | 0.0 | -1 |
Delete all the message | async def clear(ctx, number):
""":param: ctx"""
""":param: number"""
"""return """
number = int(number)
counter = 0
async for x in bot.logs_from(ctx.message.channel, limit = number):
if counter < number:
await bot.delete_message(x)
counter += 1
await ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_all_messages(conn):\n sql = 'DELETE FROM LED_MESSAGE'\n cur = conn.cursor()\n cur.execute(sql)\n conn.commit()",
"def remove_all(self):\n if self._processed:\n res, messages = self._mailconn.search(None, 'ALL')\n if res == 'OK':\n for msg in mess... | [
"0.80339444",
"0.79340017",
"0.78354347",
"0.7719431",
"0.7519456",
"0.74393475",
"0.71776825",
"0.7141798",
"0.70297825",
"0.70297825",
"0.7026376",
"0.69661653",
"0.69541633",
"0.6952303",
"0.69011664",
"0.688212",
"0.6835293",
"0.6830225",
"0.6772053",
"0.6767978",
"0.6753... | 0.62750995 | 59 |
get the youtube video of your choise | async def video(ctx, message):
""":param: ctx"""
""":param: message"""
"""return video url"""
link_list = []
print ('Searching YouTube for: %s' % message)
url = "https://www.youtube.com/results?search_query=" + message
response = urlopen(url)
html = response.read()
soup = BeautifulSo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def youtube(self):\n return self._youtube",
"async def youtube(self, ctx, *, query):\r\n\r\n utub = 'https://youtube.com/results?search_query='\r\n url = utub + query.replace(\" \", \"+\")\r\n r = requests.get(url).text\r\n num1 = r.find('{\"videoRenderer')\r\n num2 = r.... | [
"0.74096596",
"0.728225",
"0.7253198",
"0.7208419",
"0.7033459",
"0.6965117",
"0.6899951",
"0.6890847",
"0.68863535",
"0.68834937",
"0.68387526",
"0.6818391",
"0.67317754",
"0.66845334",
"0.668007",
"0.6660846",
"0.6645332",
"0.6636764",
"0.6615716",
"0.65706575",
"0.65397185... | 0.66018784 | 19 |
get the musique of your choise on soundcloud | async def song(ctx, message):
""":param: ctx"""
""":param: message"""
"""return song url"""
link_list = []
print ('Searching SoundCloud for: %s' % message)
url = "https://soundcloud.com/search?q=" + message
response = urlopen(url)
html = response.read()
soup = BeautifulSoup(html, "l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_music_info(self):\n return self.get(COMMAND_UIC, 'GetMusicInfo')",
"def m() -> str:\n r = sr.Recognizer()\n with sr.Microphone() as source:\n audio = r.adjust_for_ambient_noise(source)\n logger.info(\"Microphone Active! Waiting for prompt!\")\n audio ... | [
"0.66049594",
"0.6398854",
"0.6107232",
"0.602416",
"0.6001126",
"0.5978631",
"0.5958115",
"0.59189194",
"0.59098816",
"0.5853517",
"0.58478653",
"0.58225495",
"0.5796435",
"0.5788293",
"0.5775083",
"0.5774513",
"0.5774209",
"0.57584375",
"0.5685073",
"0.5671004",
"0.5658229"... | 0.5343247 | 66 |
get a funny image or gif | async def img(ctx, message):
""":param: ctx"""
""":param: message"""
"""return image url"""
link_list = []
url = "http://imgur.com/search?q=" + message
response = urlopen(url)
html = response.read()
soup = BeautifulSoup(html, "lxml")
for a in soup.find_all('a', href=True):
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_image():\n\n url = 'http://skyview.gsfc.nasa.gov/cgi-bin/images'\n params = dict(Position='%s,%s' % (source['ra'], source['dec']),\n Survey=source['survey'].val,\n Return='GIF')\n response = requests.get(url, params=params, stream=True)\n with open(files['image... | [
"0.73346573",
"0.6971351",
"0.6642462",
"0.6508636",
"0.6439386",
"0.64110047",
"0.6389103",
"0.6368583",
"0.6352255",
"0.6341045",
"0.6334731",
"0.6271203",
"0.6213939",
"0.6209386",
"0.620783",
"0.61875296",
"0.6159081",
"0.6140987",
"0.6137652",
"0.6117086",
"0.60991156",
... | 0.0 | -1 |
This function partly overrides the standard QFileSystemModel data function to return custom file and folder icons | def data(self, index, role):
fileInfo = self.getFileInfo(index)[4]
if role == QtCore.Qt.DecorationRole:
if fileInfo.isDir():
return QtGui.QPixmap(os.path.join(ICONS_L, 'Folder.png'))
elif fileInfo.isFile():
return QtGui.QPixmap(os.path.jo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_icon(self):\r\n raise NotImplementedError",
"def icon(self):",
"def get_icon(self):\n raise NotImplementedError",
"def _icons(self):",
"def icon(self):\n return ICON",
"def icon(self):\n return ICON",
"def icon(self):\n return ICON",
"def icon(self):\n ... | [
"0.6583041",
"0.6500342",
"0.6448918",
"0.62393034",
"0.6156974",
"0.6156974",
"0.6156974",
"0.6156974",
"0.6156974",
"0.6156974",
"0.6156974",
"0.6156974",
"0.6156974",
"0.6156974",
"0.61385536",
"0.61385536",
"0.61254543",
"0.6075093",
"0.5986688",
"0.5986688",
"0.59493023"... | 0.78969663 | 0 |
get current user by request auth header | def get_current_user(s: str=None, required=True):
eureka_client = eureka.get_instance()
s = s or eureka_client.get_auth_token()
if not s:
if required:
raise Unauthorized('login required')
else:
return None
# format not checked
b64encoded = s[7:].split('.')[1]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_user(request: Request):\n return request.user",
"def auth(self):\r\n basic = parse_auth(self.environ.get('HTTP_AUTHORIZATION',''))\r\n if basic: return basic\r\n ruser = self.environ.get('REMOTE_USER')\r\n if ruser: return (ruser, None)\r\n return None",
"def get_c... | [
"0.7611471",
"0.7366869",
"0.7328306",
"0.73268723",
"0.7147687",
"0.71200335",
"0.70994264",
"0.7075108",
"0.70631224",
"0.70416456",
"0.7038976",
"0.7026532",
"0.70225793",
"0.7008292",
"0.6980063",
"0.6966016",
"0.6960566",
"0.6941208",
"0.6923895",
"0.69070643",
"0.688868... | 0.64593136 | 60 |
The set of string tags applied on the router. | def all_tags(self) -> Sequence[str]:
return pulumi.get(self, "all_tags") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Sequence[str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Sequence[str]:\r\n return self._tags",
"def get_tags(self):\n return ''",
"def get_tags(self):\n return ''",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")... | [
"0.7018813",
"0.6985426",
"0.69556713",
"0.69556713",
"0.6930072",
"0.6930072",
"0.6930072",
"0.6930072",
"0.69181705",
"0.68831164",
"0.6881321",
"0.67856914",
"0.67856914",
"0.67442703",
"0.6625533",
"0.6615073",
"0.660724",
"0.65743756",
"0.65743756",
"0.65743756",
"0.6574... | 0.6520889 | 25 |
The availability zone that is used to make router resources highly available. | def availability_zone_hints(self) -> Sequence[str]:
return pulumi.get(self, "availability_zone_hints") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def availability_zone(self) -> str:\n return pulumi.get(self, \"availability_zone\")",
"def availability_zone(self) -> Optional[str]:\n return pulumi.get(self, \"availability_zone\")",
"def availability_zone(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"availability_zone\")",
... | [
"0.845624",
"0.8339952",
"0.8219774",
"0.80050695",
"0.80050695",
"0.78776246",
"0.7540946",
"0.7264389",
"0.7198624",
"0.7198624",
"0.684517",
"0.684517",
"0.6840057",
"0.6814759",
"0.6814759",
"0.6814759",
"0.6814759",
"0.6814759",
"0.6814759",
"0.67452",
"0.6662538",
"0.... | 0.6317243 | 26 |
The value that points out if the Source NAT is enabled on the router. | def enable_snat(self) -> bool:
return pulumi.get(self, "enable_snat") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_on_tunnel(self):\n return self._is_on_tunnel",
"def is_natserver_enabled(self):\n\t\treturn bool(call_sdk_function('PrlVirtNet_IsNATServerEnabled', self.handle))",
"def xforwardedforclientsrcportenabled(self) -> bool:\n return pulumi.get(self, \"xforwardedforclientsrcportenabled\")",
"d... | [
"0.6732633",
"0.6485037",
"0.6428488",
"0.623166",
"0.62021405",
"0.62021405",
"0.61873764",
"0.613217",
"0.613217",
"0.613217",
"0.613217",
"0.613217",
"0.613217",
"0.6097362",
"0.60597533",
"0.60597533",
"0.59763396",
"0.593732",
"0.5917895",
"0.59082705",
"0.58916765",
"... | 0.0 | -1 |
The external fixed IPs of the router. | def external_fixed_ips(self) -> Sequence['outputs.GetRouterExternalFixedIpResult']:
return pulumi.get(self, "external_fixed_ips") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_floating_ips(self):\n return self.router.get(l3_constants.FLOATINGIP_KEY, [])",
"def ip_addresses(self):\n try:\n return socket.gethostbyaddr(self.fqdn)[-1]\n except socket.error as _:\n return ['127.0.0.1']",
"def external_IP(self):\r\n return self._ex... | [
"0.73665017",
"0.72443134",
"0.6921729",
"0.6901388",
"0.68353254",
"0.6818246",
"0.68095595",
"0.6784862",
"0.67622966",
"0.67588675",
"0.6741735",
"0.673702",
"0.6674886",
"0.6626563",
"0.6607832",
"0.6575119",
"0.6543172",
"0.6542807",
"0.65271246",
"0.6526337",
"0.6521113... | 0.82707417 | 0 |
The network UUID of an external gateway for the router. | def external_network_id(self) -> str:
return pulumi.get(self, "external_network_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_network_id(self):\n\t\treturn call_sdk_function('PrlVirtNet_GetNetworkId', self.handle)",
"def get_device_id(self, network):\n # There could be more than one dhcp server per network, so create\n # a device id that combines host and network ids\n\n host_uuid = uuid.uuid5(uuid.NAMESPAC... | [
"0.69283426",
"0.68110025",
"0.67746633",
"0.668923",
"0.668923",
"0.668923",
"0.6625821",
"0.6577762",
"0.65629625",
"0.6535451",
"0.651444",
"0.651444",
"0.64417446",
"0.6367765",
"0.63646585",
"0.6359441",
"0.6353521",
"0.63178164",
"0.63145465",
"0.62964016",
"0.6283311",... | 0.7114002 | 0 |
The providerassigned unique ID for this managed resource. | def id(self) -> str:
return pulumi.get(self, "id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def provider_id(self):\n return self.get('_id')",
"def provider_id(self):\n raise NotImplementedError",
"def id(self):\n return self.raw_resource.uuid",
"def healthcare_provider_id(self):\n return self._healthcare_provider_id",
"def unique_identifier(self) -> str:\n retur... | [
"0.8193402",
"0.7851373",
"0.77124894",
"0.7604287",
"0.7477648",
"0.7476093",
"0.7476093",
"0.7476093",
"0.7425807",
"0.7380237",
"0.7371964",
"0.7371964",
"0.7371964",
"0.7371964",
"0.7371964",
"0.7371964",
"0.7371964",
"0.7371964",
"0.735787",
"0.735787",
"0.73477197",
"... | 0.0 | -1 |
Use this data source to get the ID of an available OpenStack router. Example Usage ```python import pulumi import pulumi_openstack as openstack router = openstack.networking.get_router(name="router_1") ``` | def get_router(admin_state_up: Optional[bool] = None,
description: Optional[str] = None,
distributed: Optional[bool] = None,
enable_snat: Optional[bool] = None,
name: Optional[str] = None,
region: Optional[str] = None,
router_id: ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_t1_router_id_from_name(self, router_name=\"Auto_Test_T1\"):\n T1_GATEWAYS = \"https://{ip}/policy/api/v1/infra/tier-1s\"\n url = T1_GATEWAYS.format(ip=self.nsxt_ip)\n print('Starting GET call to Retrieve information'\n ' about Logical Router : %s' % url)\n ... | [
"0.7239798",
"0.6513688",
"0.6513688",
"0.65019596",
"0.6366786",
"0.6366786",
"0.63300174",
"0.63300174",
"0.6148312",
"0.6139166",
"0.6089928",
"0.60183054",
"0.5995232",
"0.5959246",
"0.5908385",
"0.5903618",
"0.58135504",
"0.570758",
"0.56915987",
"0.56709534",
"0.5652682... | 0.5445662 | 30 |
Use this data source to get the ID of an available OpenStack router. Example Usage ```python import pulumi import pulumi_openstack as openstack router = openstack.networking.get_router(name="router_1") ``` | def get_router_output(admin_state_up: Optional[pulumi.Input[Optional[bool]]] = None,
description: Optional[pulumi.Input[Optional[str]]] = None,
distributed: Optional[pulumi.Input[Optional[bool]]] = None,
enable_snat: Optional[pulumi.Input[Optional[bool]]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_t1_router_id_from_name(self, router_name=\"Auto_Test_T1\"):\n T1_GATEWAYS = \"https://{ip}/policy/api/v1/infra/tier-1s\"\n url = T1_GATEWAYS.format(ip=self.nsxt_ip)\n print('Starting GET call to Retrieve information'\n ' about Logical Router : %s' % url)\n ... | [
"0.72379184",
"0.65116304",
"0.65116304",
"0.6503419",
"0.63648206",
"0.63648206",
"0.6327279",
"0.6327279",
"0.6149408",
"0.6140083",
"0.60922784",
"0.60203147",
"0.59944487",
"0.59614384",
"0.5911317",
"0.5900723",
"0.58105195",
"0.5706946",
"0.5687287",
"0.5670423",
"0.565... | 0.53360957 | 39 |
Test if attribute is a property. | def isprop(v):
return isinstance(v, property) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isproperty(object):\n return isinstance(object, property)",
"def _is_propertyable(\n names, # type: List[str]\n attrs, # type: Dict[str, Any]\n annotations, # type: Dict[str, type]\n attr, # Dict[str, Any]\n):\n # type: (...) -> bool\n return (\n attr in annotations\n a... | [
"0.7569112",
"0.71270937",
"0.65027094",
"0.64971614",
"0.645277",
"0.63821",
"0.6280971",
"0.62516636",
"0.62270504",
"0.6196012",
"0.6137933",
"0.6086928",
"0.60693777",
"0.6069171",
"0.60603017",
"0.59751207",
"0.59495217",
"0.58659714",
"0.5848836",
"0.58300596",
"0.58074... | 0.7676597 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.