query stringlengths 10 2k | document stringlengths 20 51.2k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Function takes input of 2d_transformations, and changes to 3D transformations. | def get_3d_H(H1):
H_fin = [H1[0,0], 0, H1[0,1], H1[0,2], 0, 1, 0, 0, H1[1,0], 0, H1[1,1], H1[1,2]]
H_fin = np.array(H_fin).reshape(3,4)
return H_fin | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_transform_3d(transform, alpha = 1):\r\n points = 20*[None]\r\n for i in range(20):\r\n x = random.randrange(-40, 41)\r\n y = random.randrange(-40, 41)\r\n z = random.randrange(-40, 41)\r\n points[i] = vec3(x, y, z)\r\n tr_x = random.randrange(-40, 41)\r\n tr_y = ran... | [
"0.6349321",
"0.6275499",
"0.62234837",
"0.60405755",
"0.6019634",
"0.5999591",
"0.59724045",
"0.5886089",
"0.5874781",
"0.5857787",
"0.5805063",
"0.57968557",
"0.579072",
"0.5775769",
"0.5740777",
"0.5668735",
"0.5661197",
"0.56578827",
"0.564027",
"0.5617438",
"0.5617301",
... | 0.0 | -1 |
Function takes input of 3d_points, transformations and rotate into ground frame 3D points. | def rotate(points, rot_vecs):
theta = np.linalg.norm(rot_vecs, axis=1)[:, np.newaxis] #np.newaxis converts this into a column vector.
with np.errstate(invalid='ignore'):
v = rot_vecs / theta
v = np.nan_to_num(v)
check = (theta!=0).astype(int)
dot = np.sum(points * v, axis=1)[:, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def transform_points(self, points3d: np.ndarray) -> np.ndarray:\n assert self._r is not None\n assert self._t is not None\n assert isinstance(points3d, np.ndarray)\n\n if points3d.shape[1] == 6: # expunge RGB\n points3d = points3d[:, 0:3]\n points3d = points3d.transpo... | [
"0.7109896",
"0.6716488",
"0.6609811",
"0.6383148",
"0.63557905",
"0.63425374",
"0.62598866",
"0.622144",
"0.6207015",
"0.61899817",
"0.6170394",
"0.60613036",
"0.6057928",
"0.6017546",
"0.59876084",
"0.59867823",
"0.5985195",
"0.59724486",
"0.5949988",
"0.5939482",
"0.593948... | 0.0 | -1 |
The version name of the app. Optional. | def version_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "version_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def version_name(self) -> str:\n return pulumi.get(self, \"version_name\")",
"def app_version(self) -> str:\n return pulumi.get(self, \"app_version\")",
"def get_version_name(self):\n\t\tif self.have_metadata is False:\n\t\t\tself._get_metadata()\n\t\t\tself.have_metadata = True\n\n\t\ttry:\n\t\t... | [
"0.81581724",
"0.79724264",
"0.73261714",
"0.7297353",
"0.7289746",
"0.7283582",
"0.72825706",
"0.7276747",
"0.7177595",
"0.7177595",
"0.7177595",
"0.7177595",
"0.7177595",
"0.71643364",
"0.71487975",
"0.7147951",
"0.7138497",
"0.7113468",
"0.70468235",
"0.7045594",
"0.703526... | 0.8162018 | 0 |
The max number of steps/actions Robo can execute. Default is no limit (0). Optional | def max_steps(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "max_steps") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def max_steps(self) -> int:\n return pulumi.get(self, \"max_steps\")",
"def quick_run_limit(self):\n try:\n return int(environment.get(\"Quick\"))\n except KeyError:\n return maxsize",
"def max_count(self):\n return self.config.get('max_count', 500)",
"def ge... | [
"0.69906634",
"0.68274504",
"0.66961193",
"0.6442748",
"0.6422285",
"0.6414533",
"0.63958144",
"0.63829577",
"0.632581",
"0.63230574",
"0.6299938",
"0.6278073",
"0.62764186",
"0.62619114",
"0.6238077",
"0.6238077",
"0.62244403",
"0.6219266",
"0.6208455",
"0.61701727",
"0.6161... | 0.67991185 | 2 |
More information about a SUCCESS outcome. Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. Optional | def success_detail(self) -> Optional[pulumi.Input['SuccessDetailArgs']]:
return pulumi.get(self, "success_detail") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def success_detail(self) -> 'outputs.SuccessDetailResponse':\n return pulumi.get(self, \"success_detail\")",
"def is_successful(self):\n for item in self.summary:\n if item['task_status'] is False:\n return testcase.TestCase.EX_TESTCASE_FAILED\n\n return super().is_... | [
"0.64063805",
"0.6288638",
"0.6247324",
"0.62255144",
"0.6173245",
"0.61726373",
"0.61711985",
"0.61285895",
"0.6042585",
"0.59841394",
"0.5970171",
"0.5939998",
"0.5927143",
"0.59163237",
"0.59163237",
"0.59103966",
"0.59103966",
"0.5902873",
"0.5843659",
"0.58363736",
"0.57... | 0.67937446 | 0 |
Gets value of {classname} uom property. Units of measure used by the coordinates. | def uom(self):
return self.__uom | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unit_of_measure(self):\n try:\n uom = self.metadata['geosoft']['dataset']['geo:unitofmeasurement']['#text']\n except KeyError:\n uom = ''\n return uom",
"def unit_of_measurement(self):\n return self._metadata[1]",
"def unit_of_measurement(self):\n re... | [
"0.7026422",
"0.69033957",
"0.68991363",
"0.6864017",
"0.68223166",
"0.67934215",
"0.67934215",
"0.67934215",
"0.67934215",
"0.67934215",
"0.67934215",
"0.67934215",
"0.6776837",
"0.6755297",
"0.67535204",
"0.67440796",
"0.6717436",
"0.66940755",
"0.66796875",
"0.66796875",
"... | 0.7045796 | 0 |
Tests that the DockerExplorerTool.DetectStorage function fails on Docker directory. | def testDetectStorageFail(self):
explorer_object = explorer.Explorer()
explorer_object.docker_directory = 'this_dir_shouldnt_exist'
expected_error_message = (
'this_dir_shouldnt_exist is not a Docker directory')
with self.assertRaises(errors.BadStorageException) as err:
explorer_object.Se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testDetectStorage(self):\n for container_obj in self.explorer_object.GetAllContainers():\n self.assertIsNotNone(container_obj.storage_object)\n self.assertEqual(container_obj.storage_name, self.driver)\n self.assertIsInstance(container_obj.storage_object, self.driver_class)\n\n self.asse... | [
"0.71800935",
"0.59400284",
"0.5884728",
"0.5816762",
"0.56886363",
"0.563935",
"0.5626196",
"0.55914",
"0.5559688",
"0.5554794",
"0.554809",
"0.5500094",
"0.5497248",
"0.54718214",
"0.54548377",
"0.544441",
"0.54417056",
"0.5439024",
"0.5430797",
"0.5430103",
"0.5410587",
... | 0.8474857 | 0 |
Tests the GetAllContainers function on a AuFS storage. | def testGetAllContainers(self):
containers_list = self.explorer_object.GetAllContainers()
containers_list = sorted(containers_list, key=lambda ci: ci.name)
self.assertEqual(7, len(containers_list))
container_obj = containers_list[1]
self.assertEqual('/dreamy_snyder', container_obj.name)
self.a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetAllContainers(self):\n containers_list = self.explorer_object.GetAllContainers()\n containers_list = sorted(containers_list, key=lambda ci: ci.name)\n self.assertEqual(3, len(containers_list))\n\n container_obj = containers_list[0]\n\n self.assertEqual('/angry_rosalind', container_obj.nam... | [
"0.77955216",
"0.77119255",
"0.76294327",
"0.7040418",
"0.7005308",
"0.69191813",
"0.66878617",
"0.6614207",
"0.65623033",
"0.6520208",
"0.6460386",
"0.6375214",
"0.63747483",
"0.63636476",
"0.62644684",
"0.62495464",
"0.62360936",
"0.6111415",
"0.6061663",
"0.60563034",
"0.6... | 0.7702703 | 2 |
Tests the GetContainersJson function on a AuFS storage. | def testGetContainersJson(self):
self.maxDiff = None
result = self.explorer_object.GetContainersJson(only_running=True)
mount_point = collections.OrderedDict()
mount_point['source'] = (
'test_data/docker/volumes/'
'28297de547b5473a9aff90aaab45ed108ebf019981b40c3c35c226f54c13ac0d/_data'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetContainersJson(self):\n result = self.explorer_object.GetContainersJson(only_running=True)\n\n expected = collections.OrderedDict()\n expected['image_name'] = 'busybox:latest'\n expected['container_id'] = '5dc287aa80b460652a5584e80a5c8c1233b0c0691972d75424cf5250b917600a'\n expected['image... | [
"0.7879122",
"0.7823755",
"0.77664894",
"0.6727845",
"0.6702711",
"0.66690665",
"0.66539633",
"0.6653534",
"0.66259706",
"0.654005",
"0.6507504",
"0.6449457",
"0.6135749",
"0.61068594",
"0.5904518",
"0.5877122",
"0.58596516",
"0.5779607",
"0.5757598",
"0.57343626",
"0.5679153... | 0.77479726 | 3 |
Tests GetRepositoriesString() on a AuFS storage. | def testGetRepositoriesString(self):
self.maxDiff = None
result_string = self.explorer_object.GetRepositoriesString()
expected_string = (
'[\n'
' {\n'
' "Repositories": {\n'
' "busybox": {\n'
' "busybox:latest": "sha256:'
'7... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetRepositoriesString(self):\n self.maxDiff = None\n result_string = self.explorer_object.GetRepositoriesString()\n expected_string = (\n '[\\n'\n ' {\\n'\n ' \"Repositories\": {\\n'\n ' \"busybox\": {\\n'\n ' \"latest\": \"'\n... | [
"0.7695045",
"0.7572259",
"0.75007",
"0.6000073",
"0.59345984",
"0.59314066",
"0.585927",
"0.5751278",
"0.5716578",
"0.5631497",
"0.5617056",
"0.56094474",
"0.55260086",
"0.5508081",
"0.54755956",
"0.5472575",
"0.54722375",
"0.5433805",
"0.5420641",
"0.538231",
"0.53616387",
... | 0.77806854 | 0 |
Tests the DockerExplorerTool._GetFullContainerID function on AuFS. | def testGetFullContainerID(self):
self.assertEqual(
'2cc4b0d9c1dfdf71099c5e9a109e6a0fe286152a5396bd1850689478e8f70625',
self.explorer_object._GetFullContainerID('2cc4b0d'))
with self.assertRaises(Exception) as err:
self.explorer_object._GetFullContainerID('')
self.assertEqual(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetFullContainerID(self):\n self.assertEqual(\n '5dc287aa80b460652a5584e80a5c8c1233b0c0691972d75424cf5250b917600a',\n self.explorer_object._GetFullContainerID('5dc287aa80'))\n\n with self.assertRaises(Exception) as err:\n self.explorer_object._GetFullContainerID('4')\n self.asse... | [
"0.7894527",
"0.7863206",
"0.78143126",
"0.65505886",
"0.6348541",
"0.62750643",
"0.6186638",
"0.60354406",
"0.57760966",
"0.5757724",
"0.5726802",
"0.5725926",
"0.57064676",
"0.57044643",
"0.567652",
"0.56700397",
"0.55780286",
"0.54389066",
"0.542268",
"0.5389902",
"0.53875... | 0.7638187 | 3 |
Tests the GetAllContainers function on a AuFS storage. | def testGetAllContainers(self):
containers_list = self.explorer_object.GetAllContainers()
containers_list = sorted(containers_list, key=lambda ci: ci.name)
self.assertEqual(3, len(containers_list))
container_obj = containers_list[0]
self.assertEqual('/angry_rosalind', container_obj.name)
self.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetAllContainers(self):\n containers_list = self.explorer_object.GetAllContainers()\n containers_list = sorted(containers_list, key=lambda ci: ci.name)\n self.assertEqual(6, len(containers_list))\n\n container_obj = containers_list[0]\n\n self.assertEqual('/elastic_booth', container_obj.name... | [
"0.7712221",
"0.770261",
"0.76293314",
"0.7040265",
"0.70059144",
"0.6921114",
"0.6690874",
"0.6615063",
"0.65631753",
"0.6520969",
"0.6461309",
"0.6375619",
"0.6375382",
"0.6366158",
"0.62652934",
"0.6249886",
"0.623761",
"0.61146367",
"0.60589653",
"0.60574377",
"0.6040996"... | 0.7795348 | 0 |
Tests the GetContainersJson function on a AuFS storage. | def testGetContainersJson(self):
result = self.explorer_object.GetContainersJson(only_running=True)
expected = collections.OrderedDict()
expected['image_name'] = 'busybox'
expected['container_id'] = 'de44dd97cfd1c8d1c1aad7f75a435603991a7a39fa4f6b20a69bf4458809209c'
expected['image_id'] = '1cee97b18... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetContainersJson(self):\n result = self.explorer_object.GetContainersJson(only_running=True)\n\n expected = collections.OrderedDict()\n expected['image_name'] = 'busybox:latest'\n expected['container_id'] = '5dc287aa80b460652a5584e80a5c8c1233b0c0691972d75424cf5250b917600a'\n expected['image... | [
"0.7878512",
"0.78230035",
"0.77474844",
"0.67251205",
"0.6700642",
"0.6665863",
"0.66508317",
"0.66506946",
"0.6623285",
"0.6537337",
"0.65073854",
"0.6448104",
"0.61354715",
"0.61050564",
"0.5901789",
"0.58748627",
"0.58570033",
"0.57781965",
"0.57574743",
"0.5735183",
"0.5... | 0.7766029 | 2 |
Tests GetRepositoriesString() on a AuFS storage. | def testGetRepositoriesString(self):
self.maxDiff = None
result_string = self.explorer_object.GetRepositoriesString()
expected_string = (
'[\n'
' {\n'
' "Repositories": {\n'
' "busybox": {\n'
' "latest": "'
'1cee97b18f87b5fa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetRepositoriesString(self):\n self.maxDiff = None\n result_string = self.explorer_object.GetRepositoriesString()\n expected_string = (\n '[\\n'\n ' {\\n'\n ' \"Repositories\": {\\n'\n ' \"busybox\": {\\n'\n ' \"busybox:latest\... | [
"0.77806854",
"0.7572259",
"0.75007",
"0.6000073",
"0.59345984",
"0.59314066",
"0.585927",
"0.5751278",
"0.5716578",
"0.5631497",
"0.5617056",
"0.56094474",
"0.55260086",
"0.5508081",
"0.54755956",
"0.5472575",
"0.54722375",
"0.5433805",
"0.5420641",
"0.538231",
"0.53616387",... | 0.7695045 | 1 |
Tests the DockerExplorerTool._GetFullContainerID function on AuFS. | def testGetFullContainerID(self):
self.assertEqual(
'de44dd97cfd1c8d1c1aad7f75a435603991a7a39fa4f6b20a69bf4458809209c',
self.explorer_object._GetFullContainerID('de44dd'))
self.maxDiff = None
with self.assertRaises(Exception) as err:
self.explorer_object._GetFullContainerID('')
se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetFullContainerID(self):\n self.assertEqual(\n '5dc287aa80b460652a5584e80a5c8c1233b0c0691972d75424cf5250b917600a',\n self.explorer_object._GetFullContainerID('5dc287aa80'))\n\n with self.assertRaises(Exception) as err:\n self.explorer_object._GetFullContainerID('4')\n self.asse... | [
"0.7894704",
"0.7814847",
"0.7638936",
"0.6547026",
"0.63458335",
"0.62738603",
"0.61869836",
"0.603613",
"0.57725453",
"0.57573456",
"0.5724275",
"0.5721933",
"0.5702976",
"0.57028544",
"0.56762344",
"0.5666975",
"0.5574245",
"0.5437429",
"0.54198486",
"0.53881323",
"0.53867... | 0.78635484 | 1 |
Tests the GetAllContainers function on a Overlay storage. | def testGetAllContainers(self):
containers_list = self.explorer_object.GetAllContainers()
containers_list = sorted(containers_list, key=lambda ci: ci.name)
self.assertEqual(6, len(containers_list))
container_obj = containers_list[0]
self.assertEqual('/elastic_booth', container_obj.name)
self.a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetAllContainers(self):\n containers_list = self.explorer_object.GetAllContainers()\n containers_list = sorted(containers_list, key=lambda ci: ci.name)\n self.assertEqual(3, len(containers_list))\n\n container_obj = containers_list[0]\n\n self.assertEqual('/angry_rosalind', container_obj.nam... | [
"0.7806026",
"0.770757",
"0.7655162",
"0.70200604",
"0.6924167",
"0.6774594",
"0.67660815",
"0.6739581",
"0.6632488",
"0.6605072",
"0.6595872",
"0.65453595",
"0.6484601",
"0.6382883",
"0.6381599",
"0.6375805",
"0.6367901",
"0.61447275",
"0.6026245",
"0.59816426",
"0.5975372",... | 0.7657998 | 2 |
Tests the GetContainersJson function on a Overlay storage. | def testGetContainersJson(self):
result = self.explorer_object.GetContainersJson(only_running=True)
expected = collections.OrderedDict()
expected['image_name'] = 'busybox:latest'
expected['container_id'] = '5dc287aa80b460652a5584e80a5c8c1233b0c0691972d75424cf5250b917600a'
expected['image_id'] = '5b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetContainersJson(self):\n result = self.explorer_object.GetContainersJson(only_running=True)\n\n expected = collections.OrderedDict()\n expected['image_name'] = 'busybox'\n expected['container_id'] = '8e8b7f23eb7cbd4dfe7e91646ddd0e0f524218e25d50113559f078dfb2690206'\n expected['image_id'] =... | [
"0.7864717",
"0.77468264",
"0.7721043",
"0.68034315",
"0.674285",
"0.6698208",
"0.6674852",
"0.664991",
"0.6609724",
"0.65797305",
"0.6365987",
"0.6185135",
"0.61248493",
"0.60540795",
"0.6050457",
"0.60438395",
"0.6042539",
"0.60421777",
"0.60254216",
"0.6023892",
"0.5967076... | 0.7904943 | 0 |
Tests the DockerExplorerTool._GetFullContainerID function on Overlay. | def testGetFullContainerID(self):
self.assertEqual(
'5dc287aa80b460652a5584e80a5c8c1233b0c0691972d75424cf5250b917600a',
self.explorer_object._GetFullContainerID('5dc287aa80'))
with self.assertRaises(Exception) as err:
self.explorer_object._GetFullContainerID('4')
self.assertEqual(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetFullContainerID(self):\n self.assertEqual(\n 'de44dd97cfd1c8d1c1aad7f75a435603991a7a39fa4f6b20a69bf4458809209c',\n self.explorer_object._GetFullContainerID('de44dd'))\n\n self.maxDiff = None\n with self.assertRaises(Exception) as err:\n self.explorer_object._GetFullContainerI... | [
"0.7116695",
"0.7010076",
"0.6827282",
"0.6504433",
"0.60419714",
"0.5941275",
"0.587462",
"0.5832444",
"0.5726811",
"0.5713001",
"0.5698891",
"0.56919235",
"0.5617282",
"0.54591036",
"0.5402398",
"0.5400057",
"0.5373908",
"0.53337765",
"0.5289125",
"0.5222864",
"0.52033645",... | 0.7071275 | 1 |
Tests the GetAllContainers function on a Overlay2 storage. | def testGetAllContainers(self):
containers_list = self.explorer_object.GetAllContainers()
containers_list = sorted(containers_list, key=lambda ci: ci.name)
self.assertEqual(5, len(containers_list))
container_obj = containers_list[0]
self.assertEqual('/festive_perlman', container_obj.name)
self... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetAllContainers(self):\n containers_list = self.explorer_object.GetAllContainers()\n containers_list = sorted(containers_list, key=lambda ci: ci.name)\n self.assertEqual(3, len(containers_list))\n\n container_obj = containers_list[0]\n\n self.assertEqual('/angry_rosalind', container_obj.nam... | [
"0.770133",
"0.7637144",
"0.76058656",
"0.69791645",
"0.6936667",
"0.68778354",
"0.6782661",
"0.67445946",
"0.6731641",
"0.6609708",
"0.6607669",
"0.6528942",
"0.6450306",
"0.6445487",
"0.6415447",
"0.637927",
"0.6330644",
"0.6324327",
"0.6265318",
"0.62295747",
"0.6103919",
... | 0.7561073 | 3 |
Tests the GetContainersJson function on a Overlay2 storage. | def testGetContainersJson(self):
result = self.explorer_object.GetContainersJson(only_running=True)
expected = collections.OrderedDict()
expected['image_name'] = 'busybox'
expected['container_id'] = '8e8b7f23eb7cbd4dfe7e91646ddd0e0f524218e25d50113559f078dfb2690206'
expected['image_id'] = '8ac485896... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetContainersJson(self):\n result = self.explorer_object.GetContainersJson(only_running=True)\n\n expected = collections.OrderedDict()\n expected['image_name'] = 'busybox:latest'\n expected['container_id'] = '5dc287aa80b460652a5584e80a5c8c1233b0c0691972d75424cf5250b917600a'\n expected['image... | [
"0.7943729",
"0.7806251",
"0.7800997",
"0.6755944",
"0.6749414",
"0.6706431",
"0.6706146",
"0.67027533",
"0.6667997",
"0.6635503",
"0.6361645",
"0.6224623",
"0.60846204",
"0.60809255",
"0.60451955",
"0.6015709",
"0.6013757",
"0.59691507",
"0.59469706",
"0.59411085",
"0.593032... | 0.7921371 | 1 |
Tests the DockerExplorerTool._GetFullContainerID function on Overlay2. | def testGetFullContainerID(self):
self.assertEqual(
'61ba4e6c012c782186c649466157e05adfd7caa5b551432de51043893cae5353',
self.explorer_object._GetFullContainerID('61ba4e6c012c782'))
with self.assertRaises(Exception) as err:
self.explorer_object._GetFullContainerID('')
self.assertEqual(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testGetFullContainerID(self):\n self.assertEqual(\n 'de44dd97cfd1c8d1c1aad7f75a435603991a7a39fa4f6b20a69bf4458809209c',\n self.explorer_object._GetFullContainerID('de44dd'))\n\n self.maxDiff = None\n with self.assertRaises(Exception) as err:\n self.explorer_object._GetFullContainerI... | [
"0.6963421",
"0.6908943",
"0.6757769",
"0.6217031",
"0.58063024",
"0.5796945",
"0.576699",
"0.56666416",
"0.56119865",
"0.55521834",
"0.5408609",
"0.54044986",
"0.53708696",
"0.5305019",
"0.52253145",
"0.5184327",
"0.5136757",
"0.50562626",
"0.504916",
"0.5031847",
"0.5017479... | 0.6843467 | 2 |
Tests the DockerImageDownloader._SetupRepository() method. | def testSetupRepository(self):
dl = downloader.DockerImageDownloader('')
with tempfile.TemporaryDirectory() as tmp_dir:
dl._output_directory = tmp_dir
dl._SetupRepository('foo')
self.assertEqual('library/foo', dl.repository)
self.assertEqual('latest', dl.tag)
dl._SetupRepository(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setUpClass(self):\n self.repo = Repository(\"https://github.com/qcoumes/gitload_test.git\")\n self.repo.get_repo()",
"def test_create_repository(\n repo_type, response, repository_collection, faker, mocker):\n x_configuration = faker.pydict()\n repository_collection.client.scripts.... | [
"0.6612219",
"0.6406834",
"0.62481296",
"0.61920375",
"0.6157245",
"0.6078153",
"0.6040712",
"0.6004867",
"0.59065413",
"0.5857675",
"0.5784522",
"0.57581323",
"0.5750396",
"0.5749826",
"0.5717382",
"0.57160383",
"0.5702747",
"0.56854767",
"0.5674008",
"0.56720215",
"0.566659... | 0.8552599 | 0 |
Tests that we properly get an access token. | def testGetToken(self):
# Token is base64 for a json object so always starts with '{"'
self.assertTrue(self.dl_object._access_token.startswith('eyJ'))
self.assertTrue(len(self.dl_object._access_token) > 100) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_read_o_auth_access_token(self):\n pass",
"def test_access_token_get(self):\n client = oauth.Client(self.consumer, None)\n resp, content = client.request(self._uri('request_token'), \"GET\")\n\n self.assertEqual(int(resp['status']), 200)",
"def test_create_o_auth_access_toke... | [
"0.8614337",
"0.85584956",
"0.8190257",
"0.8040006",
"0.7833521",
"0.78180325",
"0.77351457",
"0.764963",
"0.7628635",
"0.74529725",
"0.74421114",
"0.7337065",
"0.73302084",
"0.72882366",
"0.72473353",
"0.7217471",
"0.7202254",
"0.7199669",
"0.7198954",
"0.71962357",
"0.71780... | 0.75431514 | 9 |
Tests that a Dockerfile is properly downloaded. | def testDownloadDockerFile(self):
expected_dockerfile = (
'# Pseudo Dockerfile\n'
f'# Generated by de.py ({de_version})\n\n'
'COPY file:201f8f1849e89d53be9f6aa76937f5e209d745abfd15a8552fcf2ba45ab267f9'
' in / \n'
'CMD ["/hello"]')
with tempfile.TemporaryDirectory() as tm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_download_linux(salt_test_command, pkg_container, root_url, salt_release):\n res = pkg_container.container.run(salt_test_command)\n assert res.returncode == 0",
"def testGetBadManifest(self):\n dl = downloader.DockerImageDownloader('non/existing:image')\n with tempfile.TemporaryDirectory() as... | [
"0.6582086",
"0.6374339",
"0.6373132",
"0.6368888",
"0.63309413",
"0.629905",
"0.6180519",
"0.6173951",
"0.6079855",
"0.60649896",
"0.6061351",
"0.60543555",
"0.6008386",
"0.59923255",
"0.5990172",
"0.59839463",
"0.5954408",
"0.59509367",
"0.5946794",
"0.5942555",
"0.5936811"... | 0.79285985 | 0 |
Last two values of X serie under over Y serie. | def crossunder(x, y):
return x[-1] < y[-1] and x[-2] > y[-2] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def last2(x, y):\n y = np.asarray(y)\n return y[np.argsort(x)][-1]",
"def y(self, x):\n return x",
"def other_series(n, x, y):\n if n == 0:\n return x\n elif n == 1:\n return y\n else:\n return other_series(n-1, x, y) + other_series(n-2, x, y)",
"def y2(self):\n ... | [
"0.6988991",
"0.5933177",
"0.58178824",
"0.57969004",
"0.5795313",
"0.57764953",
"0.57180035",
"0.5680486",
"0.56652176",
"0.5654427",
"0.5624682",
"0.562",
"0.5618202",
"0.56077194",
"0.559453",
"0.55792654",
"0.55677277",
"0.55617887",
"0.55517364",
"0.55425525",
"0.550679"... | 0.0 | -1 |
Returns a square matrix of pairwise euclidean distances of elements within a matrix. | def pairwise_euclidean_distance(M, axis=0):
return pairwise_distance(M, 'euclidean', axis=axis) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def distance_matrix(data):\n D = numpy.zeros( (data.shape[0], data.shape[0]) )\n for i in xrange(data.shape[0]):\n for j in xrange(i):\n D[i,j] = numpy.linalg.norm(data[i,:]-data[j,:])\n D[j,i] = D[i,j]\n\n return D",
"def pairwise_squared_distances(data):\n n = data.shap... | [
"0.70115244",
"0.6950738",
"0.6922698",
"0.6912637",
"0.6771213",
"0.6767852",
"0.66888547",
"0.65973353",
"0.65668267",
"0.65312165",
"0.6472793",
"0.6411561",
"0.6402323",
"0.6394943",
"0.6376807",
"0.6308943",
"0.62925243",
"0.62838966",
"0.6272556",
"0.625542",
"0.6239345... | 0.72073776 | 0 |
Returns a square matrix of pairwise distances of elements within a matrix. | def pairwise_distance(M, d, axis=0):
return squareform(pdist(M if axis==0 else M.T, d)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def distance_matrix(data):\n D = numpy.zeros( (data.shape[0], data.shape[0]) )\n for i in xrange(data.shape[0]):\n for j in xrange(i):\n D[i,j] = numpy.linalg.norm(data[i,:]-data[j,:])\n D[j,i] = D[i,j]\n\n return D",
"def pairwise_squared_distances(data):\n n = data.shap... | [
"0.7107425",
"0.7103959",
"0.6927594",
"0.6823884",
"0.6669606",
"0.6632105",
"0.66186714",
"0.6579944",
"0.6544418",
"0.6517068",
"0.65141106",
"0.6502121",
"0.64828354",
"0.6472387",
"0.64686525",
"0.64326346",
"0.63672614",
"0.6303174",
"0.6299727",
"0.62786406",
"0.627395... | 0.6546975 | 8 |
Try to claim the daily Zens and return True if successfully claimed, else False. | def claim(driver: webdriver.Chrome) -> bool:
time.sleep(3)
try:
driver.find_element_by_xpath( # Click on daily zens icon
'//li[contains(@class, "Container_")]//img[contains(@alt, '
'"EdYoda Daily")]').click()
driver.find_element_by_xpath( # Claim zens
'//li[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def free_cookie_is_winner(person):\n now = timezone.now()\n discount_period = free_cookie_discount()\n\n if now < discount_period.begin or (discount_period.end and now > discount_period.end):\n # Discount period is not running at this moment.\n return False\n\n main_studies = Study.object... | [
"0.60386395",
"0.58800435",
"0.5667366",
"0.5647765",
"0.5593962",
"0.5588553",
"0.5583564",
"0.5491995",
"0.54715544",
"0.5456031",
"0.5428131",
"0.5372822",
"0.5345521",
"0.53217167",
"0.52939105",
"0.52786475",
"0.5233922",
"0.52209115",
"0.5209404",
"0.51943195",
"0.51940... | 0.6251253 | 0 |
Create a new decider instance for this tank. | def __init__(self, target_height, margin):
self.target_height = target_height
self.margin = margin | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_test_discount(self):\n return Discount()",
"def create_child(parent, idx):\n boardCopy = deepcopy(parent.currentBoardState)\n action = boardCopy.get_available_actions()[idx]\n parent.children[idx] = DecisionTree(boardCopy, action, parent.level+1, parent, strategy=parent.strategy)",
"de... | [
"0.51915735",
"0.50737417",
"0.50591487",
"0.50554144",
"0.49924362",
"0.49668655",
"0.49072632",
"0.48786917",
"0.4811573",
"0.48031318",
"0.4797363",
"0.47706118",
"0.47652045",
"0.47298568",
"0.4717522",
"0.4658959",
"0.46414196",
"0.46125743",
"0.45899594",
"0.45788813",
... | 0.0 | -1 |
Compact the state_dict removing all the zeroed neurons, corresponding connections and biases | def remove_zero_element(state, pruned_model, pinned_in, pinned_out):
zeros = []
non_zeros = []
was_conv = False
first = True
# Iterate through all the elements of the state_dict
for k in state:
# print(k)
if "weight" in k:
# Find in the pruned model the layer that c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cleanup_state_dict_to_server(self) -> dict:\n clean_state_dict = copy_dict(self.model.state_dict()) # not deepcopy\n if self.is_sparse:\n for layer, prefix in zip(self.model.param_layers, self.model.param_layer_prefixes):\n key = prefix + \".bias\"\n if i... | [
"0.770427",
"0.713616",
"0.6829281",
"0.6383836",
"0.6223175",
"0.61307704",
"0.60516614",
"0.60497576",
"0.6038534",
"0.60196334",
"0.59868634",
"0.5966495",
"0.59050333",
"0.5873359",
"0.58727545",
"0.58498037",
"0.58155066",
"0.58018684",
"0.57972866",
"0.5745435",
"0.5714... | 0.60011685 | 10 |
Sets the chart_default_color of this ChartSettings. | def chart_default_color(self, chart_default_color):
self._chart_default_color = chart_default_color | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetDefaultColor(self):\n return wx.BLACK",
"def default_colour(self):\n colour = self.DEFAULT_COLOUR\n return colour",
"def set_default_color(cls, color: ColorLike):\n cls._default_color = parse_color(color)",
"def SetDefaultColours(self, base_colour = None):\r\n if bas... | [
"0.69058985",
"0.67549616",
"0.6582414",
"0.5973009",
"0.5951728",
"0.5708693",
"0.5655213",
"0.5626111",
"0.55481404",
"0.5500362",
"0.5476055",
"0.54536104",
"0.5423463",
"0.5416053",
"0.53771305",
"0.53263175",
"0.53263175",
"0.53263175",
"0.5306694",
"0.52839124",
"0.5262... | 0.8932289 | 0 |
Sets the default_sort_column of this ChartSettings. | def default_sort_column(self, default_sort_column):
self._default_sort_column = default_sort_column | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sort_by_default(self):\n self.data.sort()",
"def sort_default(self, collection: TVCollection) -> TVCollection:\n res = collection.sort(\n [\n (sort.name, -1 if sort.meta[\"default\"] == \"desc\" else 1)\n for sort in self.default\n ],\n ... | [
"0.61537975",
"0.6043363",
"0.5908507",
"0.5718961",
"0.57001275",
"0.5698158",
"0.56038624",
"0.55854994",
"0.54988813",
"0.5490009",
"0.54725975",
"0.5432225",
"0.54224217",
"0.5378995",
"0.5372457",
"0.53339213",
"0.5202141",
"0.51656336",
"0.5159669",
"0.5142686",
"0.5105... | 0.86691046 | 0 |
Sets the expected_data_spacing of this ChartSettings. | def expected_data_spacing(self, expected_data_spacing):
self._expected_data_spacing = expected_data_spacing | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def spacing(self, spacing):\n\n self._spacing = spacing",
"def SetSpacing(self, spacing):\r\n \r\n self._spacing = spacing\r\n self._dirty = True",
"def setTickSpacing(self, x=None, y=None):\n self.opts['tickSpacing'] = (x or self.opts['tickSpacing'][0],\n ... | [
"0.6112673",
"0.60588807",
"0.5540782",
"0.5397812",
"0.51109",
"0.50048393",
"0.4905253",
"0.4892345",
"0.4875782",
"0.4875782",
"0.4875782",
"0.48755425",
"0.48680714",
"0.48549297",
"0.48288092",
"0.48243997",
"0.481005",
"0.47935125",
"0.47805867",
"0.47804084",
"0.476283... | 0.8447722 | 0 |
Sets the fixed_legend_filter_field of this ChartSettings. | def fixed_legend_filter_field(self, fixed_legend_filter_field):
allowed_values = ["CURRENT", "MEAN", "MEDIAN", "SUM", "MIN", "MAX", "COUNT"] # noqa: E501
if (self._configuration.client_side_validation and
fixed_legend_filter_field not in allowed_values):
raise ValueError(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fixed_legend_filter_limit(self, fixed_legend_filter_limit):\n\n self._fixed_legend_filter_limit = fixed_legend_filter_limit",
"def fixed_legend_enabled(self, fixed_legend_enabled):\n\n self._fixed_legend_enabled = fixed_legend_enabled",
"def fixed_legend_filter_sort(self, fixed_legend_filter_... | [
"0.8437025",
"0.7302233",
"0.6942907",
"0.65435994",
"0.6203267",
"0.60556763",
"0.58960444",
"0.5823875",
"0.5709674",
"0.56507623",
"0.562473",
"0.55634683",
"0.5514734",
"0.5282231",
"0.52570623",
"0.52278554",
"0.52008235",
"0.50792223",
"0.5045545",
"0.5043961",
"0.49944... | 0.84448147 | 0 |
Sets the fixed_legend_filter_limit of this ChartSettings. | def fixed_legend_filter_limit(self, fixed_legend_filter_limit):
self._fixed_legend_filter_limit = fixed_legend_filter_limit | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fixed_legend_filter_field(self, fixed_legend_filter_field):\n allowed_values = [\"CURRENT\", \"MEAN\", \"MEDIAN\", \"SUM\", \"MIN\", \"MAX\", \"COUNT\"] # noqa: E501\n if (self._configuration.client_side_validation and\n fixed_legend_filter_field not in allowed_values):\n ... | [
"0.7524952",
"0.6881501",
"0.6259609",
"0.62494767",
"0.59684336",
"0.5789",
"0.5674768",
"0.5309351",
"0.5306914",
"0.52898",
"0.523762",
"0.5204917",
"0.5141984",
"0.51375073",
"0.51314956",
"0.5068775",
"0.5058213",
"0.5029095",
"0.50152576",
"0.50062644",
"0.5003571",
"... | 0.9307745 | 0 |
Sets the fixed_legend_show_source_name of this ChartSettings. | def fixed_legend_show_source_name(self, fixed_legend_show_source_name):
self._fixed_legend_show_source_name = fixed_legend_show_source_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fixed_legend_show_metric_name(self, fixed_legend_show_metric_name):\n\n self._fixed_legend_show_metric_name = fixed_legend_show_metric_name",
"def fixed_legend_hide_label(self, fixed_legend_hide_label):\n\n self._fixed_legend_hide_label = fixed_legend_hide_label",
"def fixed_legend_enabled(se... | [
"0.7713248",
"0.6526475",
"0.6343713",
"0.6147606",
"0.5986264",
"0.5971434",
"0.5814892",
"0.5579745",
"0.55403197",
"0.55049604",
"0.549448",
"0.5230281",
"0.5157622",
"0.51373047",
"0.5134051",
"0.5117737",
"0.503023",
"0.50238043",
"0.5007413",
"0.49492908",
"0.4946708",
... | 0.905883 | 0 |
Sets the logs_table of this ChartSettings. | def logs_table(self, logs_table):
self._logs_table = logs_table | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def logs_bucket(self, logs_bucket):\n\n self._logs_bucket = logs_bucket",
"def table(self, table):\n self._table = table",
"def table(self, table):\n self._table = table",
"def table(self, table):\n self._table = table\n return self",
"def chart_data_table(self, chart_dat... | [
"0.5869441",
"0.5800647",
"0.5800647",
"0.5645287",
"0.55788165",
"0.5554835",
"0.55023795",
"0.54371786",
"0.5411307",
"0.5377653",
"0.5312828",
"0.522602",
"0.5220393",
"0.51642793",
"0.5161006",
"0.5161006",
"0.5161006",
"0.51270956",
"0.5119136",
"0.51179",
"0.5107778",
... | 0.8409059 | 0 |
Sets the show_labels of this ChartSettings. | def show_labels(self, show_labels):
self._show_labels = show_labels | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_show_labels(self, show):\n self._show_labels = show",
"def toggle_show_labels(self, checked):\n logger.debug(\"Set show labels to %s.\", checked)\n self.do_show_labels = checked\n self.text_visual.toggle()\n self.canvas.update()",
"def labels(self, labels):\n\n ... | [
"0.8601987",
"0.6750299",
"0.6417814",
"0.6417814",
"0.6417814",
"0.6417814",
"0.6417814",
"0.6376051",
"0.6355083",
"0.6275331",
"0.61258876",
"0.6100143",
"0.6029657",
"0.598414",
"0.594782",
"0.59009075",
"0.57964456",
"0.57700485",
"0.57567835",
"0.57317245",
"0.57071686"... | 0.8183682 | 1 |
Sets the show_raw_values of this ChartSettings. | def show_raw_values(self, show_raw_values):
self._show_raw_values = show_raw_values | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def override_raw(self):\n\n self.raw_dispersion = self.dispersion\n self.raw_flux = self.flux\n self.raw_flux_err = self.flux_err",
"def raw_data_setting(self, raw_data_setting):\n\n self._raw_data_setting = raw_data_setting",
"def show_response_set_value_too(self, show_response_set... | [
"0.56142426",
"0.5609206",
"0.5461166",
"0.54228926",
"0.5297925",
"0.5223183",
"0.5189645",
"0.517515",
"0.5173073",
"0.5070584",
"0.50470537",
"0.5034033",
"0.50239676",
"0.4973755",
"0.49733943",
"0.48986953",
"0.48691383",
"0.48589826",
"0.47737664",
"0.47737664",
"0.4773... | 0.8585424 | 0 |
Sets the sort_values_descending of this ChartSettings. | def sort_values_descending(self, sort_values_descending):
self._sort_values_descending = sort_values_descending | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sortValues(self, cmp=None, key=None, reverse=False):\n self._sortValues = dict(cmp=cmp, key=key, reverse=reverse)\n return self",
"def sort(self, desc):\n self.__sortByIndex(0, desc)",
"def sort_descending(self):\n # sort_descending_sitem = self.locator_finder_by_idx(self.sort_d... | [
"0.5938076",
"0.5937494",
"0.56364405",
"0.5392813",
"0.53360444",
"0.522142",
"0.5180882",
"0.51576585",
"0.5156205",
"0.5155924",
"0.51415986",
"0.5091343",
"0.5085132",
"0.50206363",
"0.49392343",
"0.49254242",
"0.49066678",
"0.48975405",
"0.48975167",
"0.48967764",
"0.489... | 0.8679776 | 0 |
Sets the sparkline_decimal_precision of this ChartSettings. | def sparkline_decimal_precision(self, sparkline_decimal_precision):
self._sparkline_decimal_precision = sparkline_decimal_precision | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_decimal_precision(self, decimal_precision):\n assert (decimal_precision >= 0.0) and (decimal_precision <= 5.0), 'Decimal precision must be between 0 and 5'\n self.decimal_precision = int(round(decimal_precision))",
"def set_precision(prec = None):\n context = decimal.getcontext()\n ... | [
"0.6938764",
"0.62457985",
"0.61212206",
"0.602649",
"0.60225064",
"0.5649497",
"0.5621379",
"0.5621379",
"0.55863076",
"0.55617684",
"0.5557696",
"0.5546792",
"0.5492912",
"0.5491105",
"0.54871535",
"0.5478126",
"0.5411497",
"0.53586334",
"0.53224146",
"0.52222294",
"0.52038... | 0.88669914 | 0 |
Sets the sparkline_display_color of this ChartSettings. | def sparkline_display_color(self, sparkline_display_color):
self._sparkline_display_color = sparkline_display_color | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_line_color(self, sparkline_line_color):\n\n self._sparkline_line_color = sparkline_line_color",
"def sparkline_fill_color(self, sparkline_fill_color):\n\n self._sparkline_fill_color = sparkline_fill_color",
"def sparkline_display_font_size(self, sparkline_display_font_size):\n\n ... | [
"0.73047245",
"0.6683697",
"0.624641",
"0.59684306",
"0.5680157",
"0.56195164",
"0.5455005",
"0.53495413",
"0.5342941",
"0.5330716",
"0.53236437",
"0.526019",
"0.5219978",
"0.520401",
"0.5180683",
"0.5164526",
"0.51463294",
"0.5133249",
"0.5129174",
"0.51199514",
"0.5111215",... | 0.87028205 | 0 |
Sets the sparkline_display_font_size of this ChartSettings. | def sparkline_display_font_size(self, sparkline_display_font_size):
self._sparkline_display_font_size = sparkline_display_font_size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def font_size(self, font_size):\n\n self._font_size = font_size",
"def sparkline_size(self, sparkline_size):\n allowed_values = [\"BACKGROUND\", \"BOTTOM\", \"NONE\"] # noqa: E501\n if (self._configuration.client_side_validation and\n sparkline_size not in allowed_values):\n ... | [
"0.662985",
"0.6445412",
"0.62824225",
"0.6245462",
"0.6094747",
"0.59462905",
"0.5935979",
"0.58959246",
"0.5724745",
"0.5722343",
"0.5702969",
"0.56902456",
"0.5637997",
"0.5543562",
"0.5507207",
"0.54485816",
"0.5427169",
"0.54058594",
"0.5390002",
"0.53892034",
"0.5383401... | 0.9009938 | 0 |
Sets the sparkline_display_horizontal_position of this ChartSettings. | def sparkline_display_horizontal_position(self, sparkline_display_horizontal_position):
allowed_values = ["MIDDLE", "LEFT", "RIGHT"] # noqa: E501
if (self._configuration.client_side_validation and
sparkline_display_horizontal_position not in allowed_values):
raise ValueError... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_display_prefix(self, sparkline_display_prefix):\n\n self._sparkline_display_prefix = sparkline_display_prefix",
"def sparkline_display_vertical_position(self, sparkline_display_vertical_position):\n\n self._sparkline_display_vertical_position = sparkline_display_vertical_position",
... | [
"0.60324633",
"0.57971746",
"0.544668",
"0.5250932",
"0.52327275",
"0.52143586",
"0.5143603",
"0.5124676",
"0.5097541",
"0.5081225",
"0.4955086",
"0.4940195",
"0.491711",
"0.48928362",
"0.4846513",
"0.48408288",
"0.4836281",
"0.48302603",
"0.48200482",
"0.47865272",
"0.478616... | 0.8271252 | 0 |
Sets the sparkline_display_value_type of this ChartSettings. | def sparkline_display_value_type(self, sparkline_display_value_type):
allowed_values = ["VALUE", "LABEL"] # noqa: E501
if (self._configuration.client_side_validation and
sparkline_display_value_type not in allowed_values):
raise ValueError(
"Invalid value for... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetSignalDisplayType(self, value):\n config = ConfigParser.ConfigParser()\n config.read(self.app_conf)\n config.set(\"Settings\", \"signal_display_type\", value)\n configfile = open(self.app_conf, \"w\")\n config.write(configfile)\n self.signal_display_type = int(value... | [
"0.6536509",
"0.6528834",
"0.6339613",
"0.6116133",
"0.60021156",
"0.55345935",
"0.5380442",
"0.5321",
"0.5256539",
"0.52092373",
"0.52027833",
"0.5180545",
"0.515612",
"0.5142406",
"0.5118562",
"0.5085001",
"0.5075786",
"0.50749046",
"0.5017036",
"0.5014579",
"0.5014579",
... | 0.86249053 | 0 |
Sets the sparkline_display_vertical_position of this ChartSettings. | def sparkline_display_vertical_position(self, sparkline_display_vertical_position):
self._sparkline_display_vertical_position = sparkline_display_vertical_position | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_display_font_size(self, sparkline_display_font_size):\n\n self._sparkline_display_font_size = sparkline_display_font_size",
"def sparkline_display_color(self, sparkline_display_color):\n\n self._sparkline_display_color = sparkline_display_color",
"def sparkline_display_horizontal_po... | [
"0.5958295",
"0.5885382",
"0.56162894",
"0.5358182",
"0.51674104",
"0.5066679",
"0.50337416",
"0.5021826",
"0.49495494",
"0.49483734",
"0.49356067",
"0.48240328",
"0.47769094",
"0.476988",
"0.47213587",
"0.46996695",
"0.4671978",
"0.45565146",
"0.45546103",
"0.45315215",
"0.4... | 0.8741886 | 0 |
Sets the sparkline_line_color of this ChartSettings. | def sparkline_line_color(self, sparkline_line_color):
self._sparkline_line_color = sparkline_line_color | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_display_color(self, sparkline_display_color):\n\n self._sparkline_display_color = sparkline_display_color",
"def sparkline_fill_color(self, sparkline_fill_color):\n\n self._sparkline_fill_color = sparkline_fill_color",
"def line_color(self, line_color=None):\n\n if line_color... | [
"0.7504706",
"0.7137121",
"0.6658813",
"0.6464242",
"0.63008165",
"0.6205599",
"0.5983696",
"0.58255583",
"0.5815737",
"0.57359254",
"0.56474835",
"0.5639635",
"0.56001264",
"0.55845153",
"0.55337673",
"0.54830396",
"0.53383523",
"0.5305769",
"0.5298842",
"0.5275919",
"0.5275... | 0.8746077 | 0 |
Sets the sparkline_size of this ChartSettings. | def sparkline_size(self, sparkline_size):
allowed_values = ["BACKGROUND", "BOTTOM", "NONE"] # noqa: E501
if (self._configuration.client_side_validation and
sparkline_size not in allowed_values):
raise ValueError(
"Invalid value for `sparkline_size` ({0}), mus... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_display_font_size(self, sparkline_display_font_size):\n\n self._sparkline_display_font_size = sparkline_display_font_size",
"def set_point_size(self, pointSize):\n self.pointSize = pointSize",
"def set_pointsize(self, pointsize):\n\tself.m_pointsize = pointsize",
"def linewidth(se... | [
"0.74014145",
"0.6315585",
"0.6120433",
"0.61148334",
"0.6105837",
"0.59899765",
"0.5940697",
"0.59014934",
"0.58903635",
"0.5879892",
"0.58669996",
"0.58331877",
"0.57900184",
"0.57893324",
"0.5756916",
"0.57394576",
"0.571308",
"0.56805104",
"0.5623204",
"0.5573104",
"0.550... | 0.8166393 | 0 |
Sets the sparkline_value_color_map_apply_to of this ChartSettings. | def sparkline_value_color_map_apply_to(self, sparkline_value_color_map_apply_to):
allowed_values = ["TEXT", "BACKGROUND"] # noqa: E501
if (self._configuration.client_side_validation and
sparkline_value_color_map_apply_to not in allowed_values):
raise ValueError(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_value_color_map_values(self, sparkline_value_color_map_values):\n\n self._sparkline_value_color_map_values = sparkline_value_color_map_values",
"def sparkline_value_color_map_colors(self, sparkline_value_color_map_colors):\n\n self._sparkline_value_color_map_colors = sparkline_value_c... | [
"0.7943418",
"0.7746017",
"0.678967",
"0.6017741",
"0.6017158",
"0.6012376",
"0.57840776",
"0.5629536",
"0.5616764",
"0.56020296",
"0.55071044",
"0.5466912",
"0.54109627",
"0.5162716",
"0.51614255",
"0.51438797",
"0.51054025",
"0.50925744",
"0.50766915",
"0.50503486",
"0.5045... | 0.7865846 | 1 |
Sets the sparkline_value_color_map_colors of this ChartSettings. | def sparkline_value_color_map_colors(self, sparkline_value_color_map_colors):
self._sparkline_value_color_map_colors = sparkline_value_color_map_colors | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_value_color_map_values(self, sparkline_value_color_map_values):\n\n self._sparkline_value_color_map_values = sparkline_value_color_map_values",
"def sparkline_value_color_map_values_v2(self, sparkline_value_color_map_values_v2):\n\n self._sparkline_value_color_map_values_v2 = sparklin... | [
"0.8493917",
"0.69707054",
"0.6024618",
"0.5913041",
"0.5897749",
"0.57752633",
"0.57266986",
"0.5538652",
"0.5485674",
"0.5449524",
"0.53563935",
"0.5341812",
"0.5331198",
"0.52866125",
"0.5186362",
"0.51049477",
"0.5071804",
"0.49619767",
"0.48857817",
"0.48640552",
"0.4832... | 0.86433 | 0 |
Sets the sparkline_value_color_map_values of this ChartSettings. | def sparkline_value_color_map_values(self, sparkline_value_color_map_values):
self._sparkline_value_color_map_values = sparkline_value_color_map_values | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_value_color_map_colors(self, sparkline_value_color_map_colors):\n\n self._sparkline_value_color_map_colors = sparkline_value_color_map_colors",
"def sparkline_value_color_map_values_v2(self, sparkline_value_color_map_values_v2):\n\n self._sparkline_value_color_map_values_v2 = sparklin... | [
"0.8060909",
"0.731766",
"0.5944701",
"0.5767779",
"0.57214415",
"0.56621516",
"0.549373",
"0.5407897",
"0.5352722",
"0.5315338",
"0.5269997",
"0.5257382",
"0.52531326",
"0.5244342",
"0.5178678",
"0.51277053",
"0.50508016",
"0.49352717",
"0.48918232",
"0.4841601",
"0.47193223... | 0.8879558 | 0 |
Sets the sparkline_value_color_map_values_v2 of this ChartSettings. | def sparkline_value_color_map_values_v2(self, sparkline_value_color_map_values_v2):
self._sparkline_value_color_map_values_v2 = sparkline_value_color_map_values_v2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_value_color_map_values(self, sparkline_value_color_map_values):\n\n self._sparkline_value_color_map_values = sparkline_value_color_map_values",
"def sparkline_value_color_map_colors(self, sparkline_value_color_map_colors):\n\n self._sparkline_value_color_map_colors = sparkline_value_c... | [
"0.87429154",
"0.78490305",
"0.5840822",
"0.5427445",
"0.5413663",
"0.5394311",
"0.5172983",
"0.5068483",
"0.5026647",
"0.49810746",
"0.49665058",
"0.49578458",
"0.48959598",
"0.48781714",
"0.48625004",
"0.48526612",
"0.4839992",
"0.47407484",
"0.4733319",
"0.4660338",
"0.459... | 0.84200186 | 1 |
Sets the sparkline_value_text_map_text of this ChartSettings. | def sparkline_value_text_map_text(self, sparkline_value_text_map_text):
self._sparkline_value_text_map_text = sparkline_value_text_map_text | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparkline_value_text_map_thresholds(self, sparkline_value_text_map_thresholds):\n\n self._sparkline_value_text_map_thresholds = sparkline_value_text_map_thresholds",
"def sparkline_value_color_map_values(self, sparkline_value_color_map_values):\n\n self._sparkline_value_color_map_values = spark... | [
"0.6723052",
"0.6021238",
"0.5966888",
"0.5399499",
"0.53741246",
"0.53653795",
"0.5328207",
"0.5288985",
"0.5255413",
"0.5190608",
"0.51673657",
"0.5122282",
"0.51089907",
"0.5093755",
"0.50889385",
"0.5069987",
"0.5069987",
"0.50302535",
"0.50236386",
"0.50199336",
"0.49986... | 0.8941898 | 0 |
Sets the stack_type of this ChartSettings. | def stack_type(self, stack_type):
allowed_values = ["zero", "expand", "wiggle", "silhouette", "bars"] # noqa: E501
if (self._configuration.client_side_validation and
stack_type not in allowed_values):
raise ValueError(
"Invalid value for `stack_type` ({0}), m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_type(self, type: int):\r\n self.type = type\r\n self.canvas.itemconfig(self.item, image=self._get_image())",
"def setDataSetType(self, type):\n self.__data_set_type__ = type",
"def set_current_stack(self, stack):\n self.current_stack = stack",
"def set_type(self, type):\n ... | [
"0.62533087",
"0.58876723",
"0.58236545",
"0.57774127",
"0.57774127",
"0.56222314",
"0.55098444",
"0.5379386",
"0.5364797",
"0.533388",
"0.53227234",
"0.531335",
"0.5299238",
"0.52783",
"0.52484494",
"0.52484494",
"0.52466613",
"0.52432275",
"0.5186551",
"0.51616895",
"0.5147... | 0.814991 | 0 |
Sets the time_based_coloring of this ChartSettings. | def time_based_coloring(self, time_based_coloring):
self._time_based_coloring = time_based_coloring | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def change_timer_color(timez):\r\n\r\n if timez > 90:\r\n stopwatch.configure(bg='green')\r\n if 31 <= timez <= 90:\r\n stopwatch.configure(bg='yellow')\r\n elif 0 <= timez <= 30:\r\n stopwatch.configure(bg='red')",
"def set_tile_color(self, x, y, color):\n self.__tile_grid[y... | [
"0.5712925",
"0.51946884",
"0.50866854",
"0.5000518",
"0.49882045",
"0.49452212",
"0.4938226",
"0.49345225",
"0.48845664",
"0.4874002",
"0.48490843",
"0.48242664",
"0.4794049",
"0.47721812",
"0.47639588",
"0.4757824",
"0.47546655",
"0.4749862",
"0.47484797",
"0.4744021",
"0.4... | 0.8452467 | 0 |
Sets the xmax of this ChartSettings. | def xmax(self, xmax):
self._xmax = xmax | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_xmax(self, xmax):\n self.__xmax = xmax",
"def xmax(self):\n return self.bbox[1][0]",
"def xmax(self, destination):\n self.move(destination=(destination, 0), origin=self.bbox[1], axis=\"x\")",
"def xmax(self):\n return asarray([b[1] for b in self.bounds])",
"def get_xmax(... | [
"0.8381969",
"0.6885811",
"0.6556471",
"0.6504931",
"0.6427372",
"0.60770833",
"0.60074115",
"0.59608525",
"0.5954221",
"0.58825386",
"0.553723",
"0.5406324",
"0.53779215",
"0.53346425",
"0.53083324",
"0.5304942",
"0.5291525",
"0.5290844",
"0.52541596",
"0.5232337",
"0.522974... | 0.84559745 | 0 |
Sets the y0_unit_autoscaling of this ChartSettings. | def y0_unit_autoscaling(self, y0_unit_autoscaling):
self._y0_unit_autoscaling = y0_unit_autoscaling | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y1_unit_autoscaling(self, y1_unit_autoscaling):\n\n self._y1_unit_autoscaling = y1_unit_autoscaling",
"def setYUnits(self, units): \n self.__y_units__ = units",
"def setScaleY(self,starty,endy):\r\n if starty == endy:# Prevent /0 errors when scaling\r\n endy += 0.1\r\... | [
"0.77352893",
"0.5904496",
"0.5813287",
"0.5410098",
"0.5296556",
"0.52602744",
"0.5110165",
"0.50903136",
"0.508791",
"0.49951476",
"0.49929422",
"0.49527416",
"0.49425635",
"0.4930689",
"0.4927193",
"0.4862306",
"0.48614118",
"0.47905353",
"0.47905353",
"0.47882372",
"0.478... | 0.8854778 | 0 |
Sets the y1_max of this ChartSettings. | def y1_max(self, y1_max):
self._y1_max = y1_max | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y1_min(self, y1_min):\n\n self._y1_min = y1_min",
"def set_y(self, value: int) -> None:\n assert -self.__max_value <= value and value <= self.__max_value\n\n should_sync = self.__y != value\n self.__y = value\n if should_sync:\n self.__sync_y()",
"def y1(self, ... | [
"0.68676895",
"0.67066765",
"0.6344862",
"0.63295704",
"0.63177437",
"0.63020587",
"0.6237344",
"0.62083024",
"0.6196991",
"0.6181161",
"0.61293167",
"0.61274594",
"0.61274594",
"0.6118971",
"0.6084767",
"0.6081951",
"0.6043553",
"0.59906507",
"0.5958318",
"0.5958318",
"0.594... | 0.88931 | 0 |
Sets the y1_unit_autoscaling of this ChartSettings. | def y1_unit_autoscaling(self, y1_unit_autoscaling):
self._y1_unit_autoscaling = y1_unit_autoscaling | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y0_unit_autoscaling(self, y0_unit_autoscaling):\n\n self._y0_unit_autoscaling = y0_unit_autoscaling",
"def y1_units(self, y1_units):\n\n self._y1_units = y1_units",
"def y1_min(self, y1_min):\n\n self._y1_min = y1_min",
"def y1_max(self, y1_max):\n\n self._y1_max = y1_max",
... | [
"0.7687511",
"0.6728068",
"0.6101528",
"0.5994629",
"0.59227717",
"0.5748989",
"0.573864",
"0.56999916",
"0.51238596",
"0.5093478",
"0.5093478",
"0.5046215",
"0.50440073",
"0.50363564",
"0.50212556",
"0.49565142",
"0.49492437",
"0.49389535",
"0.49356562",
"0.49333745",
"0.491... | 0.8900208 | 0 |
Sets the y1_units of this ChartSettings. | def y1_units(self, y1_units):
self._y1_units = y1_units | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setYUnits(self, units): \n self.__y_units__ = units",
"def y1(self, y1=None):\n\n if y1 is None:\n return self._y1\n else:\n if not isinstance(y1, int) and not isinstance(y1, float):\n raise TypeError(\"y1 must be numeric, not '%s'\" % y1)\n ... | [
"0.74864125",
"0.7230207",
"0.69394964",
"0.6757722",
"0.6633624",
"0.65916854",
"0.61989397",
"0.61137474",
"0.60931814",
"0.60781366",
"0.58470124",
"0.5819297",
"0.58093715",
"0.57300466",
"0.57184154",
"0.57059735",
"0.57016426",
"0.57016426",
"0.5674542",
"0.5655629",
"0... | 0.888506 | 0 |
Sets the ymax of this ChartSettings. | def ymax(self, ymax):
self._ymax = ymax | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_ymax(self, ymax):\n self.__ymax = ymax",
"def set_ymin(self, ymin):\n self.__ymin = ymin",
"def get_ymax(self):\n return self.__ymax",
"def ymax(self):\n return self.bbox[1][1]",
"def ymax(self, destination):\n self.move(destination=(0, destination), origin=self.b... | [
"0.86019546",
"0.6703272",
"0.65565985",
"0.6341002",
"0.62153465",
"0.6211732",
"0.61978257",
"0.6146069",
"0.6056919",
"0.5877326",
"0.5826838",
"0.5815655",
"0.56810075",
"0.5639085",
"0.562267",
"0.5561537",
"0.55370164",
"0.55079794",
"0.5468727",
"0.5465269",
"0.5457735... | 0.84279746 | 1 |
Sets the ymin of this ChartSettings. | def ymin(self, ymin):
self._ymin = ymin | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_ymin(self, ymin):\n self.__ymin = ymin",
"def ymin(self):\n return self.bbox[0][1]",
"def get_ymin(self):\n return self.__ymin",
"def ymin(self, destination):\n self.move(destination=(0, destination), origin=self.bbox[0], axis=\"y\")",
"def set_ymax(self, ymax):\n ... | [
"0.8317555",
"0.64404696",
"0.64006203",
"0.63563776",
"0.5794118",
"0.55898154",
"0.527965",
"0.5208196",
"0.5179529",
"0.5048264",
"0.50050133",
"0.50036734",
"0.49247044",
"0.48754382",
"0.48531294",
"0.4828316",
"0.47371256",
"0.47227594",
"0.47101092",
"0.4673688",
"0.46... | 0.82474077 | 1 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, ChartSettings):
return False
return self.to_dict() == other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
if not isinstance(other, ChartSettings):
return True
return self.to_dict() != other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
Returns the list of annotation datasets available e.g ENCODE, ENSEMBL, ROADMAP | def datasets(self):
return [Dataset.ENSEMBL] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def datasets(self):\n return [Dataset.GWAS_CATALOG, Dataset.CLINVAR, Dataset.EFO]",
"def get_available_datasets():\n files = [file for file in glob.glob(os.path.join(MODULE_ROOT, \"datasets/*.json\"))]\n datasets = []\n for file in files:\n with open(file, \"r\") as f:\n dataset_inf... | [
"0.7153514",
"0.707449",
"0.6931069",
"0.6853005",
"0.65367866",
"0.6451738",
"0.6391671",
"0.6286463",
"0.6279378",
"0.62706083",
"0.62585944",
"0.6223354",
"0.6181521",
"0.6163108",
"0.61349714",
"0.61334395",
"0.6118307",
"0.6101716",
"0.6068086",
"0.603942",
"0.6029649",
... | 0.67954886 | 4 |
Returns a pair of left/right child indices for a given index | def _get_child_indices(self, current_index: int) -> List[int]:
multiplier = current_index * 2
left_index = multiplier + 1
right_index = multiplier + 2
return [left_index, right_index] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_child_indices(idx: int):\n return 2 * idx + 1, 2 * idx + 2",
"def right_child_idx(idx):\n return (idx + 1) << 1",
"def left_child_idx(idx):\n return (idx << 1) + 1",
"def getChilds(self, index):\n return index, (2 * index) + 1, (2 * index) + 2",
"def get_right_child_index(self):\n ... | [
"0.8161935",
"0.76558477",
"0.7604487",
"0.7576859",
"0.72656006",
"0.7262104",
"0.71646476",
"0.7127034",
"0.7114357",
"0.71017444",
"0.7079427",
"0.70670646",
"0.69556254",
"0.68196225",
"0.6755789",
"0.66756696",
"0.6427803",
"0.6409698",
"0.6389759",
"0.63748443",
"0.6338... | 0.7788916 | 1 |
If self.camera_end_time and self.actual_end_time are set, gets the camera time to actual time ratio. Otherwise, None Returns | def get_time_ratio(self) -> Optional[float]:
if (
self.actual_start_time is None
or self.camera_end_time is None
or self.actual_end_time is None
):
return None
camera_elapsed_time = self.camera_end_time - self.camera_start_time
actual_elap... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_time_ratio(self) -> Optional[float]:\n time_ratios: list[float] = []\n for lt in self.camera_placements.values():\n time_ratio = lt.get_time_ratio()\n if time_ratio is not None:\n time_ratios.append(time_ratio)\n\n if len(time_ratios) == 0:\n ... | [
"0.71291155",
"0.7021402",
"0.59866035",
"0.596021",
"0.592451",
"0.5881927",
"0.58221483",
"0.58197457",
"0.5808487",
"0.58044475",
"0.57649666",
"0.57583934",
"0.57352614",
"0.56850827",
"0.56784177",
"0.5661535",
"0.56431335",
"0.5630268",
"0.56209636",
"0.56069744",
"0.56... | 0.86565024 | 0 |
Gets the mean of calling the .get_time_ratio method on each LocationTime in self.camera_placements. Returns | def get_time_ratio(self) -> Optional[float]:
time_ratios: list[float] = []
for lt in self.camera_placements.values():
time_ratio = lt.get_time_ratio()
if time_ratio is not None:
time_ratios.append(time_ratio)
if len(time_ratios) == 0:
return N... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def avg(self):\n return sum(self.times) / len(self.times)",
"def avg(self):\n return sum(self.times) / len(self.times)",
"def avg(self):\n return sum(self.times) / len(self.times)",
"def current_mean(self):\r\n values = self._timings\r\n return np.mean(values)",
"def get_... | [
"0.6757519",
"0.6757519",
"0.6757519",
"0.64345104",
"0.6427302",
"0.6417928",
"0.63230133",
"0.6258731",
"0.6224439",
"0.6113667",
"0.60387015",
"0.5961411",
"0.59533215",
"0.5888908",
"0.58503187",
"0.57637405",
"0.5750852",
"0.57176536",
"0.56753",
"0.56606025",
"0.5641246... | 0.74463254 | 0 |
Convert from Lab to XYZ | def Lab_to_XYZ(cobj, *args, **kwargs):
illum = cobj.get_illuminant_xyz()
xyz_y = (cobj.lab_l + 16.0) / 116.0
xyz_x = cobj.lab_a / 500.0 + xyz_y
xyz_z = xyz_y - cobj.lab_b / 200.0
if math.pow(xyz_y, 3) > color_constants.CIE_E:
xyz_y = math.pow(xyz_y, 3)
else:
xyz_y ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def example_lab_to_xyz():\r\n\r\n print(\"=== Simple Example: Lab->XYZ ===\")\r\n # Instantiate an Lab color object with the given values.\r\n lab = LabColor(0.903, 16.296, -2.22)\r\n # Show a string representation.\r\n print(lab)\r\n # Convert to XYZ.\r\n xyz = convert_color(lab, XYZColor)\r\... | [
"0.80018306",
"0.73400104",
"0.71632826",
"0.71136284",
"0.7073471",
"0.69350183",
"0.6565516",
"0.6321721",
"0.6293378",
"0.6265149",
"0.62406296",
"0.624025",
"0.62188476",
"0.6214183",
"0.6145534",
"0.61125505",
"0.6081548",
"0.6060069",
"0.6058238",
"0.6051142",
"0.602572... | 0.79622144 | 1 |
Convert from LCH(ab) to Lab. | def LCHab_to_Lab(cobj, *args, **kwargs):
lab_l = cobj.lch_l
lab_a = math.cos(math.radians(cobj.lch_h)) * cobj.lch_c
lab_b = math.sin(math.radians(cobj.lch_h)) * cobj.lch_c
return LabColor(
lab_l, lab_a, lab_b, illuminant=cobj.illuminant, observer=cobj.observer) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lab_to_LCHab(cobj, *args, **kwargs):\r\n \r\n lch_l = cobj.lab_l\r\n lch_c = math.sqrt(math.pow(float(cobj.lab_a), 2) + math.pow(float(cobj.lab_b), 2))\r\n lch_h = math.atan2(float(cobj.lab_b), float(cobj.lab_a))\r\n \r\n if lch_h > 0:\r\n lch_h = (lch_h / math.pi) * 180\r\n else:\r\n... | [
"0.7526085",
"0.7512106",
"0.6939875",
"0.6673703",
"0.66222394",
"0.65781295",
"0.6496539",
"0.64181423",
"0.63498044",
"0.63085836",
"0.6167959",
"0.6091894",
"0.59792185",
"0.5964126",
"0.57572055",
"0.57320213",
"0.5723716",
"0.56727356",
"0.5586891",
"0.5576349",
"0.5484... | 0.75550956 | 0 |
Convert from LCH(uv) to Luv. | def LCHuv_to_Luv(cobj, *args, **kwargs):
luv_l = cobj.lch_l
luv_u = math.cos(math.radians(cobj.lch_h)) * cobj.lch_c
luv_v = math.sin(math.radians(cobj.lch_h)) * cobj.lch_c
return LuvColor(
luv_l, luv_u, luv_v, illuminant=cobj.illuminant, observer=cobj.observer) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Luv_to_LCHuv(cobj, *args, **kwargs):\r\n \r\n lch_l = cobj.luv_l\r\n lch_c = math.sqrt(math.pow(cobj.luv_u, 2.0) + math.pow(cobj.luv_v, 2.0))\r\n lch_h = math.atan2(float(cobj.luv_v), float(cobj.luv_u))\r\n \r\n if lch_h > 0:\r\n lch_h = (lch_h / math.pi) * 180\r\n else:\r\n lc... | [
"0.7813113",
"0.7731651",
"0.69760525",
"0.69108856",
"0.6537348",
"0.6259682",
"0.60237736",
"0.58952427",
"0.5803777",
"0.57453716",
"0.5734175",
"0.56790954",
"0.5626803",
"0.5500147",
"0.5454168",
"0.5430205",
"0.5425322",
"0.541817",
"0.5387409",
"0.53830403",
"0.5329655... | 0.79923046 | 0 |
RGB to XYZ conversion. Expects 0255 RGB values. | def RGB_to_XYZ(cobj, target_illuminant=None, *args, **kwargs):
# Will contain linearized RGB channels (removed the gamma func).
linear_channels = {}
if isinstance(cobj, sRGBColor):
for channel in ['r', 'g', 'b']:
V = getattr(cobj, 'rgb_' + channel)
if V <= 0.04045:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def example_rgb_to_xyz():\r\n\r\n print(\"=== RGB Example: RGB->XYZ ===\")\r\n # Instantiate an Lab color object with the given values.\r\n rgb = sRGBColor(120, 130, 140)\r\n # Show a string representation.\r\n print(rgb)\r\n # Convert RGB to XYZ using a D50 illuminant.\r\n xyz = convert_color... | [
"0.8051019",
"0.75253075",
"0.73588663",
"0.73479044",
"0.71023345",
"0.70663255",
"0.70314866",
"0.6965145",
"0.68980163",
"0.68657833",
"0.68653834",
"0.6853596",
"0.66713005",
"0.6566658",
"0.6519238",
"0.6444042",
"0.64347357",
"0.6424193",
"0.63788927",
"0.63682145",
"0.... | 0.6878719 | 9 |
Converts from CMY to CMYK. | def CMY_to_CMYK(cobj, *args, **kwargs):
var_k = 1.0
if cobj.cmy_c < var_k:
var_k = cobj.cmy_c
if cobj.cmy_m < var_k:
var_k = cobj.cmy_m
if cobj.cmy_y < var_k:
var_k = cobj.cmy_y
if var_k == 1:
cmyk_c = 0.0
cmyk_m = 0.0
cmyk_y = 0.0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CMYK_to_CMY(cobj, *args, **kwargs):\r\n\r\n cmy_c = cobj.cmyk_c * (1.0 - cobj.cmyk_k) + cobj.cmyk_k\r\n cmy_m = cobj.cmyk_m * (1.0 - cobj.cmyk_k) + cobj.cmyk_k\r\n cmy_y = cobj.cmyk_y * (1.0 - cobj.cmyk_k) + cobj.cmyk_k\r\n \r\n return CMYColor(cmy_c, cmy_m, cmy_y)",
"def _C2K(val):\n retur... | [
"0.6850313",
"0.6190852",
"0.6128946",
"0.595048",
"0.58821654",
"0.58463335",
"0.57951677",
"0.560292",
"0.5571244",
"0.54614097",
"0.543033",
"0.54243875",
"0.5355452",
"0.5233974",
"0.5212655",
"0.5191186",
"0.51910716",
"0.5187521",
"0.5184452",
"0.5182777",
"0.51733845",... | 0.72941476 | 0 |
Calculates the Delta E (CIE1976) of two colors. | def delta_e_cie1976(color1, color2):
color1_vector = _get_lab_color1_vector(color1)
color2_matrix = _get_lab_color2_matrix(color2)
delta_e = color_diff_matrix.delta_e_cie1976(color1_vector, color2_matrix)[0]
return numpy.asscalar(delta_e) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delta_e_cie1994(color1, color2, K_L=1, K_C=1, K_H=1, K_1=0.045, K_2=0.015):\r\n\r\n color1_vector = _get_lab_color1_vector(color1)\r\n color2_matrix = _get_lab_color2_matrix(color2)\r\n delta_e = color_diff_matrix.delta_e_cie1994(\r\n color1_vector, color2_matrix, K_L=K_L, K_C=K_C, K_H=K_H, K_1... | [
"0.7654498",
"0.76401967",
"0.72475797",
"0.71963745",
"0.70092344",
"0.69412464",
"0.6865894",
"0.6825772",
"0.6823835",
"0.6638399",
"0.66221154",
"0.64660364",
"0.6340658",
"0.6160762",
"0.6148158",
"0.60907227",
"0.5934985",
"0.5902305",
"0.5896104",
"0.58781767",
"0.5871... | 0.84150124 | 0 |
Calculates the Delta E (CIE1994) of two colors. | def delta_e_cie1994(color1, color2, K_L=1, K_C=1, K_H=1, K_1=0.045, K_2=0.015):
color1_vector = _get_lab_color1_vector(color1)
color2_matrix = _get_lab_color2_matrix(color2)
delta_e = color_diff_matrix.delta_e_cie1994(
color1_vector, color2_matrix, K_L=K_L, K_C=K_C, K_H=K_H, K_1=K_1, K_2=K_2)[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delta_e_cie1976(color1, color2):\r\n\r\n color1_vector = _get_lab_color1_vector(color1)\r\n color2_matrix = _get_lab_color2_matrix(color2)\r\n delta_e = color_diff_matrix.delta_e_cie1976(color1_vector, color2_matrix)[0]\r\n return numpy.asscalar(delta_e)",
"def delta_e_cie2000(color1, color2, Kl=... | [
"0.805198",
"0.77050495",
"0.71442825",
"0.7013599",
"0.69808495",
"0.69081146",
"0.68475235",
"0.6836786",
"0.67906797",
"0.66574174",
"0.6296036",
"0.62828684",
"0.62335485",
"0.6160268",
"0.59501845",
"0.59431577",
"0.5932613",
"0.5925156",
"0.5900661",
"0.58907217",
"0.58... | 0.8024648 | 1 |
Calculates the Delta E (CIE2000) of two colors. | def delta_e_cie2000(color1, color2, Kl=1, Kc=1, Kh=1):
color1_vector = _get_lab_color1_vector(color1)
color2_matrix = _get_lab_color2_matrix(color2)
delta_e = color_diff_matrix.delta_e_cie2000(
color1_vector, color2_matrix, Kl=Kl, Kc=Kc, Kh=Kh)[0]
return numpy.asscalar(delta_e) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delta_e_cie1976(color1, color2):\r\n\r\n color1_vector = _get_lab_color1_vector(color1)\r\n color2_matrix = _get_lab_color2_matrix(color2)\r\n delta_e = color_diff_matrix.delta_e_cie1976(color1_vector, color2_matrix)[0]\r\n return numpy.asscalar(delta_e)",
"def delta_e_cie1994(color1, color2, K_L... | [
"0.80209476",
"0.77312684",
"0.75139946",
"0.72669655",
"0.718059",
"0.7040724",
"0.6933383",
"0.6905096",
"0.6872967",
"0.68265235",
"0.6415031",
"0.62216824",
"0.61547226",
"0.61462384",
"0.60981387",
"0.6046349",
"0.6023748",
"0.5941019",
"0.5923687",
"0.587346",
"0.582144... | 0.815886 | 0 |
Calculates the Delta E (CMC) of two colors. CMC values | def delta_e_cmc(color1, color2, pl=2, pc=1):
color1_vector = _get_lab_color1_vector(color1)
color2_matrix = _get_lab_color2_matrix(color2)
delta_e = color_diff_matrix.delta_e_cmc(
color1_vector, color2_matrix, pl=pl, pc=pc)[0]
return numpy.asscalar(delta_e) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def color_dist(c1, c2):\n return sum((a - b) ** 2 for a, b in zip(to_ycc(c1), to_ycc(c2)))",
"def calc_color_distance(rgb1, rgb2):\n\n color1_rgb = sRGBColor(rgb1[0], rgb1[1], rgb1[2])\n color2_rgb = sRGBColor(rgb2[0], rgb2[1], rgb2[2])\n\n color1_lab = convert_color(color1_rgb, LabColor)\n color2... | [
"0.7102068",
"0.66141117",
"0.6592289",
"0.65913737",
"0.64397687",
"0.64116853",
"0.63775045",
"0.6141127",
"0.6090868",
"0.60541135",
"0.6015419",
"0.5994858",
"0.598395",
"0.5983945",
"0.5971087",
"0.59523386",
"0.592535",
"0.5908882",
"0.5899534",
"0.58977133",
"0.5848073... | 0.72648066 | 0 |
Calculates the Delta E (CIE1976) between `lab_color_vector` and all colors in `lab_color_matrix`. | def delta_e_cie1976(lab_color_vector, lab_color_matrix):
return numpy.sqrt(numpy.sum(numpy.power(lab_color_vector - lab_color_matrix, 2), axis=1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delta_e_cie1994(lab_color_vector, lab_color_matrix,\r\n K_L=1, K_C=1, K_H=1, K_1=0.045, K_2=0.015):\r\n\r\n C_1 = numpy.sqrt(numpy.sum(numpy.power(lab_color_vector[1:], 2)))\r\n C_2 = numpy.sqrt(numpy.sum(numpy.power(lab_color_matrix[:, 1:], 2), axis=1))\r\n\r\n delta_lab = lab_colo... | [
"0.81747544",
"0.7696604",
"0.76680756",
"0.7276024",
"0.7228165",
"0.69487774",
"0.67754513",
"0.65449005",
"0.6334735",
"0.6322116",
"0.6299107",
"0.62669915",
"0.6180441",
"0.61500007",
"0.58102524",
"0.5573375",
"0.54454803",
"0.5415633",
"0.5377061",
"0.5330786",
"0.5315... | 0.8575008 | 0 |
Calculates the Delta E (CIE1994) of two colors. | def delta_e_cie1994(lab_color_vector, lab_color_matrix,
K_L=1, K_C=1, K_H=1, K_1=0.045, K_2=0.015):
C_1 = numpy.sqrt(numpy.sum(numpy.power(lab_color_vector[1:], 2)))
C_2 = numpy.sqrt(numpy.sum(numpy.power(lab_color_matrix[:, 1:], 2), axis=1))
delta_lab = lab_color_vector - lab_co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delta_e_cie1976(color1, color2):\r\n\r\n color1_vector = _get_lab_color1_vector(color1)\r\n color2_matrix = _get_lab_color2_matrix(color2)\r\n delta_e = color_diff_matrix.delta_e_cie1976(color1_vector, color2_matrix)[0]\r\n return numpy.asscalar(delta_e)",
"def delta_e_cie1994(color1, color2, K_L... | [
"0.805198",
"0.8024648",
"0.77050495",
"0.71442825",
"0.69808495",
"0.69081146",
"0.68475235",
"0.6836786",
"0.67906797",
"0.66574174",
"0.6296036",
"0.62828684",
"0.62335485",
"0.6160268",
"0.59501845",
"0.59431577",
"0.5932613",
"0.5925156",
"0.5900661",
"0.58907217",
"0.58... | 0.7013599 | 4 |
Calculates the Delta E (CIE1994) of two colors. CMC values | def delta_e_cmc(lab_color_vector, lab_color_matrix, pl=2, pc=1):
L, a, b = lab_color_vector
C_1 = numpy.sqrt(numpy.sum(numpy.power(lab_color_vector[1:], 2)))
C_2 = numpy.sqrt(numpy.sum(numpy.power(lab_color_matrix[:, 1:], 2), axis=1))
delta_lab = lab_color_vector - lab_color_matrix
delt... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delta_e_cie1994(color1, color2, K_L=1, K_C=1, K_H=1, K_1=0.045, K_2=0.015):\r\n\r\n color1_vector = _get_lab_color1_vector(color1)\r\n color2_matrix = _get_lab_color2_matrix(color2)\r\n delta_e = color_diff_matrix.delta_e_cie1994(\r\n color1_vector, color2_matrix, K_L=K_L, K_C=K_C, K_H=K_H, K_1... | [
"0.7767449",
"0.7708649",
"0.7611709",
"0.7408474",
"0.70769703",
"0.7011218",
"0.69358116",
"0.6916636",
"0.68812346",
"0.68095917",
"0.67284435",
"0.6708789",
"0.6378027",
"0.6357091",
"0.59743726",
"0.5896367",
"0.5846133",
"0.58369726",
"0.5819963",
"0.5812553",
"0.581189... | 0.6671217 | 12 |
Calculates the Delta E (CIE2000) of two colors. | def delta_e_cie2000(lab_color_vector, lab_color_matrix, Kl=1, Kc=1, Kh=1):
L, a, b = lab_color_vector
avg_Lp = (L + lab_color_matrix[:, 0]) / 2.0
C1 = numpy.sqrt(numpy.sum(numpy.power(lab_color_vector[1:], 2)))
C2 = numpy.sqrt(numpy.sum(numpy.power(lab_color_matrix[:, 1:], 2), axis=1))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delta_e_cie2000(color1, color2, Kl=1, Kc=1, Kh=1):\r\n\r\n color1_vector = _get_lab_color1_vector(color1)\r\n color2_matrix = _get_lab_color2_matrix(color2)\r\n delta_e = color_diff_matrix.delta_e_cie2000(\r\n color1_vector, color2_matrix, Kl=Kl, Kc=Kc, Kh=Kh)[0]\r\n return numpy.asscalar(de... | [
"0.81589806",
"0.802226",
"0.77321297",
"0.7512381",
"0.72671753",
"0.71807367",
"0.7039816",
"0.69057834",
"0.68738794",
"0.6827925",
"0.6414585",
"0.6221013",
"0.61554575",
"0.61469465",
"0.6097662",
"0.6045108",
"0.6023738",
"0.59414595",
"0.5924527",
"0.58744127",
"0.5822... | 0.6933257 | 7 |
String representation of the object. | def __repr__(self):
retval = self.__class__.__name__ + '('
attributes = [(attr, getattr(self, attr)) for attr in self.VALUES]
values = [x + "=" + repr(y) for x, y in attributes]
retval += ','.join(values)
return retval + ')' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def as_string(self):\n return self.__repr__()",
"def __str__(self):\n return str(self.serialize())",
"def __str__(self):\n return str(self.__dict__['_obj'])",
"def __repr__(self):\n return str(self.__dict__)",
"def __repr__(self):\n return str(self.__dict__)",
"... | [
"0.83436894",
"0.8340401",
"0.8336263",
"0.8253022",
"0.8253022",
"0.8253022",
"0.8253022",
"0.8253022",
"0.82241017",
"0.82012856",
"0.81919605",
"0.817993",
"0.81702906",
"0.81702906",
"0.8165669",
"0.8158028",
"0.8158028",
"0.8158028",
"0.8158028",
"0.8158028",
"0.8158028"... | 0.0 | -1 |
Calculates the density of the SpectralColor. By default, Status T density is used, and the correct density distribution (Red, Green, or Blue) is chosen by comparing the Red, Green, and Blue components of the spectral sample (the values being red in via "filters"). | def calc_density(self, density_standard=None):
if density_standard is not None:
return density.ansi_density(self, density_standard)
else:
return density.auto_density(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ansi_density(color, density_standard):\r\n\r\n # Load the spec_XXXnm attributes into a Numpy array.\r\n sample = color.get_numpy_array()\r\n # Matrix multiplication\r\n intermediate = sample * density_standard\r\n \r\n # Sum the products.\r\n numerator = intermediate.sum()\r\n # This is... | [
"0.6397543",
"0.61545527",
"0.5998383",
"0.59935385",
"0.57631826",
"0.560724",
"0.5520742",
"0.5507057",
"0.550406",
"0.5453533",
"0.5432959",
"0.54292053",
"0.5427361",
"0.53888446",
"0.53599554",
"0.5355751",
"0.53529906",
"0.5325385",
"0.5315743",
"0.5288801",
"0.52874994... | 0.5393627 | 13 |
The clamped (0.01.0) R value. | def clamped_rgb_r(self):
return self._clamp_rgb_coordinate(self.rgb_r) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clamped_rgb_b(self):\r\n\r\n return self._clamp_rgb_coordinate(self.rgb_b)",
"def get_R(self):\n return self.R_min * tf.exp(self.R_ * self.log_R_range)",
"def standardize_rating(self, r):\n float_r = tf.cast(r, tf.float32)\n return (float_r-3)/2",
"def clamped_rgb_g(self):\r\n... | [
"0.6279587",
"0.62507063",
"0.62008744",
"0.6191541",
"0.60408103",
"0.600802",
"0.6001581",
"0.5990527",
"0.5987183",
"0.5952934",
"0.59380823",
"0.5937967",
"0.5934602",
"0.5923223",
"0.59162164",
"0.59113294",
"0.5857067",
"0.58556956",
"0.58344877",
"0.58282053",
"0.57954... | 0.7618736 | 0 |
This function shows a simple conversion of an Lab color to an XYZ color. | def example_lab_to_xyz():
print("=== Simple Example: Lab->XYZ ===")
# Instantiate an Lab color object with the given values.
lab = LabColor(0.903, 16.296, -2.22)
# Show a string representation.
print(lab)
# Convert to XYZ.
xyz = convert_color(lab, XYZColor)
print(xyz)
prin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def example_rgb_to_xyz():\r\n\r\n print(\"=== RGB Example: RGB->XYZ ===\")\r\n # Instantiate an Lab color object with the given values.\r\n rgb = sRGBColor(120, 130, 140)\r\n # Show a string representation.\r\n print(rgb)\r\n # Convert RGB to XYZ using a D50 illuminant.\r\n xyz = convert_color... | [
"0.86386657",
"0.8237668",
"0.7681855",
"0.7621139",
"0.69434506",
"0.6925111",
"0.6881029",
"0.67911285",
"0.67753613",
"0.67323565",
"0.6691838",
"0.6681621",
"0.66684294",
"0.66679007",
"0.66512007",
"0.6592575",
"0.6466353",
"0.6421443",
"0.6415184",
"0.63970274",
"0.6337... | 0.86701703 | 0 |
The formula I grabbed for LCHuv to XYZ had a zero division error in it if the L coord was 0. Also check against LCHab in case. Issue 13 in the Google Code tracker. | def test_conversion_to_rgb_zero_div(self):
lchab = LCHabColor(0.0, 0.0, 0.0)
rgb = convert_color(lchab, sRGBColor)
self.assertColorMatch(rgb, sRGBColor(0.0, 0.0, 0.0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cie_luv(self):\n K = Fraction(29, 3) ** 3\n e = Fraction(6, 29) ** 3\n XYZ = self.cie_xyz\n yr = XYZ[1] / D65[1]\n L = 116 * yr ** Fraction(1, 3) - 16 if yr > e else K * yr\n u = 13 * L * (U(*XYZ) - U(*D65))\n v = 13 * L * (V(*XYZ) - V(*D65))\n return (L,... | [
"0.67411536",
"0.6173361",
"0.6127093",
"0.6038911",
"0.60063225",
"0.59178793",
"0.58766866",
"0.58045876",
"0.5800855",
"0.5793221",
"0.5744083",
"0.5721722",
"0.5719813",
"0.5711754",
"0.57030773",
"0.5680329",
"0.5654372",
"0.56348646",
"0.5618561",
"0.55862844",
"0.55823... | 0.5372594 | 48 |
Preprocess date string to use in datefiled in database | def preprocess_date(date_):
if 'JAN' in date_:
date_ = date_.replace('JAN', '01')
elif 'FEB' in date_:
date_ = date_.replace('FEB', '02')
elif 'MAR' in date_:
date_ = date_.replace('MAR', '03')
elif 'APR' in date_:
date_ = date_.replace('APR', '04')
elif 'MAY' in date... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _str_to_date(self, date):\n return datetools.date_parser(date)",
"def unify_date_format(date):\n if type(date) == str:\n try:\n date = dateutil.parser.parse(date) \n except:\n pass\n return date",
"def convert_date_column(datestring):\n return datetime.... | [
"0.7102789",
"0.708365",
"0.6830428",
"0.682549",
"0.67735964",
"0.67281675",
"0.67165595",
"0.67096937",
"0.66952395",
"0.6678188",
"0.6673512",
"0.66506845",
"0.6623936",
"0.66097677",
"0.6608118",
"0.6573897",
"0.6572674",
"0.6496873",
"0.64850885",
"0.6475636",
"0.6456163... | 0.70377463 | 2 |
Allows access to enclosed ``EnvVars`` via property syntax. | def __getattr__(self, attr):
if attr in self._vars.keys():
return self._vars[attr]
else:
raise EnvError("Unknown environment variable: " + attr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_unquoted(self):\n e = yaenv.core.EnvVar('key = value\\n')\n assert e.key == 'key'\n assert e.value == 'value'\n assert e._interpolate",
"def test_double_quoted(self):\n e = yaenv.core.EnvVar('key = \"value\"\\n')\n assert e.key == 'key'\n assert e.value =... | [
"0.6624455",
"0.65831167",
"0.65600514",
"0.6131856",
"0.6101274",
"0.60782814",
"0.60667044",
"0.6015485",
"0.6009394",
"0.5964047",
"0.59302515",
"0.59049124",
"0.5895248",
"0.5888827",
"0.5865324",
"0.5865324",
"0.5865324",
"0.5865324",
"0.5850708",
"0.58232343",
"0.581139... | 0.6018756 | 7 |
Sets the new page number. | def set_page(self, page: int) -> None:
if page < 1:
raise ValueError('page must be at least 1, not %s.' % page)
self._page = page | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_page(self, page):\n self.page = int(page)\n\n if self.page <= 0:\n # set first page, which depends on a maximum set\n if self.get_max_per_page() > 0:\n self.page = 1\n else:\n self.page = 0",
"def page(self, number):\n se... | [
"0.75184953",
"0.74481887",
"0.73307174",
"0.7246589",
"0.71179575",
"0.69534415",
"0.69224906",
"0.68715996",
"0.66343904",
"0.6559515",
"0.6516103",
"0.65151966",
"0.6487196",
"0.64782864",
"0.64699256",
"0.64565253",
"0.64324415",
"0.6374054",
"0.6325537",
"0.6314753",
"0.... | 0.7008731 | 5 |
Retrieves the issue comments of a given pull request id. | def _get_issue_comments_body(self, pull_request_number: int) -> List[str]:
issue_comments = get_pull_request_issue_comments(
self._repo_name, pull_request_number, self._auth)
if not issue_comments:
return []
issue_comments_msg = []
for comment in issue_comments:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_comments(self, issue_id):\n data = self._get(\"/issues/{}/comments\".format(issue_id))\n comments = []\n for item in data:\n comments.append(\n Comment(item['user']['login'], item['body'])\n )\n return comments",
"def get(self, id, user=No... | [
"0.7731276",
"0.7227759",
"0.67533",
"0.663714",
"0.66360193",
"0.65446925",
"0.65446925",
"0.6487248",
"0.6457263",
"0.6428786",
"0.63859546",
"0.63462204",
"0.6257857",
"0.62317806",
"0.62294775",
"0.61938053",
"0.61152416",
"0.61126465",
"0.610581",
"0.608333",
"0.6049948"... | 0.64195913 | 10 |
Returns whether there is any station valve open or not. | def any_open_valve():
for dev in station_valve_dict:
if station_valve_dict[dev]:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def available(self) -> bool:\n return bool(self._api.surveillance_station)",
"def isstationary(self):\n if np.all(np.abs(self.arroots) > 1.0):\n return True\n else:\n return False",
"def available(self):\n return (\n self._connector.station_id is not... | [
"0.6882778",
"0.6847403",
"0.68402976",
"0.6743212",
"0.6611692",
"0.6526108",
"0.63857377",
"0.6319655",
"0.6298576",
"0.625654",
"0.62524956",
"0.6225789",
"0.6196671",
"0.6184069",
"0.6171343",
"0.6155179",
"0.6146206",
"0.60965985",
"0.60944337",
"0.6062958",
"0.60220796"... | 0.8190255 | 0 |
Sets the new irrigation schedule. | def set_irrigation_schedule(schedule):
global irrigation_schedule
# Read and parse the properties file.
f = open(FILE_PROPERTIES)
try:
data = json.loads(f.read())
except JSONDecodeError:
data = {}
finally:
f.close()
# Parse the given schedule.
try:
sch_j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def schedule(self, schedule):\n \n self._schedule = schedule",
"def schedule(self, schedule):\n\n self._schedule = schedule",
"def schedule(self, schedule):\n\n self._schedule = schedule",
"def set_schedule(self, day, week, schedule):\n self.schedule['schedule'][day][week] ... | [
"0.71644294",
"0.7123905",
"0.7123905",
"0.634621",
"0.6305872",
"0.6274632",
"0.6259718",
"0.6208227",
"0.6208227",
"0.60301757",
"0.60239214",
"0.5912023",
"0.59045506",
"0.5797899",
"0.57574403",
"0.5691236",
"0.56581193",
"0.56580544",
"0.5645243",
"0.5631804",
"0.5514188... | 0.7758451 | 0 |
Keras code to compute the pairwise distance matrix for a set of vectors specifie by the matrix X. | def get_dists(X):
x2 = torch.square(X).sum(dim=1).unsqueeze(1)
dists = x2 + x2.T - 2*X.matmul(X.T)
return dists | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pairwise_distances(X):\r\n sum_x_2 = tf.reduce_sum(tf.square(X), reduction_indices=1, keep_dims=False)\r\n D = sum_x_2 + tf.reshape(sum_x_2, [-1, 1]) - 2 * tf.matmul(X, tf.transpose(X))\r\n\r\n return D",
"def compute_pairwise_distances(input_vecs: types.Tensor) -> types.Tensor:\n r = tf.reduce_sum... | [
"0.7147479",
"0.6923456",
"0.6539364",
"0.6526143",
"0.6340515",
"0.6304615",
"0.6237018",
"0.6154187",
"0.61248255",
"0.6050846",
"0.60381585",
"0.6034491",
"0.6024202",
"0.6018888",
"0.59994423",
"0.5947584",
"0.5930946",
"0.5906172",
"0.5891716",
"0.5852776",
"0.5844918",
... | 0.5305871 | 91 |
Return the state attributes of the device. | def device_state_attributes(self):
attr = {
"uiclass": self.tahoma_device.uiclass,
"widget": self.tahoma_device.widget,
"type": self.tahoma_device.type,
}
if CORE_RSSI_LEVEL_STATE in self.tahoma_device.active_states:
attr[ATTR_RSSI_LEVEL] = self.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def device_state_attributes(self):\r\n return self.attributes",
"def device_state_attributes(self):\r\n return self._attributes",
"def device_state_attributes(self):\n return self._state_attrs",
"def device_state_attributes(self):\n return self._state_attrs",
"def device_state_a... | [
"0.9273788",
"0.9205358",
"0.9151585",
"0.9151585",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.914885",
"0.91487175",
"0.91487175",
"0.91376656",
"0.91105866",
"0.9048519... | 0.8352003 | 38 |
Validates if a provided IP address is a valide format | def validate_ip_address(ip_addr):
try:
ip_object = ipaddress.ip_address(ip_addr)
return True
except ValueError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_ip_format(self, ip_address):\n # regex for validating an Ip-address \n ip_regex = \"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))?$\"\n\n # validate ip address\n r = re.compile(ip_regex)\... | [
"0.8212886",
"0.7873695",
"0.7699177",
"0.7625917",
"0.75777125",
"0.7574564",
"0.7567266",
"0.75644135",
"0.7547723",
"0.7477745",
"0.747409",
"0.74433607",
"0.74381167",
"0.7433966",
"0.7415901",
"0.7388008",
"0.7382505",
"0.73656833",
"0.7349253",
"0.73486614",
"0.73215485... | 0.76880544 | 3 |
Lists all of the compatible subnets by Account ID and AWS Region | def getCompatibleSubnets(**kwargs):
orgID = kwargs["ORG_ID"]
sessiontoken = kwargs["sessiontoken"]
SddcID = kwargs["SDDC_ID"]
linkedAccountId = kwargs["LinkedAccount"]
region = kwargs["Region"]
strProdURL = kwargs["strProdURL"]
jsonResponse = get_compatible_subnets_json(strProdURL, orgID, s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list_subnet(self):\n _url = \"http://\" + self.host_ip + \":9696/v2.0/subnets\"\n _headers = {'Content-type': 'application/json',\n 'x-auth-token': self.project_info[\"token_project\"]}\n _body = None\n\n response = self.request(\"GET\", _url, _headers, _body)\n ... | [
"0.73089254",
"0.7164906",
"0.70720094",
"0.69715613",
"0.6952266",
"0.68660253",
"0.6848756",
"0.6792269",
"0.6753571",
"0.6741381",
"0.67094",
"0.6673966",
"0.660104",
"0.660104",
"0.6587365",
"0.6580114",
"0.64812297",
"0.6456498",
"0.6406646",
"0.6316116",
"0.620792",
"... | 0.7314722 | 0 |
Exports a routebased VPN prefix list to a local JSON file. | def exportRBVPNprefixlist(**kwargs):
proxy = kwargs['proxy']
session_token = kwargs['sessiontoken']
if kwargs['prefix_list_id'] is not None:
prefix_list_id = kwargs['prefix_list_id']
else:
print("Please specify the prefix list ID to export using --prefix-list-id. Use 'pyVMC.py rbvpn-pre... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def export_server_list_json(server_list, filename):\n\n with open(filename,\"w+\") as f:\n json.dump(server_list, f)\n\n return server_list",
"def write_output(version, aliases, zones, filename):\n data = OrderedDict()\n data[\"version\"] = version\n data[\"aliases\"] = OrderedD... | [
"0.6332841",
"0.6131997",
"0.6068809",
"0.60637915",
"0.5817438",
"0.580769",
"0.5797265",
"0.5717461",
"0.5680754",
"0.56769437",
"0.5660262",
"0.56349856",
"0.55718195",
"0.5550823",
"0.5545829",
"0.5537095",
"0.55157614",
"0.54976916",
"0.5491763",
"0.5475577",
"0.5448506"... | 0.80692524 | 0 |
Applies the function ``fn`` on each value of the configuration. | def _map_config_values(config, fn):
if isinstance(config, dict):
return {key: _map_config_values(value, fn) for key, value in config.items()}
elif isinstance(config, list):
return [_map_config_values(elem, fn) for elem in config]
else:
return fn(config) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def applyFuncOnValues(self, func):\r\n self._value = func(self._value)",
"def apply_fn(self,fn):\r\n \r\n self.check_Data()\r\n for split,data_ in self.processed_data.items():\r\n x = data_['x']\r\n x = np.array([fn(xi) for xi in x])\r\n data_['x'] = x... | [
"0.66302323",
"0.6142054",
"0.595443",
"0.58887094",
"0.57862353",
"0.57064843",
"0.565165",
"0.53839517",
"0.53709674",
"0.5363274",
"0.5355403",
"0.52863514",
"0.5286236",
"0.5281916",
"0.5268607",
"0.52482074",
"0.5240634",
"0.5216755",
"0.518502",
"0.51817936",
"0.5056587... | 0.7441402 | 0 |
Recursively tries to prefix paths in the configuration. The path is unchanged if the prefixed path does not exist. | def try_prefix_paths(prefix, config):
def _fn(path):
if isinstance(path, str):
new_path = os.path.join(prefix, path)
if tf.io.gfile.exists(new_path):
return new_path
return path
return _map_config_values(config, _fn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fix_path(self):\n paths = self.data['path'].tolist()\n prefixes = [re.findall(r'[A-Z\\-0-9]+', path) for path in paths]\n prefix_good = [str(prefix[0]) + \".json\" for prefix in prefixes]\n self.data['path'] = prefix_good",
"def _prefix_env_variable(environ, name, paths, subfolder... | [
"0.596069",
"0.580765",
"0.5770891",
"0.5738354",
"0.5712989",
"0.5634512",
"0.55968904",
"0.55843335",
"0.55514675",
"0.5522928",
"0.5511297",
"0.5493269",
"0.543441",
"0.5427396",
"0.5425336",
"0.5404174",
"0.5345933",
"0.53182477",
"0.53048205",
"0.5298389",
"0.5200575",
... | 0.7040655 | 0 |
Get a mission type further info | def get_mission_type(self, mission_type_id):
return self._missions_service.get_mission_type(mission_type_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_mission_type_settings_info(self, mission_type_id):\n return self._missions_service.get_mission_type_settings_info(mission_type_id)",
"def work_type_info(self,type_id):\n url = self.BASE_URL + 'types/' + type_id\n return self._make_get_request(url,models.pass_through)",
"def achieve... | [
"0.646502",
"0.6108315",
"0.6091742",
"0.6031868",
"0.581881",
"0.5779489",
"0.57591045",
"0.56234735",
"0.53835726",
"0.5376001",
"0.53744054",
"0.53364265",
"0.5333424",
"0.53279036",
"0.5303698",
"0.5298989",
"0.52568865",
"0.5250265",
"0.52068925",
"0.52002347",
"0.520023... | 0.68783176 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.