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 |
|---|---|---|---|---|---|---|
Array of configured License Manager rules. | def license_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "license_rules") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_rules(self) -> pulumi.Output[Optional[Sequence[str]]]:\n return pulumi.get(self, \"license_rules\")",
"def get_rules(self):\n rules = []\n for item in self.name:\n rules.append(item)\n return rules",
"def get_rules(self):\n rules = []\n for item ... | [
"0.7004153",
"0.68072104",
"0.6614698",
"0.65965545",
"0.6491816",
"0.6412167",
"0.6328932",
"0.6304369",
"0.6278817",
"0.6091956",
"0.59744877",
"0.5958592",
"0.5952431",
"0.5934842",
"0.5900079",
"0.5894701",
"0.5880802",
"0.58685935",
"0.58586454",
"0.585653",
"0.58006567"... | 0.68556315 | 1 |
Name of the license configuration. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self):\n return self._config_name",
"def name(self):\n return self.config[\"name\"]",
"def license_key(self):\n # type: () -> string_types\n return self._license_key",
"def name(self):\n return self._config.get(CONF_NAME)",
"def get_config_name(self): # pragma: ... | [
"0.7120599",
"0.6911768",
"0.68460757",
"0.68212116",
"0.6801746",
"0.6748661",
"0.67093205",
"0.6633611",
"0.66192704",
"0.66066635",
"0.6525402",
"0.6517022",
"0.6497571",
"0.64606017",
"0.6447558",
"0.6403362",
"0.63699466",
"0.63699466",
"0.6325151",
"0.63084453",
"0.6303... | 0.0 | -1 |
A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the providerlevel. | def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
return pulumi.get(self, "tags") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.... | [
"0.636961",
"0.636961",
"0.6364712",
"0.6364712",
"0.6364712",
"0.6364712",
"0.6304171",
"0.61747813",
"0.6163343",
"0.61489236",
"0.6141916",
"0.6085402",
"0.6042065",
"0.59479064",
"0.5840274",
"0.5839238",
"0.583778",
"0.5815189",
"0.5804834",
"0.5804834",
"0.5804834",
"... | 0.565002 | 79 |
The license configuration ARN. | def arn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_configuration_arns(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"license_configuration_arns\")",
"def arn(self) -> str:\n return pulumi.get(self, \"arn\")",
"def arn(self) -> str:\n return pulumi.get(self, \"arn\")",
"def arn(self) -> str:\n return pulu... | [
"0.71753436",
"0.6698182",
"0.6698182",
"0.6698182",
"0.6698182",
"0.6698182",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
"0.6588106",
... | 0.61785614 | 57 |
Sets the number of available licenses as a hard limit. | def license_count_hard_limit(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "license_count_hard_limit") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_count_hard_limit(self) -> pulumi.Output[Optional[bool]]:\n return pulumi.get(self, \"license_count_hard_limit\")",
"def limit_num_clients(self, limit_num_clients):\n\n self._limit_num_clients = limit_num_clients",
"def limit_num_downloads(self, limit_num_downloads):\n\n self._l... | [
"0.60027826",
"0.58430874",
"0.5798606",
"0.57090884",
"0.56257707",
"0.55748135",
"0.54968864",
"0.5493055",
"0.54561603",
"0.54341906",
"0.54324275",
"0.54163176",
"0.54163176",
"0.54163176",
"0.538495",
"0.53389937",
"0.53387153",
"0.53313684",
"0.5330356",
"0.5323538",
"0... | 0.6171312 | 1 |
Array of configured License Manager rules. | def license_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "license_rules") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_rules(self) -> pulumi.Output[Optional[Sequence[str]]]:\n return pulumi.get(self, \"license_rules\")",
"def get_rules(self):\n rules = []\n for item in self.name:\n rules.append(item)\n return rules",
"def get_rules(self):\n rules = []\n for item ... | [
"0.7005455",
"0.6807531",
"0.66153723",
"0.6595943",
"0.6492239",
"0.6412823",
"0.6327741",
"0.6303701",
"0.62787616",
"0.6090712",
"0.59746325",
"0.59596705",
"0.5952763",
"0.59332913",
"0.5899984",
"0.58939254",
"0.588094",
"0.5867272",
"0.5859189",
"0.58557487",
"0.5801605... | 0.6856969 | 2 |
Name of the license configuration. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self):\n return self._config_name",
"def name(self):\n return self.config[\"name\"]",
"def license_key(self):\n # type: () -> string_types\n return self._license_key",
"def name(self):\n return self._config.get(CONF_NAME)",
"def get_config_name(self): # pragma: ... | [
"0.71227",
"0.6913363",
"0.68448746",
"0.6823382",
"0.68039674",
"0.6747346",
"0.67114586",
"0.6634909",
"0.6620506",
"0.6608605",
"0.65271246",
"0.65180475",
"0.6496204",
"0.6459624",
"0.64465594",
"0.6404121",
"0.63716257",
"0.63716257",
"0.6325258",
"0.63097876",
"0.630389... | 0.0 | -1 |
Account ID of the owner of the license configuration. | def owner_account_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "owner_account_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def owner_account_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"owner_account_id\")",
"def account_id(self):\n return self.config.account_id",
"def owner_id(self) -> str:\n return pulumi.get(self, \"owner_id\")",
"def owner_id(self) -> Optional[str]:\n return pulumi.... | [
"0.8033547",
"0.7652781",
"0.75521326",
"0.7310328",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.70594746",
"0.6997909",
"0.6997909",
"0.6997909",
"0.6997909",
"0.6997909",
"0.6987446",
"0.6972469",
"0.6894342",
... | 0.78401303 | 1 |
A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the providerlevel. | def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
return pulumi.get(self, "tags") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.... | [
"0.6368786",
"0.6368786",
"0.63638765",
"0.63638765",
"0.63638765",
"0.63638765",
"0.63018787",
"0.6174226",
"0.61620307",
"0.61479855",
"0.6141089",
"0.60846114",
"0.6041366",
"0.5947355",
"0.5840758",
"0.583853",
"0.5838429",
"0.5815094",
"0.5803699",
"0.5803699",
"0.580369... | 0.56488895 | 72 |
A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. | def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
return pulumi.get(self, "tags_all") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.... | [
"0.74419177",
"0.74419177",
"0.7436042",
"0.7436042",
"0.7436042",
"0.7436042",
"0.71569943",
"0.70952725",
"0.7080317",
"0.7056273",
"0.69293123",
"0.69156295",
"0.68240654",
"0.67961735",
"0.6752203",
"0.6700467",
"0.66293275",
"0.66293275",
"0.66293275",
"0.66293275",
"0.6... | 0.0 | -1 |
Get an existing LicenseConfiguration resource's state with the given name, id, and optional extra properties used to qualify the lookup. | def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
arn: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
license_count: Optional[pulumi.Input[int]] = None,
license_c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None,\n access_configuration_id: Optional[pulumi.Input[str]] = None,\n access_configuration_name: Optional[pulumi.Input[str]] = None,\n description: Optional[pulumi... | [
"0.63539445",
"0.62483704",
"0.5847637",
"0.5562099",
"0.552592",
"0.5523886",
"0.5477098",
"0.53601944",
"0.5338302",
"0.5280229",
"0.52600163",
"0.52345735",
"0.52191746",
"0.5119976",
"0.51113313",
"0.51067317",
"0.5088304",
"0.5078366",
"0.50677",
"0.50411266",
"0.5020237... | 0.7695636 | 0 |
The license configuration ARN. | def arn(self) -> pulumi.Output[str]:
return pulumi.get(self, "arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_configuration_arns(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"license_configuration_arns\")",
"def arn(self) -> str:\n return pulumi.get(self, \"arn\")",
"def arn(self) -> str:\n return pulumi.get(self, \"arn\")",
"def arn(self) -> str:\n return pulu... | [
"0.7174818",
"0.6697712",
"0.6697712",
"0.6697712",
"0.6697712",
"0.6697712",
"0.649091",
"0.649091",
"0.649091",
"0.63619715",
"0.63619715",
"0.6177907",
"0.6177907",
"0.6177907",
"0.6177907",
"0.6177907",
"0.6177907",
"0.6177907",
"0.6177907",
"0.6177907",
"0.6177907",
"0... | 0.6587375 | 30 |
Sets the number of available licenses as a hard limit. | def license_count_hard_limit(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "license_count_hard_limit") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_count_hard_limit(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"license_count_hard_limit\")",
"def license_count_hard_limit(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"license_count_hard_limit\")",
"def limit_num_clients(self, limit_num_clien... | [
"0.6171312",
"0.6171312",
"0.58430874",
"0.5798606",
"0.57090884",
"0.56257707",
"0.55748135",
"0.54968864",
"0.5493055",
"0.54561603",
"0.54341906",
"0.54324275",
"0.54163176",
"0.54163176",
"0.54163176",
"0.538495",
"0.53389937",
"0.53387153",
"0.53313684",
"0.5330356",
"0.... | 0.60027826 | 2 |
Array of configured License Manager rules. | def license_rules(self) -> pulumi.Output[Optional[Sequence[str]]]:
return pulumi.get(self, "license_rules") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"license_rules\")",
"def license_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"license_rules\")",
"def get_rules(self):\n rules = []\... | [
"0.68556315",
"0.68556315",
"0.68072104",
"0.6614698",
"0.65965545",
"0.6491816",
"0.6412167",
"0.6328932",
"0.6304369",
"0.6278817",
"0.6091956",
"0.59744877",
"0.5958592",
"0.5952431",
"0.5934842",
"0.5900079",
"0.5894701",
"0.5880802",
"0.58685935",
"0.58586454",
"0.585653... | 0.7004153 | 0 |
Name of the license configuration. | def name(self) -> pulumi.Output[str]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self):\n return self._config_name",
"def name(self):\n return self.config[\"name\"]",
"def license_key(self):\n # type: () -> string_types\n return self._license_key",
"def name(self):\n return self._config.get(CONF_NAME)",
"def get_config_name(self): # pragma: ... | [
"0.71227",
"0.6913363",
"0.68448746",
"0.6823382",
"0.68039674",
"0.6747346",
"0.67114586",
"0.6634909",
"0.6620506",
"0.6608605",
"0.65271246",
"0.65180475",
"0.6496204",
"0.6459624",
"0.64465594",
"0.6404121",
"0.63716257",
"0.63716257",
"0.6325258",
"0.63097876",
"0.630389... | 0.0 | -1 |
Account ID of the owner of the license configuration. | def owner_account_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "owner_account_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def owner_account_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"owner_account_id\")",
"def account_id(self):\n return self.config.account_id",
"def owner_id(self) -> str:\n return pulumi.get(self, \"owner_id\")",
"def owner_id(self) -> Optional[str]:\n retur... | [
"0.78401303",
"0.7652781",
"0.75521326",
"0.7310328",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.7176292",
"0.70594746",
"0.6997909",
"0.6997909",
"0.6997909",
"0.6997909",
"0.6997909",
"0.6987446",
"0.6972469",
"0.6894342",
... | 0.8033547 | 0 |
A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the providerlevel. | def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
return pulumi.get(self, "tags") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.... | [
"0.63713586",
"0.63713586",
"0.6366366",
"0.6366366",
"0.6366366",
"0.6366366",
"0.6305236",
"0.61754555",
"0.6165177",
"0.61498624",
"0.614368",
"0.60867834",
"0.60436136",
"0.5947001",
"0.5841896",
"0.5840964",
"0.5839355",
"0.58173954",
"0.5806216",
"0.5806216",
"0.5806216... | 0.0 | -1 |
A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. | def tags_all(self) -> pulumi.Output[Mapping[str, str]]:
return pulumi.get(self, "tags_all") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.... | [
"0.7442922",
"0.7442922",
"0.74372643",
"0.74372643",
"0.74372643",
"0.74372643",
"0.71595305",
"0.7096487",
"0.70816255",
"0.70577693",
"0.69300693",
"0.6916472",
"0.68235135",
"0.67972314",
"0.67532057",
"0.6701463",
"0.66302735",
"0.66302735",
"0.66302735",
"0.66302735",
"... | 0.64104486 | 59 |
Deletes previously created information to enable rerunning tests. | def cleanup():
cat = CSVCatalog.CSVCatalog()
cat.drop_table("people")
cat.drop_table("batting")
cat.drop_table("teams") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tearDown(self):\n del self.new",
"def tearDown(self) -> None:\n storage.delete(self.place)\n storage.delete(self.user)\n storage.delete(self.city)\n storage.delete(self.state)\n storage.save()",
"def delete(self):\n if os.path.isfile(TESTS_PATH + \"/\" + sel... | [
"0.72810036",
"0.7179286",
"0.71484697",
"0.6927353",
"0.6927353",
"0.68570393",
"0.6846992",
"0.68414515",
"0.6834203",
"0.6830854",
"0.68001384",
"0.6796206",
"0.6790804",
"0.6790804",
"0.6789865",
"0.67880625",
"0.6785178",
"0.6782707",
"0.674953",
"0.67387956",
"0.6734828... | 0.0 | -1 |
Extract numbers from string. | def extract_numbers(frame):
numeric_const_pattern = (
r"[-+]? (?: (?: \d* \. \d+ ) | (?: \d+ \.? ) )(?: [Ee] [+-]? \d+ ) ?"
)
rx = re.compile(numeric_const_pattern, re.VERBOSE)
frame = frame.applymap(lambda x: rx.findall(x)[0])
return frame | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ExtractNumbers(s):\n\n t = s.strip('[]\\n')\n comma_space = r', '\n re_comma_space = re.compile(comma_space)\n z = re_comma_space.split(t)\n #print z\n return z",
"def find_numbers(text):\n result = []\n for word in text.split():\n if word.isdigit():\n result.append(... | [
"0.7338209",
"0.7247084",
"0.72179615",
"0.7117349",
"0.7058022",
"0.69984317",
"0.69584453",
"0.6956732",
"0.6923136",
"0.68556815",
"0.67075396",
"0.6623814",
"0.66048247",
"0.6550038",
"0.6526098",
"0.65065736",
"0.65028006",
"0.64612806",
"0.64571524",
"0.6406945",
"0.640... | 0.62348855 | 31 |
Cycle a set of colours. | def cycle_colors(colors=("red", "green", "blue"), delay_secs=1):
set_color('black') # Start with all LED's "off"
for c in colors:
print("LEDs are all " + c)
set_color(c)
update()
sleep(delay_secs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def color_cycle():\n while True:\n for color in colors:\n yield color",
"def rainbowCycle(strip, wait_ms=20, iterations=5):\n\tfor j in range(256*iterations):\n\t\tfor i in range(strip.numPixels()):\n\t\t\tstrip.setPixelColor(i, wheel((int(i * 256 / strip.numPixels()) + j) & 255))\n\t\tstrip... | [
"0.8215406",
"0.6728129",
"0.66841686",
"0.6671272",
"0.66499686",
"0.6644205",
"0.66248393",
"0.6617744",
"0.660743",
"0.6593111",
"0.659198",
"0.6545643",
"0.6539422",
"0.6470889",
"0.62968427",
"0.629664",
"0.6278655",
"0.6208951",
"0.61823696",
"0.6142695",
"0.61203885",
... | 0.7404519 | 1 |
This method will create the index.html file in the given directory. This method contains the entire source of the index.html file. | def makeHTMLIndexFile(self):
part1 = """<html>
<body>
<title>Index</title>
<div id="pg_body">
<div id="testSuitesTitle">TestSuites</div>
<div id="resultsTitle">Results</div>
<div id="testSuites">
"""
part2 = self.makeLinks()
part3 = """</di... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index(self):\n single = os.path.join(\n os.path.dirname(os.path.abspath(__file__)),\n 'index.html')\n return serve_file(single)",
"def index(self):\n return open(os.path.join(self.staticdir, \"index.html\"))",
"def index():\n path = os.path.abspath(os.path.join... | [
"0.73257416",
"0.72921854",
"0.72301203",
"0.7082423",
"0.70545805",
"0.7017766",
"0.6947595",
"0.6894794",
"0.6894794",
"0.6852841",
"0.68131715",
"0.6802026",
"0.6789115",
"0.677892",
"0.677892",
"0.67787594",
"0.67787594",
"0.67787594",
"0.67787594",
"0.67787594",
"0.67787... | 0.6962476 | 6 |
Validate that an update operation has no older operations. An update is valid iff there aren't any older update or create operations on the same object (determined by type and ID). | def _is_valid_update_operation(session, row):
# Check if there are older updates in the queue
if db.check_for_older_ops(session, row):
return False
# Check for a pending or processing create operation on this uuid
if db.check_for_pending_or_processing_ops(
session, row.object_uuid, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_update_sanity(self):\n for update in crest.get_all_updates(self.model):\n assert update._name is not None, f\"There is an Update in {update._parent._name} ({update._parent.__class__.__name__}) whose name is 'None'\"\n assert update._name != \"\", f\"There is an Update in {upd... | [
"0.6963169",
"0.66600484",
"0.6450031",
"0.6427959",
"0.62100625",
"0.6002688",
"0.5980904",
"0.5916693",
"0.58910584",
"0.5836562",
"0.58280116",
"0.5800046",
"0.57890105",
"0.57656455",
"0.5720263",
"0.571096",
"0.5627519",
"0.5620976",
"0.55914515",
"0.5582868",
"0.5553148... | 0.7222213 | 0 |
Returns the validator class for this resource but if no validator then returns the SageValidator class | def get_validator(cls):
cls.validator.model = cls
return cls.validator or SageValidator | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_validator(self):\n validator_class = self.validator_class or AssertionValidator\n if validator_class:\n return validator_class()",
"def get_validator_class(self):\n return self.validator_class",
"def get_validator(self):\n return self.get_validator_class()(**self... | [
"0.77930605",
"0.76902276",
"0.71485966",
"0.6814498",
"0.6504614",
"0.6282739",
"0.5988648",
"0.5856399",
"0.55504495",
"0.55330396",
"0.5509393",
"0.54516983",
"0.5341539",
"0.532511",
"0.53208715",
"0.5255428",
"0.52230173",
"0.52157056",
"0.5184694",
"0.5117665",
"0.51176... | 0.79435295 | 0 |
Pad the 2nd and 3rd dimensions of a 4D tensor. | def spatial_reflection_2d_padding(x, padding=((1, 1), (1, 1)),
data_format=None):
assert len(padding) == 2
assert len(padding[0]) == 2
assert len(padding[1]) == 2
if data_format is None:
data_format = image_data_format()
if data_format not in {'channels_firs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pad(self, src):\n if(self.pre_pad):\n dst = src.new(\n src.size(0),\n src.size(1),\n src.size(2),\n src.size(3),\n 2\n ).zero_()\n dst.narrow(dst.ndimension()-1, 0, 1).copy_(\n torc... | [
"0.68282384",
"0.67260337",
"0.66811013",
"0.66805106",
"0.665533",
"0.65701336",
"0.649384",
"0.64751905",
"0.6475072",
"0.6376356",
"0.6314545",
"0.62583",
"0.62486154",
"0.6241131",
"0.6228549",
"0.62108386",
"0.61935794",
"0.6190559",
"0.6188798",
"0.6144985",
"0.61238855... | 0.0 | -1 |
Sets the name of this Printer. | def name(self, name):
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_name(self, name):\n self._name = name",
"def SetName(self, name):\n self.name = name",
"def set_name(self, name: str):\n self._name = name",
"def set_name(self, name):\n self.name = name",
"def set_name(self, name):\n self.name = name",
"def set_name(self, name)... | [
"0.79853153",
"0.79550445",
"0.79476464",
"0.79117686",
"0.79117686",
"0.79117686",
"0.79117686",
"0.79117686",
"0.78593504",
"0.78593504",
"0.7841682",
"0.7805451",
"0.7792014",
"0.7778613",
"0.7727124",
"0.7727124",
"0.77143484",
"0.76566356",
"0.74935853",
"0.7388914",
"0.... | 0.0 | -1 |
Sets the url of this Printer. | def url(self, url):
if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
self._url = url | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_url(self, url):\n self.url = url",
"def set_url(self, url):\n if url is not None:\n self.url = url",
"def set_url(self, url):\n self.data['url'] = url",
"def set_url(self, url):\n self.url = url",
"def url(self, url: str):\n self._url = url",
"def url(sel... | [
"0.8003768",
"0.785068",
"0.76586235",
"0.76367354",
"0.7606739",
"0.7498168",
"0.7498168",
"0.7498168",
"0.7486272",
"0.7468795",
"0.7451274",
"0.7451274",
"0.7451274",
"0.7451274",
"0.7451274",
"0.7451274",
"0.7451274",
"0.68563294",
"0.6695695",
"0.6636724",
"0.66213137",
... | 0.65276515 | 24 |
Sets the updated_at of this Printer. | def updated_at(self, updated_at):
if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501
raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501
self._updated_at = updated_at | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def updated_at(self, updated_at: \"datetime\"):\n self._attrs[\"updatedAt\"] = updated_at",
"def updated_at(self, updated_at: \"datetime\"):\n self._attrs[\"updatedAt\"] = updated_at",
"def updated_at(self, updated_at: \"datetime\"):\n self._attrs[\"updatedAt\"] = updated_at",
"def updat... | [
"0.765274",
"0.765274",
"0.765274",
"0.7598959",
"0.7598959",
"0.7598959",
"0.7598959",
"0.7598959",
"0.7598959",
"0.7598959",
"0.7598959",
"0.7598959",
"0.7598959",
"0.6816776",
"0.6376784",
"0.6317032",
"0.62967354",
"0.6271965",
"0.6271965",
"0.6270092",
"0.6270092",
"0.... | 0.7137875 | 13 |
Sets the status of this Printer. | def status(self, status):
if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
self._status = status | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetStatus(self, status):\r\n self.status = status",
"def setStatus(self, status):\n self.__status = status",
"def status(self, status):\n self._set_property_(self.STATUS, str(status))",
"def set_status(self, status):\n self.status = status",
"def set_status(self, status):\n ... | [
"0.7677317",
"0.7674623",
"0.76514745",
"0.7647432",
"0.7647432",
"0.7647432",
"0.7505389",
"0.7356016",
"0.7356016",
"0.7356016",
"0.7356016",
"0.7356016",
"0.7356016",
"0.7356016",
"0.73014605",
"0.73014605",
"0.73014605",
"0.73014605",
"0.73014605",
"0.73014605",
"0.730146... | 0.59455305 | 95 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, Printer):
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, Printer):
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.84568954",
"0.83923674",
"0.81447554",
"0.81407183",
"0.81326675",
"0.80941343",
"0.8092415",
"0.8092415",
"0.8092415",
"0.8085536",
"0.8085536",
"0.8076502",
"0.8076502",
"0.8066026",
"0.80427635",
"0.80427635",
"0.80427635",
"0.80427635",
"0.80427635",
"0.80427635",
"0.8... | 0.0 | -1 |
Pads given matrix with zeros. Pads m with thick zeros on axis. | def pad_zeroes(m, axis, thick):
if axis == 1:
rows = m.shape[0]
cols = thick
elif axis == 0:
rows = thick
cols = m.shape[1]
return np.concatenate((m, np.zeros((rows,cols))),
axis) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zero_pad_sparse(mat, margin_h, margin_v, fmt=\"coo\"):\n\n sm, sn = mat.shape\n padded_mat = mat.copy()\n # Up and down margins initialized with zeros and filled as needed\n margin_h_0 = sp.csr_matrix((sm, margin_h), dtype=mat.dtype)\n margin_v_0 = sp.csr_matrix((margin_v, sn + 2 * margin_h), dt... | [
"0.6786829",
"0.66362834",
"0.652094",
"0.6410128",
"0.6233758",
"0.6155857",
"0.6140377",
"0.6019567",
"0.5978916",
"0.5978916",
"0.59788966",
"0.59777755",
"0.59426403",
"0.5939942",
"0.5914224",
"0.59061664",
"0.5905994",
"0.58899665",
"0.5872631",
"0.5869548",
"0.5831394"... | 0.8192185 | 0 |
Gets the index of this Worksheet. Gets the index of sheet in the worksheets collection. | def index(self):
return self.container['index'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_sheet_idx(book, name):\n # Note, we have to use exceptions for flow control because the\n # xlwt API is broken and gives us no other choice.\n try:\n for idx in itertools.count():\n sheet = book.get_sheet(idx)\n if sheet.name == name:\n return idx\n e... | [
"0.6807947",
"0.6004368",
"0.5819128",
"0.5819128",
"0.5819128",
"0.5819128",
"0.5819128",
"0.57960534",
"0.5773561",
"0.57725763",
"0.57579654",
"0.57141244",
"0.5708696",
"0.5707691",
"0.56485915",
"0.56021565",
"0.56021565",
"0.55214673",
"0.5475942",
"0.54413426",
"0.5419... | 0.47463724 | 88 |
Sets the index of this Worksheet. Gets the index of sheet in the worksheets collection. | def index(self, index):
"""
if index is None:
raise ValueError("Invalid value for `index`, must not be `None`")
"""
self.container['index'] = index | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_index(self, index):\n self.index = index",
"def setIndex(self, index):\n\n self._index = index\n\n return True",
"def index(self, index):\n\n self._index = index",
"def set_index(self, nIndex):\n\t\tcall_sdk_function('PrlVmDev_SetIndex', self.handle, nIndex)",
"def setCu... | [
"0.6222314",
"0.5777601",
"0.5467709",
"0.54538894",
"0.52760285",
"0.5064704",
"0.4975761",
"0.49714935",
"0.48488373",
"0.48020577",
"0.47928363",
"0.46960184",
"0.4648059",
"0.46479243",
"0.459575",
"0.45553493",
"0.4535616",
"0.4535616",
"0.4535616",
"0.4535616",
"0.45356... | 0.53799057 | 4 |
Gets the charts of this Worksheet. | def charts(self):
return self.container['charts'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def charts(self):\n return self.properties.get('charts',\n EntityCollection(self.context, WorkbookChart,\n ResourcePath(\"charts\", self.resource_path)))",
"def charts(self):\n return self._charts",
"def get_week... | [
"0.85188836",
"0.84135014",
"0.6829028",
"0.68165153",
"0.66294026",
"0.65624624",
"0.655015",
"0.63735914",
"0.6364983",
"0.6225979",
"0.6161147",
"0.61065215",
"0.5994635",
"0.5876503",
"0.5840675",
"0.58028746",
"0.57851595",
"0.5753037",
"0.5724148",
"0.5670181",
"0.56192... | 0.81635875 | 2 |
Gets the comments of this Worksheet. | def comments(self):
return self.container['comments'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_comments(self):\n\t\treturn self._client.get_comments(self)",
"def comments(self):\n return self._comments",
"def comments(self):\n return self._comments",
"def comments(self) -> list:\n return self._node[\"app_data\"][\"ui_data\"].get(\"comments\", [])",
"def get_comments(self... | [
"0.7821621",
"0.74774754",
"0.74774754",
"0.74446946",
"0.7395185",
"0.71615565",
"0.71458256",
"0.71458256",
"0.71458256",
"0.6978554",
"0.68705076",
"0.6607182",
"0.6577784",
"0.6544247",
"0.64447486",
"0.64447486",
"0.64447486",
"0.6426964",
"0.6389453",
"0.63683033",
"0.6... | 0.7338405 | 5 |
Gets the hyperlinks of this Worksheet. | def hyperlinks(self):
return self.container['hyperlinks'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_links(self) -> List[str]:\n return self.__links",
"def getLinks(self):\n\n return self.links",
"def get_links(self):\r\n return self.__links",
"def get_links(self):\n return self.__data['links']",
"def getLinks(self):\n return self.pageLinks",
"def links(self):\... | [
"0.6954232",
"0.69142437",
"0.69025236",
"0.6847274",
"0.68084544",
"0.6807876",
"0.6807876",
"0.6807876",
"0.6807876",
"0.6807876",
"0.67354816",
"0.66335934",
"0.6621206",
"0.6572068",
"0.65682364",
"0.65633404",
"0.6529372",
"0.6498147",
"0.646251",
"0.6300674",
"0.6288065... | 0.7819131 | 0 |
Gets the view_type of this Worksheet. Gets and sets the view type. | def view_type(self):
return self.container['view_type'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def view_type(self, view_type):\n\n self.container['view_type'] = view_type",
"def get_type(self):\n return self._type",
"def get_type(self):\n return self._type",
"def get_type(self):\n return self.type",
"def get_type(self):\n return self.type",
"def get_type(self):\n... | [
"0.63700426",
"0.6003833",
"0.6003833",
"0.6001073",
"0.6001073",
"0.588909",
"0.5860349",
"0.5716945",
"0.5708134",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"0.5691612",
"... | 0.7091328 | 0 |
Sets the view_type of this Worksheet. Gets and sets the view type. | def view_type(self, view_type):
self.container['view_type'] = view_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_type(self, type):\n self._type = type",
"def set_type(self, type):\n self.type = type",
"def set_type(self, type):\n self.type = type",
"def set_review_type(self, review_type):\n if review_type not in [APPROVE, REQUEST_REVISION]:\n raise RuntimeError(\n ... | [
"0.6287633",
"0.6247059",
"0.6247059",
"0.5953731",
"0.59301144",
"0.58938074",
"0.58938074",
"0.58938074",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",
"0.5757997",... | 0.74788773 | 0 |
Gets the type of this Worksheet. Represents worksheet type | def type(self):
return self.container['type'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def celltype(self) -> str:\n\n hcell = self._get_hcell2()\n return hcell[\"celltype\"]",
"def get_type(self) -> str:\n return self.row_dict['type']",
"def get_type (self):\n return self._stype",
"def get_type(self):\n return self._type",
"def get_type(self):\n retu... | [
"0.7328779",
"0.6786052",
"0.6759579",
"0.67350054",
"0.67350054",
"0.6732741",
"0.6636236",
"0.6636236",
"0.66081536",
"0.64967674",
"0.6487104",
"0.6468059",
"0.644111",
"0.6416375",
"0.63613725",
"0.63369304",
"0.63369304",
"0.63369304",
"0.63369304",
"0.63369304",
"0.6336... | 0.6132929 | 45 |
Sets the type of this Worksheet. Represents worksheet type | def type(self, type):
self.container['type'] = type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_type(self, type):\n self.type = type",
"def set_type(self, type):\n self.type = type",
"def set_type(self, type):\n self._type = type",
"def type(self, type):\n if self._configuration.client_side_validation and type is None:\n raise ValueError(\"Invalid value fo... | [
"0.7062185",
"0.7062185",
"0.70301324",
"0.6496872",
"0.64955074",
"0.64739835",
"0.6403917",
"0.6403171",
"0.6403171",
"0.6403171",
"0.64010006",
"0.6359331",
"0.6359331",
"0.63577753",
"0.63577753",
"0.6355732",
"0.6355732",
"0.6355732",
"0.6355732",
"0.6355732",
"0.6355732... | 0.6363224 | 12 |
Gets the is_row_column_headers_visible of this Worksheet. Gets or sets a value indicating whether the worksheet will display row and column headers.Default is true. | def is_row_column_headers_visible(self):
return self.container['is_row_column_headers_visible'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_row_column_headers_visible(self, is_row_column_headers_visible):\n\n self.container['is_row_column_headers_visible'] = is_row_column_headers_visible",
"def has_headers(self):\n for column in self.columns:\n if column.header:\n return True\n return False",
"... | [
"0.7765521",
"0.61757123",
"0.5899522",
"0.5789558",
"0.5534831",
"0.5457936",
"0.5454923",
"0.5397345",
"0.5388247",
"0.5353331",
"0.52476716",
"0.52150196",
"0.52150196",
"0.5210547",
"0.5096619",
"0.5077519",
"0.50723803",
"0.50615364",
"0.50601006",
"0.50033927",
"0.49902... | 0.84172004 | 0 |
Gets the display_zeros of this Worksheet. True if zero values are displayed. | def display_zeros(self):
return self.container['display_zeros'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def display_zeros(self, display_zeros):\n\n self.container['display_zeros'] = display_zeros",
"def is_zero(self):\n # any nonzero entry in any matrix representation\n # disqualifies the morphism as having totally zero outputs\n return self._matrix.is_zero()",
"def compute_show_ac(... | [
"0.7182981",
"0.6417202",
"0.6257568",
"0.62269115",
"0.618408",
"0.61815625",
"0.61648774",
"0.61520547",
"0.6083596",
"0.6079672",
"0.60547626",
"0.60090894",
"0.5970345",
"0.59089273",
"0.58802134",
"0.5872519",
"0.58519953",
"0.5848497",
"0.57925415",
"0.5783173",
"0.5767... | 0.8015629 | 0 |
Sets the display_zeros of this Worksheet. True if zero values are displayed. | def display_zeros(self, display_zeros):
self.container['display_zeros'] = display_zeros | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def display_zeros(self):\n return self.container['display_zeros']",
"def _open_zeros(self, display: bool = False) -> None:\n\n if display:\n print('Before \"Open Zeros\":')\n print(repr(self), \"\\n\")\n\n for pos, space in self._lookup.items():\n if space.hi... | [
"0.69603527",
"0.5989232",
"0.59569556",
"0.57756096",
"0.5764446",
"0.56904",
"0.56877464",
"0.5683494",
"0.56652874",
"0.566434",
"0.5656233",
"0.56531405",
"0.56213504",
"0.5611959",
"0.56021136",
"0.55868757",
"0.5576465",
"0.556265",
"0.5530512",
"0.552372",
"0.551398",
... | 0.8424753 | 0 |
Gets the transition_evaluation of this Worksheet. Flag indicating whether the Transition Formula Evaluation (Lotus compatibility) option is enabled. | def transition_evaluation(self):
return self.container['transition_evaluation'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def evaluation(self):\n return self._evaluation",
"def evaluation_status(self):\n return self._evaluation_status",
"def evaluation( self ) :\n\n return( self.__evaluation )",
"def is_evaluated(evalassignment):\n if evalassignment.assignment.document.name == '' or evalassignment.\\\n ... | [
"0.60212487",
"0.60086864",
"0.57716703",
"0.56417435",
"0.55313146",
"0.5327461",
"0.52876407",
"0.5275257",
"0.5269811",
"0.51642764",
"0.51455873",
"0.5140583",
"0.50769544",
"0.5053913",
"0.50535214",
"0.5018847",
"0.49895227",
"0.49537614",
"0.49520272",
"0.49335808",
"0... | 0.73448616 | 0 |
Gets the display_right_to_left of this Worksheet. Indicates if the specified worksheet is displayed from right to left instead of from left to right. Default is false. | def display_right_to_left(self):
return self.container['display_right_to_left'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def display_right_to_left(self, display_right_to_left):\n\n self.container['display_right_to_left'] = display_right_to_left",
"def IsRightDockable(self):\r\n \r\n return self.HasFlag(self.optionRightDockable)",
"def isRight(self):\n return self.right",
"def right_to_left( self, va... | [
"0.6792784",
"0.5846943",
"0.5649037",
"0.563545",
"0.5530028",
"0.54786336",
"0.54715186",
"0.5458115",
"0.54549724",
"0.54230523",
"0.54065335",
"0.5397475",
"0.5373894",
"0.5361332",
"0.5319718",
"0.5296746",
"0.52325296",
"0.52325296",
"0.51982164",
"0.5186552",
"0.518389... | 0.7708324 | 0 |
Sets the display_right_to_left of this Worksheet. Indicates if the specified worksheet is displayed from right to left instead of from left to right. Default is false. | def display_right_to_left(self, display_right_to_left):
self.container['display_right_to_left'] = display_right_to_left | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def display_right_to_left(self):\n return self.container['display_right_to_left']",
"def right_to_left( self, value=True ):\n\t\tif value:\n\t\t\tself._displaymode &= (0xFF ^ LCD_ENTRYLEFT)\n\t\telse:\n\t\t\tself._displaymode |= LCD_ENTRYLEFT\n\t\tself.command(LCD_ENTRYMODESET | self._displaymode);",
"d... | [
"0.69060427",
"0.6301522",
"0.60197264",
"0.57008314",
"0.56421274",
"0.5601758",
"0.55396605",
"0.55089253",
"0.53913057",
"0.5369684",
"0.53591096",
"0.5293225",
"0.5289827",
"0.5284746",
"0.5268907",
"0.5245508",
"0.52261883",
"0.5219784",
"0.5194324",
"0.51561075",
"0.508... | 0.78547245 | 0 |
Gets the first_visible_column of this Worksheet. Represents first visible column index. | def first_visible_column(self):
return self.container['first_visible_column'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def first_visible_column(self, first_visible_column):\n\n self.container['first_visible_column'] = first_visible_column",
"def excel_min_col(self, sheet_name):\n return self.wb[sheet_name].min_column",
"def get_column(self):\n return self._column_number",
"def column(self) -> int:\n ... | [
"0.7035033",
"0.6676979",
"0.6397747",
"0.6167568",
"0.61438453",
"0.6126189",
"0.60634536",
"0.59970623",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"0.59683967",
"... | 0.84319633 | 0 |
Gets the ole_objects of this Worksheet. | def ole_objects(self):
return self.container['ole_objects'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getObjects(self):\n return Cell_Objects(self)",
"def hbObjects(self):\r\n return self.__hbObjs",
"def list(self):\n return self.cell.objects+self.cell.tempObjects",
"def sheets(self):\n result = []\n recordset = self.connection.OpenSchema(20)\n while not recordse... | [
"0.7086949",
"0.62986475",
"0.6274535",
"0.604332",
"0.5948694",
"0.5840472",
"0.5733295",
"0.5695339",
"0.56836045",
"0.56561005",
"0.563472",
"0.56171316",
"0.55748194",
"0.5569694",
"0.5565529",
"0.55593437",
"0.55418986",
"0.55186784",
"0.54403025",
"0.54316396",
"0.54019... | 0.840329 | 0 |
Gets the is_outline_shown of this Worksheet. Indicates whether show outline. | def is_outline_shown(self):
return self.container['is_outline_shown'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_outline_shown(self, is_outline_shown):\n\n self.container['is_outline_shown'] = is_outline_shown",
"def IsShown(self):\r\n\r\n return self._shown",
"def isShown(self):\n return self.shown",
"def inspectedNodeIsVisible(self):\n return self._inspected_node_is_visible",
"def... | [
"0.78882617",
"0.6049384",
"0.5880293",
"0.57556444",
"0.5728311",
"0.5679919",
"0.5679919",
"0.54001576",
"0.5387206",
"0.53410846",
"0.5293773",
"0.5288795",
"0.5288279",
"0.5180769",
"0.517159",
"0.51169705",
"0.5079093",
"0.5079093",
"0.50532913",
"0.501239",
"0.49475786"... | 0.8628581 | 0 |
Gets the name of this Worksheet. Gets or sets the name of the worksheet. | def name(self):
return self.container['name'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_workbook_name(self, workbook: Workbook) -> str:\n return workbook.title",
"def get_name(self) -> str:\n\n return self.name_",
"def get_name(self):\n\n return self._name",
"def get_name(self) -> str:\n return self._name",
"def get_name(self) -> str:\n return self._... | [
"0.62742937",
"0.6188632",
"0.6158112",
"0.61503667",
"0.61503667",
"0.6066677",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6031651",
"0.6011251",
"0.5954241",
"0.5954241",
"0.5954241",
"0.5943533",
... | 0.0 | -1 |
Sets the name of this Worksheet. Gets or sets the name of the worksheet. | def name(self, name):
self.container['name'] = name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sheet_name(self, name):\n if self.sheet:\n self._newline\n self._cell('')\n\n self._cell(name)\n self.sheet = name",
"def SetName(self, name):\n self.name = name",
"def set_name(self, name: str):\n self._name = name",
"def set_name(self, name):\n ... | [
"0.70448893",
"0.7036568",
"0.7008908",
"0.6983503",
"0.6955157",
"0.68928564",
"0.6892817",
"0.6832924",
"0.6832924",
"0.6832924",
"0.6832924",
"0.6832924",
"0.6714787",
"0.6714787",
"0.6701009",
"0.6701009",
"0.6662435",
"0.66588056",
"0.6605756",
"0.6605756",
"0.6605756",
... | 0.0 | -1 |
Gets the conditional_formattings of this Worksheet. | def conditional_formattings(self):
return self.container['conditional_formattings'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def conditional_formattings(self, conditional_formattings):\n\n self.container['conditional_formattings'] = conditional_formattings",
"def get_conditional_rules(self):\n conditional_rules = []\n\n for field in self.form.get_prep_value():\n\n rules = field['value'].get('rules', Non... | [
"0.6832636",
"0.5370174",
"0.5348293",
"0.5286921",
"0.5277156",
"0.5247126",
"0.5082447",
"0.5032707",
"0.5031842",
"0.502648",
"0.49500036",
"0.4916094",
"0.4788434",
"0.47795945",
"0.47643274",
"0.47638923",
"0.47474194",
"0.46436918",
"0.4628884",
"0.46198508",
"0.4617229... | 0.8604001 | 0 |
Gets the is_selected of this Worksheet. Indicates whether this worksheet is selected when the workbook is opened. | def is_selected(self):
return self.container['is_selected'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_selected(self):\n return self._selected",
"def is_selected(self):\n return self._selected",
"def is_selected(self) -> bool:\r\n return self.selected",
"def is_selected(self):\n return self._element_call(lambda: self.el.is_selected)",
"def selected(self):\n\n return... | [
"0.75170565",
"0.75170565",
"0.7254665",
"0.7131647",
"0.68758684",
"0.68586785",
"0.64610326",
"0.63712025",
"0.6350998",
"0.61183995",
"0.5951405",
"0.5765334",
"0.5749314",
"0.5721278",
"0.5695012",
"0.56776315",
"0.56776315",
"0.56776315",
"0.5646106",
"0.56421745",
"0.56... | 0.7300761 | 2 |
Gets the tab_color of this Worksheet. Represents worksheet tab color. | def tab_color(self):
return self.container['tab_color'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_color(self):\n\n return self._color",
"def get_color(self):\n return self._color",
"def get_color(self):\n return self._color",
"def getColor(self):\n return self.__color",
"def getColor(self):\n return self.__color",
"def getColor(self):\n return self.__... | [
"0.63945657",
"0.6358227",
"0.6358227",
"0.63279974",
"0.63279974",
"0.63279974",
"0.62738484",
"0.6262483",
"0.62394154",
"0.6238036",
"0.6213872",
"0.6199551",
"0.61703926",
"0.61701405",
"0.6136825",
"0.61080855",
"0.6087252",
"0.6075144",
"0.6075144",
"0.60269463",
"0.601... | 0.8161478 | 0 |
Sets the tab_color of this Worksheet. Represents worksheet tab color. | def tab_color(self, tab_color):
self.container['tab_color'] = tab_color | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tab_color(self):\n return self.container['tab_color']",
"def tab_id(self, tab_id):\n\n self._tab_id = tab_id",
"def set_tab(self, tab_name: Optional[str], index: int = 0):\n self.tab_ctrl.set_tab(tab_name, index)",
"def set_color(self, color):\n self.color = color",
"def set... | [
"0.62456733",
"0.584665",
"0.5704115",
"0.5698871",
"0.5685653",
"0.5638601",
"0.56289804",
"0.5607219",
"0.55751693",
"0.54867095",
"0.54578763",
"0.5360399",
"0.5345527",
"0.53386784",
"0.5331039",
"0.5240794",
"0.52310133",
"0.52085745",
"0.51747066",
"0.5158622",
"0.51474... | 0.8064797 | 0 |
Gets the first_visible_row of this Worksheet. Represents first visible row index. | def first_visible_row(self):
return self.container['first_visible_row'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def excel_min_row(self, sheet_name):\n return self.wb[sheet_name].min_row",
"def first_visible_row(self, first_visible_row):\n\n self.container['first_visible_row'] = first_visible_row",
"def firstItemIndex(self):\n # We cannot just call the same function of the source model\n # bec... | [
"0.67080134",
"0.63575447",
"0.62109154",
"0.6195997",
"0.6149114",
"0.598102",
"0.59701747",
"0.59093916",
"0.5891595",
"0.58803755",
"0.5837256",
"0.57287735",
"0.57105464",
"0.57092226",
"0.5693877",
"0.5594069",
"0.5590019",
"0.5552637",
"0.5527806",
"0.5456167",
"0.54390... | 0.80611205 | 0 |
Sets the first_visible_row of this Worksheet. Represents first visible row index. | def first_visible_row(self, first_visible_row):
self.container['first_visible_row'] = first_visible_row | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def first_visible_row(self):\n return self.container['first_visible_row']",
"def first_visible_column(self, first_visible_column):\n\n self.container['first_visible_column'] = first_visible_column",
"def click_statement_fields_grid_first_row_checkbox(self):\n self.click_element(self.statem... | [
"0.67319226",
"0.64615273",
"0.5599343",
"0.5533383",
"0.53074914",
"0.52857584",
"0.5242668",
"0.51525563",
"0.5135954",
"0.5084831",
"0.5077037",
"0.4997498",
"0.49728942",
"0.4959196",
"0.49363345",
"0.48978525",
"0.4893247",
"0.48795325",
"0.48716235",
"0.4860297",
"0.485... | 0.84439147 | 0 |
Gets the visibility_type of this Worksheet. Indicates the state for this sheet visibility | def visibility_type(self):
return self.container['visibility_type'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def visibility_level(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"visibility_level\")",
"def visibility_level(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"visibility_level\")",
"def visibility_level(self) -> pulumi.Output[str]:\n return pulumi.get(... | [
"0.6438708",
"0.6438708",
"0.63585186",
"0.63215864",
"0.61277264",
"0.5606609",
"0.5580978",
"0.5564505",
"0.5493046",
"0.5461831",
"0.53558856",
"0.53558856",
"0.53053486",
"0.53053486",
"0.53053486",
"0.5261911",
"0.526047",
"0.5241766",
"0.5206217",
"0.5201854",
"0.509894... | 0.80066335 | 0 |
Sets the visibility_type of this Worksheet. Indicates the state for this sheet visibility | def visibility_type(self, visibility_type):
self.container['visibility_type'] = visibility_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def visibility(self, visibility):\n\n self._visibility = visibility",
"def visibility(self, visibility):\n\n self._visibility = visibility",
"def visibility(self, visibility):\n\n self._visibility = visibility",
"def visibility_type(self):\n return self.container['visibility_type'... | [
"0.68937135",
"0.68937135",
"0.68937135",
"0.65022326",
"0.5930444",
"0.5801681",
"0.5779466",
"0.5760707",
"0.5661158",
"0.5661158",
"0.5661158",
"0.5661158",
"0.5563504",
"0.5535947",
"0.54790574",
"0.5477113",
"0.5471002",
"0.54575056",
"0.54485124",
"0.5430626",
"0.541661... | 0.8372815 | 0 |
Gets the is_protected of this Worksheet. Indicates if the worksheet is protected. | def is_protected(self):
return self.container['is_protected'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def protected(self) -> bool:\n return pulumi.get(self, \"protected\")",
"def protection(self):\n return self.properties.get('protection',\n WorkbookWorksheetProtection(self.context,\n ResourcePath(\"prot... | [
"0.7608556",
"0.71539456",
"0.6729174",
"0.64688855",
"0.6299349",
"0.6201763",
"0.61103964",
"0.6101047",
"0.6050876",
"0.59381783",
"0.59381783",
"0.59174013",
"0.5863072",
"0.5857379",
"0.5839352",
"0.57543904",
"0.57543904",
"0.57024074",
"0.57024074",
"0.56967795",
"0.56... | 0.7977729 | 0 |
Sets the merged_cells of this Worksheet. | def merged_cells(self, merged_cells):
self.container['merged_cells'] = merged_cells | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cells(self, cells):\n\n self.container['cells'] = cells",
"def merge_cells(self):\n\n for rownum, row in enumerate(self.cells):\n for colnum, cell in enumerate(row):\n if not isinstance(cell, Cell):\n continue\n cols_to_merge = 0\n ... | [
"0.55920285",
"0.55588275",
"0.54191303",
"0.51792043",
"0.5116833",
"0.50970376",
"0.48567298",
"0.48171723",
"0.47188982",
"0.47184134",
"0.46695432",
"0.4610022",
"0.45431772",
"0.45363024",
"0.45363024",
"0.45358446",
"0.45095143",
"0.45018202",
"0.44460952",
"0.44419232",
... | 0.7865068 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, Worksheet):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.84568954",
"0.83923674",
"0.81447554",
"0.81407183",
"0.81326675",
"0.80941343",
"0.8092415",
"0.8092415",
"0.8092415",
"0.8085536",
"0.8085536",
"0.8076502",
"0.8076502",
"0.8066026"
] | 0.0 | -1 |
Comprueba que no exista un email igual en la bd | def clean_email(self):
email = self.cleaned_data['email']
if User.objects.filter(email=email):
raise forms.ValidationError('Ya existe un email igual al registrado.')
return email | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clean_email(self):\n email = self.cleaned_data['email']\n if Dueno.objects.filter(email=email):\n raise forms.ValidationError('Ya existe un email igual registado.')\n return email",
"def checkUserEmail(email, number):\n\n if number == 1:\n flag = 0\n atflag = ... | [
"0.68560076",
"0.6836033",
"0.6803461",
"0.67594904",
"0.67101884",
"0.66868967",
"0.6684091",
"0.6629974",
"0.6593909",
"0.6589549",
"0.6588693",
"0.6575137",
"0.65695447",
"0.655637",
"0.65529215",
"0.6530182",
"0.6524953",
"0.6485359",
"0.6449014",
"0.6443574",
"0.6439949"... | 0.65135103 | 17 |
Return divisor in base or False if prime. | def check_base(base, coin):
value = coin_value_in_base(base, coin)
if value % 2 == 0:
return 2
if value % 3 == 0:
return 3
div = 5
while div * div < value:
if value % div == 0:
return div
if value % (div + 2) == 0:
return div + 2
div +=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isPrime(num,denominator): # uses 'denominator' to keep track of which number to divide by\r\n if num == 1:\r\n return False\r\n if denominator < math.sqrt(num): # end case\r\n return True \r\n if num <=2: # end case\r\n return True\r\n \r\n if (num % denominator == 0): # if ... | [
"0.6618969",
"0.65515566",
"0.6464995",
"0.6458873",
"0.6447914",
"0.64474785",
"0.6443903",
"0.63878363",
"0.6384037",
"0.63131785",
"0.630631",
"0.62969536",
"0.6277224",
"0.6249293",
"0.6243047",
"0.6236416",
"0.6227452",
"0.6214606",
"0.6187753",
"0.6187552",
"0.6165716",... | 0.0 | -1 |
Draw bboxes on an image. | def draw_boxes_texts(img,
boxes,
texts=None,
colors=None,
line_width=1,
draw_start=False,
box_format='x1y1x2y2'):
assert box_format in ('x1y1x2y2', 'x1y1wh', 'xywh', 'xywha',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def draw_bboxes(img, bboxes):\n colors = tf.cast(np.array([[1, 0, 0, 1]] * 10), dtype=tf.float32)\n img_with_bounding_boxes = tf.image.draw_bounding_boxes(\n img,\n bboxes,\n colors\n )\n plt.figure()\n plt.imshow(img_with_bounding_boxes[0])\n plt.show()",
"def draw_bboxes(... | [
"0.83279365",
"0.82420075",
"0.8142636",
"0.8092593",
"0.8029418",
"0.79732114",
"0.79301554",
"0.7730924",
"0.7620758",
"0.75721717",
"0.7551152",
"0.7416512",
"0.73976463",
"0.7383733",
"0.7328256",
"0.72524697",
"0.72483355",
"0.7246889",
"0.723014",
"0.7095124",
"0.709034... | 0.0 | -1 |
Asks user to specify a city, month, and day to analyze. | def get_filters():
print('Hello! Let\'s explore some US bikeshare data!')
# TO DO: get user input for city (chicago, new york city, washington). HINT: Use a while loop to handle invalid inputs
print('would you like to see data for Chicago, New_yourk_city or Washington? ')
city = input().lower()
whi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Raw_Data(city,month,day):\n print(\"The city you have entered is: \",city)\n print(\"The month you have entered is: \",month)\n print(\"The day you have entered is: \",day)",
"def get_filters():\n city = None\n month = None\n day = None\n while day == None:\n # TO DO: get user input f... | [
"0.66714007",
"0.65354675",
"0.64593667",
"0.6374057",
"0.6348314",
"0.63097656",
"0.62868035",
"0.6259136",
"0.62316",
"0.62130964",
"0.62050414",
"0.6181105",
"0.6171822",
"0.61686903",
"0.6158568",
"0.61582303",
"0.61532456",
"0.61444426",
"0.6131269",
"0.6102513",
"0.6091... | 0.610484 | 19 |
Loads data for the specified city and filters by month and day if applicable. | def load_data(city, month, day):
# load data file into a dataframe
df = pd.read_csv(CITY_DATA[city])
# convert the Start Time column to datetime
df['Start Time'] = pd.to_datetime(df['Start Time'])
# extract month and day of week from Start Time to create new columns
df['month'] = df['Start Tim... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_data(city, month, day):\n df = pd.read_csv(CITY_DATA [city])\n \n # convert the Start Time column to datetime\n df['Start Time'] = pd.to_datetime(df['Start Time'])\n \n # extract month and day of week from Start Time to create new columns\n df['month'] = df['Start Time'].dt.month\n ... | [
"0.813227",
"0.8108956",
"0.8046483",
"0.8042587",
"0.8009157",
"0.80073005",
"0.7999508",
"0.7998818",
"0.79889566",
"0.7979226",
"0.7973997",
"0.7961329",
"0.79560906",
"0.7947187",
"0.794649",
"0.7908341",
"0.79083204",
"0.7904475",
"0.79011774",
"0.78934294",
"0.7889157",... | 0.76384455 | 75 |
Displays statistics on the most frequent times of travel. | def time_stats(df):
print('\nCalculating The Most Frequent Times of Travel...\n')
start_time = time.time()
# TO DO: display the most common month
df['Start Time'] = pd.to_datetime(df['Start Time'])
df['month'] = df['Start Time'].dt.month
popular_month = df['month'].mode()[0]
# TO DO: displ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def time_stats(df):\n\n print('\\nDisplaying the statistics on the most frequent times of '\n 'travel...\\n')\n start_time = time.time()\n\n # display the most common month\n most_common_month = df['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' +\... | [
"0.80247396",
"0.80233026",
"0.7915788",
"0.78266186",
"0.7822246",
"0.78143597",
"0.77659196",
"0.7740343",
"0.773628",
"0.77344066",
"0.76867086",
"0.7668633",
"0.7651731",
"0.7644636",
"0.76399267",
"0.76367253",
"0.7625196",
"0.7623158",
"0.7612803",
"0.76002145",
"0.7583... | 0.73387486 | 52 |
Displays statistics on the most popular stations and trip. | def station_stats(df):
print('\nCalculating The Most Popular Stations and Trip...\n')
start_time = time.time()
# TO DO: display most commonly used start station
popStartStation = df['Start Station'].value_counts().head(1)
# TO DO: display most commonly used end station
popEndStation = df['End ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m... | [
"0.7815675",
"0.7662213",
"0.7553417",
"0.74914914",
"0.74748665",
"0.7446617",
"0.7428588",
"0.74237514",
"0.74177027",
"0.7400495",
"0.7387161",
"0.7385634",
"0.73647535",
"0.735934",
"0.73566747",
"0.73548365",
"0.7351854",
"0.7351274",
"0.735057",
"0.73421645",
"0.7340198... | 0.7140369 | 57 |
Displays statistics on the total and average trip duration. | def trip_duration_stats(df):
print('\nCalculating Trip Duration...\n')
start_time = time.time()
# TO DO: display total travel time
print('\nTotal travel time is \n{}'.format(df['Trip Duration']))
# TO DO: display mean travel time
print('\nMean travel time is {}'.format(statistics.mean(df['Tri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri... | [
"0.814274",
"0.8025143",
"0.80041367",
"0.79496753",
"0.7937415",
"0.79312176",
"0.7926815",
"0.7915187",
"0.79142886",
"0.7908032",
"0.79055744",
"0.7900715",
"0.7891682",
"0.78894734",
"0.7886722",
"0.78851086",
"0.7884266",
"0.7882474",
"0.78738385",
"0.78686154",
"0.78664... | 0.7809658 | 40 |
Convert a given timestamp (of datetime) to bson Timestamp. | def convert_to_bson_timestamp(ts):
lowpart = int(ts)
return Timestamp(lowpart, 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _timestamp_to_datetime(timestamp):\n return datetime.fromtimestamp(timestamp * 0.001, tz=timezone.utc)",
"def _pd_datetime_to_timestamp_proto(dtype, value) -> Timestamp:\n\n if type(value) in [np.float64, np.float32, np.int32, np.int64]:\n return Timestamp(seconds=int(value))\n if dtype._... | [
"0.6818455",
"0.67072713",
"0.6684559",
"0.66534203",
"0.6527041",
"0.6521931",
"0.638541",
"0.6379059",
"0.6319556",
"0.6298179",
"0.6288899",
"0.62825286",
"0.6269594",
"0.62692237",
"0.6228241",
"0.6219496",
"0.6203525",
"0.6197143",
"0.61835176",
"0.61252886",
"0.61160946... | 0.77605116 | 1 |
Apply a function to each element in an iterable and return a result list. | def pool_process(func, iterable, process_name='Pool processing', cpus=cpu_count()):
with Timer('\t{0} ({1}) completed in'.format(process_name, str(func))):
pool = Pool(cpus)
vals = pool.map(func, iterable)
pool.close()
return vals | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply(L, f):\n\n result = []\n for i in L:\n result.append(f(i))\n\n return result",
"def map(function, iterable):\n\n return [function(x) for x in iterable]",
"def process_list(_func, iterator, *args, **kwargs):\n return [_func(i, *args, **kwargs) for i in iterator]",
"def map(iter... | [
"0.81331754",
"0.80692667",
"0.7748788",
"0.772061",
"0.7483742",
"0.71159506",
"0.70954955",
"0.70511025",
"0.7018992",
"0.70129067",
"0.7002232",
"0.70021063",
"0.69811887",
"0.6886715",
"0.68477666",
"0.6784248",
"0.67506135",
"0.6680008",
"0.66635525",
"0.6662696",
"0.661... | 0.0 | -1 |
Simple wrapper for requests.get | def get(path: str, params={}):
token = get_token()
headers = {
"Authorization": f"Bearer {token}"
}
return requests.get(get_base_url() + path, headers=headers, params=params) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aget(url, **kwargs):\n return requests.get(url, **kwargs)",
"def simple_get(url):\n\n def is_good_response(resp):\n \"\"\"\n Checks if a response is good.\n \"\"\"\n content_type = resp.headers['Content-Type'].lower()\n return (resp.status_code == 200 and content_type i... | [
"0.7863146",
"0.7612596",
"0.75933015",
"0.7551151",
"0.74514455",
"0.7438678",
"0.7438678",
"0.7438678",
"0.7430631",
"0.74212515",
"0.74087346",
"0.736867",
"0.7360049",
"0.7360049",
"0.7355728",
"0.734186",
"0.7327162",
"0.73150367",
"0.73150367",
"0.73150367",
"0.73150367... | 0.0 | -1 |
Plot a bar chart of the odds ratio for features in a logistic regression model from `sklearn`. | def plot_logistic_regression_odds_ratio(coefs, top_n=1, columns=None, title=None, plotting_context='notebook'):
with sns.plotting_context(plotting_context):
odds_ratio = pd.Series(np.exp(coefs.ravel()), index=columns)
if isinstance(top_n, int):
odds_ratio = odds_ratio.loc[odds_ratio.sor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def show_class_imbalance(df, title='Class Imbalance', PATH=None):\n ax = sns.barplot(x=[\"Normal\", \"Clickbait\"], y=df.groupby(['target']).target.count())\n ax.set_title(title, size=20)\n plt.xticks([0,1],[\"Normal\", \"Clickbait\"], size = 20)\n ax.set_ylabel(\"Document Count\", size=17)\n ax.set... | [
"0.63905233",
"0.63478935",
"0.6135006",
"0.6097958",
"0.6018063",
"0.58896375",
"0.58892435",
"0.5880095",
"0.5868512",
"0.5865818",
"0.58558446",
"0.58285534",
"0.58258843",
"0.5816655",
"0.5814555",
"0.57987934",
"0.57929754",
"0.57809776",
"0.57769066",
"0.57760733",
"0.5... | 0.697109 | 0 |
inspired by Godot Vector2's clamed method; returns changed Vector2 such that direction is the same but matches the given magnitude | def clamped(self, magnitude):
return self.unit * magnitude | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calc_new_magnitude(mag_current, distance_current, distance_new):\n\n # Calculate the apparent magnitude of a star given another reference star\n mag_new = mag_current + 5.0 * (np.log10(distance_new/10.0) - np.log10(distance_current/10.0))\n\n return mag_new",
"def test_magnitude(self):\n\n # ... | [
"0.62855226",
"0.60884726",
"0.6007735",
"0.59664655",
"0.5894356",
"0.58611554",
"0.58520436",
"0.5807486",
"0.58043253",
"0.57936805",
"0.57557446",
"0.5752512",
"0.5738654",
"0.5652121",
"0.55988705",
"0.55450535",
"0.55450535",
"0.5540483",
"0.5535312",
"0.5516054",
"0.55... | 0.5418537 | 29 |
With a certain probability, sets the result of applying the operation to x to zero. | def drop_path_op(self, op, x, drop_path_prob):
if not isinstance(op, Identity):
return drop_path(op(x), drop_path_prob)
return op(x) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply(cls, x):\n return np.multiply(x, x > 0)",
"def _call(self, x):\n if functional.prior is None:\n return (-1.0) / x + 1\n else:\n return (-functional.prior) / x + 1",
"def _call(self, x):\n if functional.prior is ... | [
"0.64713556",
"0.6461971",
"0.63525707",
"0.63486946",
"0.61963755",
"0.6196234",
"0.6167165",
"0.6085912",
"0.60800225",
"0.60400134",
"0.60352254",
"0.60303736",
"0.6018007",
"0.5914585",
"0.59135556",
"0.5908819",
"0.58989656",
"0.5893579",
"0.58768034",
"0.58593917",
"0.5... | 0.0 | -1 |
Divides everything in value_dict by the median of values. If the median is less than 1 / ( of aggregation units), it divides everything by ( of aggregation units) instead. | def _normalize(self, value_dict):
median = np.median([value_dict[i] for i in list(value_dict.keys())])
n = len(value_dict.keys())
if median < 1.0 / float(n):
divisor = 1.0 / float(n)
else:
divisor = median
return_dict = {}
for i in list(value_dict.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def median(values):\n sorted_values = sorted(values)\n length = len(sorted_values)\n mid = ceil(length/2)\n\n if length % 2 == 0:\n med = (sorted_values[mid-1]+sorted_values[mid])/2\n else:\n med = sorted_values[mid-1]\n return float(med)",
"def normalise_dict(input_dict, factor):... | [
"0.6073071",
"0.59889483",
"0.59353757",
"0.5738487",
"0.5718618",
"0.5693396",
"0.5672578",
"0.56348807",
"0.5619715",
"0.56093466",
"0.5603246",
"0.55986404",
"0.55791616",
"0.5539796",
"0.5520846",
"0.5514878",
"0.54784715",
"0.5463777",
"0.5455005",
"0.545154",
"0.5408902... | 0.80341727 | 0 |
Returns True if `fides_key` is an ancestor of any item in `data_categories`. Warning that this algorithm is recursive, is susceptible to infinite loops and other misconfigurations in the underlying DEFAULT_TAXONOMY imported from fideslang. | def _is_ancestor_of_contained_categories(
fides_key: str,
data_categories: List[str],
) -> Tuple[bool, Optional[str]]:
ref = _get_ref_from_taxonomy(fides_key=fides_key)
if ref.parent_key:
if ref.parent_key in data_categories:
return True, ref.parent_key
return _is_ancestor_o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_in(cls, hierarchical_dict: dict, key: str) -> bool:\n return key in cls.get_all_keys(hierarchical_dict)",
"def is_ancestor(self, other):\n\n if other is self:\n return True\n elif hasattr(other, 'base'):\n return self.is_ancestor(other.base)\n else:\n ... | [
"0.58642256",
"0.5732704",
"0.57208145",
"0.56289315",
"0.5421713",
"0.54005337",
"0.5354552",
"0.53484076",
"0.5346961",
"0.5315091",
"0.5252124",
"0.5228218",
"0.51614547",
"0.51541054",
"0.51368403",
"0.5123942",
"0.5107921",
"0.51069987",
"0.51038593",
"0.50740486",
"0.50... | 0.83766633 | 0 |
Returns a list of DataCategory enum values representing the targets that this Rule is configured to apply to. | def get_target_data_categories(self) -> List[str]:
return [target.data_category for target in self.targets] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def targets(self) -> List[List[float]]:\n return [d.targets for d in self.data]",
"def get_target_indexes(self, dataset):\n targets = []\n for i, fobj in enumerate(dataset.files):\n for criterion in self.target_criteria:\n if self._is_valid_target_int(criterion):\n ... | [
"0.66989744",
"0.6616448",
"0.65540075",
"0.6501709",
"0.6277685",
"0.6084447",
"0.6082217",
"0.6056202",
"0.60131156",
"0.5999484",
"0.5971136",
"0.5951949",
"0.59425306",
"0.58863795",
"0.5885008",
"0.5884472",
"0.5883615",
"0.5883615",
"0.5852584",
"0.58069664",
"0.579739"... | 0.8459322 | 0 |
Missing Required parameters in Array request (responseCode 102) The response should be MISSING_PARAM 102. | def test_WINNF_FT_S_REG_11(self):
# Load devices
device_a = json.load(
open(os.path.join('testcases', 'testdata', 'device_a.json')))
device_b = json.load(
open(os.path.join('testcases', 'testdata', 'device_b.json')))
device_c = json.load(
open(os.path.join('testcases', 'testdata... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def missing_data(self, data):\n missing_fields = []\n for key in data:\n if not key in request.json:\n missing_fields.append(key)\n if missing_fields:\n message = 'Missing ' + ', '.join(missing_fields)\n return self.bad_request(message)\n ... | [
"0.66268814",
"0.6598775",
"0.6369213",
"0.6369213",
"0.6194352",
"0.61592937",
"0.6094271",
"0.605982",
"0.5956298",
"0.58951384",
"0.5877749",
"0.583549",
"0.58329606",
"0.5813711",
"0.5796011",
"0.5762049",
"0.5756628",
"0.57176393",
"0.5683206",
"0.5680465",
"0.5676019",
... | 0.0 | -1 |
Create an arbitrary AWS service resource. | def create_resource(
service_name: str, config_name: str = None, **resource_args
):
session = get_session(config_name)
return session.resource(service_name, **resource_args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def createService(data):\n return Service(data).create()",
"def service_create(service, service_type, api, endpoint):\n db = model.Session()\n _assert_absent(db, model.Service, service)\n api = _must_find(db, model.API, api)\n service = model.Service(service, service_type, api, endpoint)\n db.a... | [
"0.6855538",
"0.6397587",
"0.6335605",
"0.6250334",
"0.6250334",
"0.6226703",
"0.6178828",
"0.61683446",
"0.61294866",
"0.6127392",
"0.6107336",
"0.6099223",
"0.6099223",
"0.6089545",
"0.6082749",
"0.60805386",
"0.60487086",
"0.60350084",
"0.6017334",
"0.5955143",
"0.59500563... | 0.69763625 | 0 |
Add n lines before the given id. | def add_line_before(self, id, n):
id = id_force_tuple(id)
prf = self.prf.get_parent_proof(id)
split = id[-1]
new_items = [ProofItem(incr_id(id, i), "") for i in range(n)]
prf.items = prf.items[:split] + new_items + prf.items[split:]
for item in prf.items[split+n:]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_line_after(self, id):\n id = id_force_tuple(id)\n prf = self.prf.get_parent_proof(id)\n new_id = incr_id(id, 1)\n split = new_id[-1]\n prf.items = prf.items[:split] + [ProofItem(new_id, \"\")] + prf.items[split:]\n for item in prf.items[split+1:]:\n incr... | [
"0.67434067",
"0.6251257",
"0.60190016",
"0.6005475",
"0.5746514",
"0.569043",
"0.5680584",
"0.56501293",
"0.55755687",
"0.55063283",
"0.5487895",
"0.54258364",
"0.5424057",
"0.54184437",
"0.5404009",
"0.5371793",
"0.53670835",
"0.5321433",
"0.5304003",
"0.5295799",
"0.529535... | 0.85678387 | 0 |
Set the item with the given id to the following data. | def set_line(self, id, rule, *, args=None, prevs=None, th=None):
id = id_force_tuple(id)
prf = self.prf.get_parent_proof(id)
prf.items[id[-1]] = ProofItem(id, rule, args=args, prevs=prevs, th=th)
self.check_proof(compute_only=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def put(self, id, data):\n assert isinstance(data, dict)\n self._shelf[str(id)] = data",
"def set_id(self, id):\n self.data['id'] = id",
"def __setitem__(cls, data_id, value):\n\n cls._data[data_id] = value\n\n if data_id not in cls._defaults:\n cls._defaults[data_... | [
"0.7435576",
"0.71864533",
"0.7152078",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",
"0.68208",... | 0.0 | -1 |
Return the camera MAC address. | def mac(self) -> str:
return self.camera_info["wifi_mac"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mac_address(self) -> str:\n return self._device.mac",
"def mac(self):\n return self.device.settings[\"device\"][\"mac\"]",
"def mac(self):\n return self.device.settings[\"device\"][\"mac\"]",
"def __get_mac_address(self):\n str_hex_mac = uuid.UUID(int=uuid.getnode()).hex[-12:]... | [
"0.75280195",
"0.74105155",
"0.74105155",
"0.7362151",
"0.730849",
"0.7307711",
"0.72497714",
"0.7212679",
"0.7203278",
"0.7168709",
"0.7168063",
"0.7156521",
"0.7124222",
"0.70628154",
"0.7033366",
"0.70100015",
"0.700186",
"0.68333876",
"0.6792669",
"0.67620367",
"0.6748411... | 0.79286414 | 0 |
Return the camera's model. | def model(self) -> str:
return self.camera_info["device_model"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def model(self) -> Optional[CameraModel]:\n return self._model",
"def model(self) -> CameraModel:\n pass",
"def camera(self):\n return self.__camera",
"def camera(self):\n return self._camera",
"def camera(self):\n return self._camera",
"def camera_entity(self):\n ... | [
"0.8541227",
"0.82945216",
"0.7445428",
"0.7349927",
"0.7349927",
"0.7048596",
"0.70251936",
"0.7011288",
"0.7011288",
"0.7011288",
"0.7011288",
"0.7011288",
"0.7011288",
"0.7011288",
"0.7011288",
"0.7011288",
"0.7011288",
"0.70088917",
"0.6985288",
"0.69797486",
"0.6978616",... | 0.77218354 | 2 |
Return the camera serial number. | def serial(self) -> str:
return self.camera_info["device_sn"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def idn(self):\n hname = (ct.c_char * 100)()\n self.lib.GetHeadModel(ct.pointer(hname))\n hname = str(hname.value)[2:-1]\n sn = ct.c_uint()\n self.lib.GetCameraSerialNumber(ct.pointer(sn))\n return 'Andor ' + hname + ', serial number ' + str(sn.value)",
"def serial_numbe... | [
"0.7499628",
"0.7499004",
"0.7329705",
"0.7256143",
"0.718553",
"0.7156166",
"0.7126293",
"0.71201235",
"0.70708895",
"0.70708895",
"0.706375",
"0.70573443",
"0.70375276",
"0.70375276",
"0.70220304",
"0.7021875",
"0.69981116",
"0.6968515",
"0.69265074",
"0.6921809",
"0.692052... | 0.8014497 | 0 |
Return the camera's station serial number. | def station_serial(self) -> str:
return self.camera_info["station_sn"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def serial(self) -> str:\n return self.camera_info[\"device_sn\"]",
"def serial_number(self):\n return self._dll.JLINKARM_GetSN()",
"def idn(self):\n hname = (ct.c_char * 100)()\n self.lib.GetHeadModel(ct.pointer(hname))\n hname = str(hname.value)[2:-1]\n sn = ct.c_uin... | [
"0.7881366",
"0.726724",
"0.70009696",
"0.6957491",
"0.6934531",
"0.69016165",
"0.68868095",
"0.68868095",
"0.6837148",
"0.6810852",
"0.6785246",
"0.67717284",
"0.6707671",
"0.66855305",
"0.66842043",
"0.66608226",
"0.6652717",
"0.6650174",
"0.66305214",
"0.6601812",
"0.65861... | 0.89538425 | 0 |
Convert data to yaml stream | def yaml_to_stream(data):
yaml_stream = YamlStream()
yaml.dump(data, yaml_stream, Dumper=yaml.Dumper)
return yaml_stream | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dump(data):\n stream = StringIO()\n yaml.dump(data, stream, Dumper=yaml.RoundTripDumper)\n return stream.getvalue().rstrip()",
"def to_content(cls, data: Mapping) -> str:\n cls._check_yaml()\n s = yaml.safe_dump(data, default_flow_style=False)\n s = '---\\n' + s\n return ... | [
"0.75875443",
"0.74790925",
"0.74053884",
"0.7370947",
"0.7206748",
"0.72022295",
"0.71943897",
"0.7029641",
"0.70192367",
"0.69853896",
"0.6965228",
"0.6933054",
"0.6853361",
"0.6743071",
"0.66675246",
"0.66634536",
"0.6611465",
"0.6611465",
"0.65844697",
"0.6485248",
"0.648... | 0.7980959 | 0 |
Assert that the 2 numpy.ndarrays are almost equal. | def assertAllClose(self, array1, array2, msg=None,
rtol=1e-05, atol=1e-08):
if not numpy.allclose(array1, array2, rtol, atol):
raise self.failureException(msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def assertNdArrayEqual(self, A, B, msg=None, delta=.00001):\n\n if A.shape != B.shape:\n reason = \"Tried to compare ndarray of size %s to ndarray of size %s\\n\" % (str(A.shape),str(B.shape))\n if self.longMessage and msg:\n reason += msg\n raise self.failure... | [
"0.7750847",
"0.77459604",
"0.7622966",
"0.75485677",
"0.7378163",
"0.72510195",
"0.7243757",
"0.72199523",
"0.7192757",
"0.7188398",
"0.70521975",
"0.70417035",
"0.70409524",
"0.70298046",
"0.7010261",
"0.69933647",
"0.69119406",
"0.68933564",
"0.6882569",
"0.686394",
"0.686... | 0.6492498 | 54 |
Sets up gynodioecious mating. | def gynodioecy(simu, execute_func, config):
N = config.N
Nh = config.N_hermaphrodites
pop = get_population(simu=simu,
size=N,
loci=config.loci * config.allele_length)
sex_seq = tuple(simu.MALE for _ in xrange(Nh)) + tuple(simu.FEMALE for _ in xrange(N - ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def teleopInit(self):\n self.myRobot.setSafetyEnabled(True)",
"def initialize_dynamic_settings(self):\n self.hero_speed_factor = 1.5\n self.bullet_speed_factor = 1\n self.covid_horizontal_speed_factor = -10\n self.alien_points = 50\n #The pandemy direction equals 1 means... | [
"0.55868566",
"0.53889513",
"0.5378917",
"0.5376411",
"0.5325355",
"0.5319023",
"0.5317673",
"0.5308141",
"0.52980906",
"0.52754444",
"0.52434945",
"0.5223508",
"0.52092224",
"0.51926607",
"0.51924574",
"0.5191339",
"0.5189889",
"0.51683766",
"0.5158418",
"0.5154878",
"0.5154... | 0.0 | -1 |
Removes the whitespaces from a string. | def _removeWhitespaces(self, s):
return s.translate({ord(c): None for c in string.whitespace}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_white_spaces(input_string):\n return re.sub(r'\\s+', ' ', input_string).strip()",
"def strip_space(string):\n return string.replace(' ', '')",
"def _clean(s):\n return re.sub(r'\\s+', ' ', s.strip())",
"def _clean(self, string):\n return re.sub('\\s+', ' ', string).strip()",
"def... | [
"0.85359895",
"0.8514681",
"0.83577627",
"0.82927847",
"0.8270743",
"0.82371646",
"0.809362",
"0.8049376",
"0.7965763",
"0.7965763",
"0.7885188",
"0.7881927",
"0.78642154",
"0.7821864",
"0.7817869",
"0.78126824",
"0.78126824",
"0.77840924",
"0.7752709",
"0.77501863",
"0.77421... | 0.81959045 | 6 |
Generates an uncorrelated Gaussian distribution in 4D phase space using known bunch attributes | def distribute_Gaussian(self):
sigma_x = np.sqrt(self.emitx*self._betax)
sigma_xp = np.sqrt(self.emitx*self._gammax)
sigma_y = np.sqrt(self.emity*self._betay)
sigma_yp = np.sqrt(self.emity*self._gammay)
self.particles[:,0] = np.random.randn(self.npart)*sigma_x #set x-coordinat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_gaussian():\n amp = 10 * numpy.random.chisquare(3)\n width = numpy.random.chisquare(3)\n mean = numpy.random.uniform(-10 + width, 10 - width)\n x = numpy.linspace(-10, 10, 500)\n y = amp * numpy.exp(- (x - mean) ** 2 / width ** 2)\n add_noise(y, 0.1)\n return x, y",
"def gen_mix... | [
"0.6220596",
"0.605981",
"0.60504997",
"0.60220814",
"0.60041773",
"0.59795386",
"0.58783275",
"0.5869371",
"0.5868461",
"0.5859865",
"0.5857232",
"0.58543146",
"0.58114564",
"0.5803561",
"0.5770704",
"0.57693547",
"0.57386136",
"0.57352835",
"0.5708701",
"0.5699573",
"0.5686... | 0.532786 | 77 |
Sets the centroid of the distribution in phase space to be zero providing a quieter injection. | def exact_centroids(self, ptclCoords, phaseSpaceList):
translation1 = np.array([-1,1,-1,1])
translation2 = np.array([-1,-1,-1,-1])
translation3 = np.array([1,-1,1,-1])
ptcl1 = ptclCoords * translation1
ptcl2 = ptclCoords * translation2
ptcl3 = ptclCoords * translation3
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_zero_vector(self):\n self.vector = np.zeros(self.dimension, dtype = float)",
"def setZeroTheory(self):\n\t\tself.theo = np.zeros((self.totalBins), dtype = complex)",
"def setPhaseZero(self):\n self.write('PCLR')",
"def setAllZero(self):\n self.robot.set_joint([0,0,0,0,0])\n ... | [
"0.60279715",
"0.6021205",
"0.5915486",
"0.5854625",
"0.58259666",
"0.5815213",
"0.5786458",
"0.57819384",
"0.5745811",
"0.570086",
"0.5669023",
"0.5665481",
"0.5658939",
"0.56527793",
"0.5635688",
"0.56324965",
"0.56299365",
"0.56280655",
"0.5608911",
"0.5570982",
"0.5570003... | 0.0 | -1 |
Delete specific words or stopwords from corpora | def delete_words(self, words=None):
if words is None:
words = self.stopwords
self.__corpora = [
sub(r' ({0}) '.format('|'.join(words)), ' ', string) for string in self.__corpora
] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def removestopwords(query):\n wordlist = [word for word in query.split() if word not in stopwords.words('english')]\n return \" \".join(wordlist)",
"def remove_stop_words(document):\n\n stop_words = stopwords.words(\"english\")\n stop_words = set(stop_words + EXTENDED_STOP_WORDS)\n return [token f... | [
"0.73810923",
"0.7375826",
"0.71235865",
"0.70072114",
"0.6995513",
"0.6939331",
"0.68922603",
"0.6887675",
"0.6874338",
"0.68548363",
"0.68548363",
"0.68548363",
"0.68548363",
"0.6846436",
"0.6840409",
"0.6815723",
"0.6799378",
"0.679808",
"0.6780003",
"0.6761896",
"0.675823... | 0.8162565 | 0 |
Save corpora to csv | def save_corpora(self):
if self.filename_for_save is not None:
with open(self.filename_for_save, 'w', newline='', encoding=constants.load_encoding) as file:
writer = csv.writer(file)
for string in self.__corpora:
writer.writerow([string]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def save_csv(outfile, cities):\n writer = csv.writer(outfile)\n writer.writerow(['Name'])\n for row in cities:\n writer.writerow([row])",
"def save_csv(companies):\n print(\"Saving companies.csv...\")\n\n Path(\"output\").mkdir(parents=True, exist_ok=True)\n file_name = 'output/companies... | [
"0.6914597",
"0.6833614",
"0.6749324",
"0.6736747",
"0.672274",
"0.66769654",
"0.65501267",
"0.65335095",
"0.6497398",
"0.6429031",
"0.6414219",
"0.6337263",
"0.63075686",
"0.6289585",
"0.6288547",
"0.6265054",
"0.6247605",
"0.62404764",
"0.6238371",
"0.62214005",
"0.62212193... | 0.83057386 | 0 |
Returns True if a1 and a2 are numpy views pointing to the exact same underlying data; False otherwise. | def arrays_are_same(a1, a2):
try:
return a1.__array_interface__['data'] == a2.__array_interface__['data'] \
and a1.strides == a2.strides
except AttributeError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isview(array1, array2=None):\n # deal with the one input case first\n if array2 is None:\n try:\n if array1.base is None:\n return False\n return True\n except AttributeError:\n return False # if it is not an array then it is not a view\n #... | [
"0.73895496",
"0.72039956",
"0.716235",
"0.7138082",
"0.71351373",
"0.71217567",
"0.711197",
"0.7067669",
"0.6977954",
"0.6954936",
"0.6930702",
"0.68240625",
"0.6788562",
"0.6770397",
"0.67426574",
"0.67378306",
"0.6720506",
"0.6687604",
"0.66549057",
"0.6638338",
"0.6626222... | 0.8015435 | 0 |
Set new value for self.BER | def setBER(self, BER):
self.BER = BER | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setBER(self, ber: float) -> float:\n self.BER = ber",
"def calculateBER(self):\n pass",
"def getBER(self):\n \n return self.BER",
"def setB(self, b):\n\t\tself.b = int(b)",
"def set_bribe(self, bribe_amount):\r\n self.bribe = bribe_amount",
"def b(self, b):\n\n ... | [
"0.82317024",
"0.6712566",
"0.63515264",
"0.62585026",
"0.61463755",
"0.6077062",
"0.5870157",
"0.58297825",
"0.5758315",
"0.56750005",
"0.56505555",
"0.56366086",
"0.5617458",
"0.5609818",
"0.5609818",
"0.56089455",
"0.56010836",
"0.55891037",
"0.55687374",
"0.5557268",
"0.5... | 0.7975516 | 1 |
Returns number of subgraphs | def __len__(self):
return len(self.subgraph_list) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def num_of_subgraphs(self):\n \n G = self.to_undirected_graph()\n \n count = G.num_subgraph()\n \n print('The number of disconnected components in the graph is ', count)",
"def ngraphs(self):\n return len(self.__graph_list)",
"def graph_count(self) -> int:\n ... | [
"0.8480962",
"0.77988774",
"0.71151304",
"0.7074545",
"0.7050783",
"0.69040495",
"0.6860942",
"0.6845083",
"0.67601913",
"0.67529804",
"0.6741462",
"0.66487753",
"0.66434824",
"0.66241163",
"0.66190964",
"0.65889466",
"0.65878195",
"0.65838003",
"0.6571573",
"0.6567203",
"0.6... | 0.767949 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.