query stringlengths 9 9.05k | document stringlengths 10 222k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 4 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Return a sudoku matrix | def get_sudoku_matrix(self):
return self.sudoku_matrix | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_sudoku(self)->list:\n grid = [[None for x in range(9)] for row in range(9)]\n for row in range(0,9):\n for column in range(0,9):\n if row <= 2 and column <=2:\n grid[row][column] = cell.Cell(0)\n elif row <= 2 and 3 <= column <= 5... | [
"0.7414889",
"0.73049223",
"0.6996909",
"0.69424963",
"0.6888324",
"0.6766059",
"0.670372",
"0.6643427",
"0.65220934",
"0.65055496",
"0.6481994",
"0.64216775",
"0.6404281",
"0.63746357",
"0.63286084",
"0.6325936",
"0.6321227",
"0.62994",
"0.6287115",
"0.6272716",
"0.6261372",... | 0.79606533 | 0 |
Return a sudoku matrix solved | def get_sudoku_matrix_solved(self):
return self.sudoku_matrix_solved | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def solve_sudoku(sudoku):\n # Define the solution matrix that represents the sudoku puzzle\n solution = Matrix(9, 9, 1, 9)\n\n # Set up the model\n model = Model()\n\n # Set the constraints for the filled in cells\n for i in xrange(0, 9):\n for j in xrange(0, 9):\n if sudoku[i, ... | [
"0.77757585",
"0.77223897",
"0.7591495",
"0.70577496",
"0.7051063",
"0.69597095",
"0.6938633",
"0.6924226",
"0.68827355",
"0.6863994",
"0.68432903",
"0.6843008",
"0.68340075",
"0.68323416",
"0.68165493",
"0.67729443",
"0.6767388",
"0.67517245",
"0.66757387",
"0.6663423",
"0.6... | 0.7767136 | 1 |
Method that compare if two SudokuMatrix object are equals | def __eq__(self, other_sudoku_matrix):
equals = False
for row in range(9):
for col in range(9):
if int(self.get_cell(row, col).get_cell_value()) == int(
other_sudoku_matrix.get_cell(row, col).get_cell_value()):
equals = True
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n if not issubclass(type(other), Matrix):\n return False\n\n if self.rows != other.rows or self.columns != other.columns:\n return False\n\n return self.data == other.data",
"def __eq__(self, other):\r\n return self.id_map == other.id_map... | [
"0.76117563",
"0.74743104",
"0.7445452",
"0.74154025",
"0.73595923",
"0.7285003",
"0.72529274",
"0.71656305",
"0.71012837",
"0.7078154",
"0.7041093",
"0.7036643",
"0.7032445",
"0.70261645",
"0.697155",
"0.6970848",
"0.69523555",
"0.69491196",
"0.693337",
"0.6912804",
"0.68703... | 0.8493141 | 0 |
Create HYPER_FILE from SCHEMA_FILE and load with metadata query results | def create_extract():
with open(SCHEMA_FILE, "r") as f:
SCHEMA = yaml.safe_load(f)
with open(TOKEN_FILE, "r") as f:
TOKEN = yaml.safe_load(f)
hc = HyperCreator(SCHEMA, HYPER_FILE)
ts = Tableau(TOKEN["server"], TOKEN["site"], TOKEN["name"], TOKEN["value"])
for table in SCHEMA["tabl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _create_schema(self, cypher_file):\n if len(self.graph.nodes) > 0:\n msg = \"Cypher file specified but the graph is not empty. Aborting.\"\n raise ValueError(msg)\n cyp = open(cypher_file, 'r').read()\n self.graph.run(cyp)",
"def schema_load(filename):\n print(uc... | [
"0.59176916",
"0.59136146",
"0.5844736",
"0.57159436",
"0.5710448",
"0.56559134",
"0.5615624",
"0.55509704",
"0.55457634",
"0.5543642",
"0.5458917",
"0.54457504",
"0.5437242",
"0.5436896",
"0.5408508",
"0.54038095",
"0.53769493",
"0.53524965",
"0.5347491",
"0.53469646",
"0.53... | 0.6245237 | 0 |
Replace current extract in TDSX_FILE with HYPER_FILE | def update_datasource():
ds = Datasource(TDSX_FILE)
ds.replace_extract(HYPER_FILE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hxlreplace():\n run_script(hxlreplace_main)",
"def replace_extract(self, file_path):\n tmp_file = shutil.copy2(self.path, \"tmpzip\")\n with ZipFile(tmp_file) as src, ZipFile(self.path, \"w\") as dst:\n for src_info in src.infolist():\n _, src_tail = path.split(src_... | [
"0.56128925",
"0.52839655",
"0.51912695",
"0.51302993",
"0.5060519",
"0.5014787",
"0.4933431",
"0.48355338",
"0.48326963",
"0.48252073",
"0.4821674",
"0.4805997",
"0.4800545",
"0.4786376",
"0.47716513",
"0.47544852",
"0.4748637",
"0.4746096",
"0.47163612",
"0.46886548",
"0.46... | 0.6904954 | 0 |
Gets the current desired count of the specified ECS Service. | def get_desired_count(cluster_name, service_name):
response = ecs_client.describe_services(
cluster=cluster_name, services=[service_name],
)
for service in response["services"]:
return service["desiredCount"]
raise Exception(
f"desiredCount not found for cluster: {cluster_name... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def service_count(self) -> str:\n return pulumi.get(self, \"service_count\")",
"def retrieve_num_instances(service):\n instance_counts = service[\"instance-counts\"]\n return instance_counts[\"healthy-instances\"] + instance_counts[\"unhealthy-instances\"]",
"def eventcount(self):\n return ... | [
"0.74331915",
"0.6553271",
"0.6328588",
"0.5801972",
"0.57700175",
"0.5674347",
"0.5674174",
"0.5630112",
"0.5587021",
"0.553864",
"0.55281293",
"0.54909825",
"0.5474824",
"0.5431807",
"0.54288244",
"0.5426716",
"0.54190874",
"0.54064065",
"0.5393235",
"0.5391078",
"0.5391078... | 0.78649575 | 0 |
divise les bloc si leur taille est trop grande | def divide_block(env, blc):
t = 0
size = env.size_block
div = np.zeros(blc[-1] / size + blc.shape[0])
print(div.shape)
index = 0
for k in blc:
while k - t > size:
t += size
if k - t > size:
div[index] = t
index += 1
div[index] = k
index += 1
t = k
div = div[np.where(div)]
return (div) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetScaleBlocks(width):\n\n rord=numpy.log10(abs(width)/2.0)\n nrord=rord % 1\n\n if nrord < numpy.log10(2):\n spc=0.2*pow(10,numpy.floor(rord))\n smallspc=spc\n bigspc=5*spc\n newspc=[0,smallspc,smallspc*2,smallspc*3,smallspc*4,smallspc*5]\n elif nrord < numpy.log10(5):\... | [
"0.5597102",
"0.5440409",
"0.5413998",
"0.5407248",
"0.53982776",
"0.53873897",
"0.53426784",
"0.53319544",
"0.5323098",
"0.52931225",
"0.52336675",
"0.52102226",
"0.52063864",
"0.52051187",
"0.519937",
"0.5191247",
"0.5171056",
"0.51698107",
"0.51631874",
"0.5141693",
"0.513... | 0.5479173 | 1 |
word 2 tuple by char_id | def word2tuple(word, char_id):
tup = []
for c in word:
if str(c) in char_id:
tup.append(char_id[c])
else:
tup.append(len(char_id))
return tuple(tup) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def line_2_words(wordid_list, id2word):\n word_list = []\n for word_id in wordid_list:\n word_list.append(id2word[word_id])\n return word_list",
"def create_word(char_list):",
"def word_to_tuple(word):\n # since strings are sequences of letters\n # `sorted` will automatically convert a st... | [
"0.6389353",
"0.6234126",
"0.6034827",
"0.59308624",
"0.58816594",
"0.5818911",
"0.5749407",
"0.57084274",
"0.5694023",
"0.56378114",
"0.5637573",
"0.5630778",
"0.5624193",
"0.55718493",
"0.5571338",
"0.5556244",
"0.55537975",
"0.55537975",
"0.55444837",
"0.5500204",
"0.54980... | 0.77017784 | 0 |
we are going to split out the domain from the url and lookup the ip address then we get both whois ip and domain name info | def get_whois(doc):
#extract domain info
domain = tldextract.extract(doc['url']).registered_domain
hostname = doc['url'].split('/')[2]
doc['hostname'] = hostname
doc['ip'] = ''
doc['whois'] = {}
try:
#lookup ip address
doc['ip'] = socket.gethostbyname(hostname)
except:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WhoisLocation(url):\n location=[]\n location_str_list=[]\n try: # first try this\n #trying with pythonwhois to see if the location exists\n obj=pythonwhois.get_whois(url)\n for key in obj['contacts']['registrant']:\n location.append(obj['contacts']['registrant'][key])\n ... | [
"0.68971765",
"0.68036586",
"0.67154217",
"0.666049",
"0.6616179",
"0.6454138",
"0.6347413",
"0.6310537",
"0.6232186",
"0.6190189",
"0.61824244",
"0.615423",
"0.6112629",
"0.60812247",
"0.60718006",
"0.60692465",
"0.6044799",
"0.6040898",
"0.6024612",
"0.5985132",
"0.59559214... | 0.6846455 | 1 |
We are going to use a headless browser to hit the target homepage and enumerate all of the other urls that we hit, cookies and the page source | def interrogate_homepage(doc):
socket.setdefaulttimeout(30)
doc['browser'] = {}
#empty page
empty = u'<html><head></head><body></body></html>'
#set the path to our compiled phantomjs
phantomjs = '/phantom_bin/bin/phantomjs'
#set server args to ignore certificate errors
serv_arg = ['-... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def visit_homepage(url):\n response = requests.get(url, timeout=10)\n soup = BeautifulSoup(response.content, 'html.parser')\n return soup",
"async def main():\n #launching the browser in headless mode\n browser = await launch({'headless': True})\n page = await browser.ne... | [
"0.66040343",
"0.63707286",
"0.633517",
"0.62551135",
"0.625036",
"0.62199724",
"0.6212913",
"0.61651903",
"0.6112558",
"0.6048476",
"0.60329455",
"0.59965056",
"0.59907174",
"0.5961944",
"0.5914689",
"0.5893945",
"0.5886431",
"0.5857849",
"0.58555067",
"0.5851134",
"0.583850... | 0.69595367 | 0 |
this will parse the eve log and get some information from it and add it to our document. We are just going to get the signature name for now | def get_ids_logs(doc):
doc['ids'] = []
with open('/var/log/suricata/eve.json', 'r') as f:
for line in f:
#lets go ahead and deserialize the log and pull out sig field
sig = json.loads(line)['alert']['signature']
#blergh, too lazy to comment out of suricata, or chang... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_log(self):\n self.stack = []\n diff = self.diff(self.original, self.doc)\n entry = {\"_id\": utils.get_iuid(),\n \"doctype\": constants.DOCTYPE_LOG,\n \"docid\": self.doc[\"_id\"],\n \"diff\": diff,\n \"timestamp\": utils.... | [
"0.58203495",
"0.55198073",
"0.54499614",
"0.5366643",
"0.536272",
"0.5305847",
"0.5242875",
"0.51955664",
"0.515198",
"0.51442206",
"0.5136993",
"0.51346636",
"0.5060666",
"0.5046243",
"0.5008593",
"0.5006592",
"0.49796999",
"0.49733102",
"0.49716076",
"0.49515978",
"0.49404... | 0.5648422 | 1 |
Compute a the cocitation graph using a citation network | def cocite(G,min_citations = 2):
if not G.is_directed():
msg = "The cocitation algorithm requires a directed citation graph as an input."
raise nx.NetworkXError(msg)
#assert type(G) == nx.classes.digraph.DiGraph
edges = {}
#for each node
for n in G.nodes():
# for each out... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def neato_graph_from_corpus( corpus, max_nodes ) :\n\n O, row_dois, column_dois = cites_matrix( corpus )\n neato_cooccurrence_graph( O, column_dois )\n return None\n\n \n v = total_occurrences( O ) \n nv = v.astype( float32 ) / v.max()\n C = cooccurrence_matrix ( O )\n nC = normalized_coocc... | [
"0.63316435",
"0.6326704",
"0.62020963",
"0.60203207",
"0.5940459",
"0.5838418",
"0.5737226",
"0.5707589",
"0.56594205",
"0.55725867",
"0.5538882",
"0.55271745",
"0.54878485",
"0.546096",
"0.54601884",
"0.5455653",
"0.5437921",
"0.5426384",
"0.5410883",
"0.5399209",
"0.538272... | 0.73921865 | 0 |
Find arguments suitable for forest.parse_args.parse_args e.g. bokeh serve args [ARGS] or forest [ARGS] | def parse_forest_args(argv=None):
if argv is None:
argv = sys.argv
if "bokeh" in os.path.basename(argv[0]):
i = argv.index("--args")
return argv[i + 1 :]
else:
_, argv = forest.cli.main.parse_args(argv)
return argv[1:] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_arguments(args):",
"def _parse_args():\n args = sys.argv[1:]\n cmd_parser = argparse.ArgumentParser()\n cmd_parser.add_argument(\n '--produce-sub',\n dest='produce_sub',\n help='Produce submision file',\n default=False,\n action='store_true',\n )\n cmd_... | [
"0.7618636",
"0.70508236",
"0.7009241",
"0.70071197",
"0.69731104",
"0.6911572",
"0.6889888",
"0.6851242",
"0.6837971",
"0.6809132",
"0.6802966",
"0.6788127",
"0.6716655",
"0.670859",
"0.6699846",
"0.6699645",
"0.6676694",
"0.6676029",
"0.6669289",
"0.6668221",
"0.6665668",
... | 0.75391984 | 1 |
Enables global stackwisevirtual on target device | def configure_global_stackwise_virtual(device, domain=None):
# build a list of commands to send
# Add stackwise-virtual as first element in the list
# Add domain only if domain argument has been provided
command_list = ['stackwise-virtual']
if domain:
command_list.append(f'domain {domain}')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unconfigure_global_stackwise_virtual(device):\n # Single command 'no stackwise-virtual' will remove configuration\n command = 'no stackwise-virtual'\n try:\n output = device.configure(command)\n except SubCommandFailure:\n raise SubCommandFailure('Failed to remove global stackwise-vir... | [
"0.68342483",
"0.6480229",
"0.60656047",
"0.597289",
"0.58074814",
"0.5528802",
"0.55048174",
"0.5476486",
"0.5420422",
"0.5391336",
"0.53740263",
"0.5351046",
"0.5321348",
"0.5261659",
"0.5255115",
"0.5211061",
"0.5154982",
"0.5148179",
"0.51353693",
"0.5134788",
"0.50914985... | 0.7372025 | 0 |
Disable global stackwisevirtual on target device | def unconfigure_global_stackwise_virtual(device):
# Single command 'no stackwise-virtual' will remove configuration
command = 'no stackwise-virtual'
try:
output = device.configure(command)
except SubCommandFailure:
raise SubCommandFailure('Failed to remove global stackwise-virtual')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unconfigure_global_dual_active_recovery_reload_disable(device):\n # build a list of commands to send\n # Add stackwise-virtual as first element in the list\n # Enables dual-active recovery-reload\n command_list = ['stackwise-virtual']\n command_list.append(f'no dual-active recovery-reload-disabl... | [
"0.706992",
"0.68339354",
"0.64037496",
"0.6261719",
"0.5786086",
"0.5731109",
"0.57200205",
"0.5654615",
"0.5543812",
"0.5446901",
"0.5438316",
"0.5315058",
"0.52804273",
"0.52761424",
"0.52732956",
"0.52600944",
"0.5244586",
"0.52351683",
"0.5188351",
"0.518542",
"0.5179736... | 0.79329497 | 0 |
Enables interface as dualactivedetection interface on target device | def configure_stackwise_virtual_dual_active_interfaces(device, dad_links):
# build a list of commands to send
command_list = []
output = ''
for interface in dad_links:
command_list.append(f'interface {interface}')
command_list.append(f'stackwise-virtual dual-active-detection')
try:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def enable(self):\n # Netmiko reports enable and config mode as being enabled\n if not self.native.check_enable_mode():\n self.native.enable()\n # Ensure device is not in config mode\n if self.native.check_config_mode():\n self.native.exit_config_mode()\n\n ... | [
"0.59566253",
"0.58459336",
"0.58459336",
"0.58156496",
"0.5751097",
"0.5745842",
"0.55513084",
"0.55439985",
"0.55354583",
"0.55209297",
"0.54976976",
"0.54834133",
"0.5471087",
"0.5468166",
"0.5451829",
"0.5439863",
"0.5418576",
"0.54149604",
"0.5405614",
"0.5400771",
"0.53... | 0.6329942 | 0 |
Disables interface as dualactivedetection interface on target device | def unconfigure_stackwise_virtual_dual_active_interfaces(device, dad_links):
# build a list of commands to send
command_list = []
output = ''
for interface in dad_links:
command_list.append(f'interface {interface}')
command_list.append(f'no stackwise-virtual dual-active-detection')
t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def disable_radio(self):\n self.acquire_response(b'AT*R0')",
"def test_multi_ap_disabled_on_ap(dev, apdev):\n run_multi_ap_association(dev, apdev, 0, wait_connect=False)\n ev = dev[0].wait_event([\"CTRL-EVENT-DISCONNECTED\",\n \"CTRL-EVENT-CONNECTED\"],\n ... | [
"0.66088223",
"0.6341192",
"0.63072246",
"0.6244302",
"0.62327534",
"0.61326903",
"0.6128818",
"0.60196",
"0.59937257",
"0.59796137",
"0.5866469",
"0.5817195",
"0.5772791",
"0.5772595",
"0.57619154",
"0.5754597",
"0.5747553",
"0.5739801",
"0.57308346",
"0.57193846",
"0.571036... | 0.65191627 | 1 |
Enables global stackwisevirtual dualactive recovery reload on target device | def configure_global_dual_active_recovery_reload_disable(device):
# build a list of commands to send
# Add stackwise-virtual as first element in the list
# Disables dual-active recovery-reload
command_list = ['stackwise-virtual']
command_list.append(f'dual-active recovery-reload-disable')
try:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unconfigure_global_dual_active_recovery_reload_disable(device):\n # build a list of commands to send\n # Add stackwise-virtual as first element in the list\n # Enables dual-active recovery-reload\n command_list = ['stackwise-virtual']\n command_list.append(f'no dual-active recovery-reload-disabl... | [
"0.7184057",
"0.58807933",
"0.57247466",
"0.56831115",
"0.5650668",
"0.5400074",
"0.53629565",
"0.5327328",
"0.5324608",
"0.5303408",
"0.5283625",
"0.52727073",
"0.5241073",
"0.5214699",
"0.5210306",
"0.5202273",
"0.52008003",
"0.51674765",
"0.51405495",
"0.51349705",
"0.5121... | 0.7698362 | 0 |
Enables global stackwisevirtual dualactive recovery reload on target device | def unconfigure_global_dual_active_recovery_reload_disable(device):
# build a list of commands to send
# Add stackwise-virtual as first element in the list
# Enables dual-active recovery-reload
command_list = ['stackwise-virtual']
command_list.append(f'no dual-active recovery-reload-disable')
tr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configure_global_dual_active_recovery_reload_disable(device):\n # build a list of commands to send\n # Add stackwise-virtual as first element in the list\n # Disables dual-active recovery-reload\n command_list = ['stackwise-virtual']\n command_list.append(f'dual-active recovery-reload-disable')\... | [
"0.769706",
"0.588012",
"0.5724654",
"0.56823856",
"0.56489444",
"0.53998864",
"0.5360985",
"0.5327254",
"0.5325075",
"0.53030884",
"0.5281263",
"0.52710766",
"0.5242105",
"0.52126044",
"0.5210789",
"0.5200721",
"0.52006316",
"0.516452",
"0.5139679",
"0.5134392",
"0.5118748",... | 0.7182636 | 1 |
Enables portchannel interface as pagp dualactivedetection interface on target device | def configure_stackwise_virtual_dual_active_pagp(device, port_channel):
# build a list of commands to send
command_list = ['stackwise-virtual']
command_list.append(f'dual-active detection pagp')
if port_channel:
command_list.append(f'dual-active detection pagp trust channel-group {port_channel}'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unconfigure_stackwise_virtual_dual_active_pagp(device, port_channel):\n # build a list of commands to send\n command_list = ['stackwise-virtual']\n if port_channel:\n command_list.append(f'no dual-active detection pagp trust channel-group {port_channel}')\n try:\n output = device.conf... | [
"0.65177065",
"0.61992884",
"0.60917014",
"0.6039055",
"0.5977526",
"0.5824682",
"0.56919676",
"0.56499",
"0.5644209",
"0.5620075",
"0.5562014",
"0.5530952",
"0.5519772",
"0.5477032",
"0.54757065",
"0.54713",
"0.54712033",
"0.54548246",
"0.54346675",
"0.5419358",
"0.5413673",... | 0.72997487 | 0 |
Disables portchannel interface as pagp dualactivedetection interface on target device | def unconfigure_stackwise_virtual_dual_active_pagp(device, port_channel):
# build a list of commands to send
command_list = ['stackwise-virtual']
if port_channel:
command_list.append(f'no dual-active detection pagp trust channel-group {port_channel}')
try:
output = device.configure(comma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def disable_cable_ports(cid):\n\n SQL.execute('''\n SELECT \n cpid,\n guid,\n port,\n hca\n FROM \n cable_ports \n WHERE\n cid = ?\n ''',(\n cid,\n ))\n\n for row in SQL.fetchall(): \n if row['hca']:\n ... | [
"0.6764529",
"0.6580187",
"0.654981",
"0.6532149",
"0.6376193",
"0.60966444",
"0.6051892",
"0.60355073",
"0.60077417",
"0.59775054",
"0.59527487",
"0.59240466",
"0.59167486",
"0.59125966",
"0.5908374",
"0.5862209",
"0.58325285",
"0.5819661",
"0.58103955",
"0.5798171",
"0.5784... | 0.72111315 | 0 |
Create the base project folder named `.wcscanner` This folder will contain projects folders | def create_base_projects_folder():
if '.wcscanner' not in os.listdir(context.__BASE_PATH__):
os.mkdir(context.__PROJECTS_PATH__, mode=0o777)
log.info("Base folder '.wcscanner' created in %s", context.__BASE_PATH__)
else:
log.info("Base folder '.wcscanner' already in %s", context.__BASE_P... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_project_folder(self):\n\t\tif not os.path.exists(self.segment_path):\n\t\t\tfileutil.makedirs(self.segment_path)",
"def create_project_dir():\r\n with settings(warn_only=True):\r\n run('mkdir -p %s/packages' % (env.path,))\r\n run('mkdir %s/log' % (env.path,))\r\n run('mkdir -p... | [
"0.6659889",
"0.6641856",
"0.64917487",
"0.6437589",
"0.6368039",
"0.6359022",
"0.63302505",
"0.6301878",
"0.62901366",
"0.6244791",
"0.62232673",
"0.6204468",
"0.6195332",
"0.6174261",
"0.61507595",
"0.61412406",
"0.6134815",
"0.6131861",
"0.6122213",
"0.61108935",
"0.609937... | 0.8622508 | 0 |
Function to remove a project entirely | def remove_single_project(project_name):
p = subprocess.Popen('rm -rf {}/{}'.format(context.__PROJECTS_PATH__, project_name), shell=True)
p.wait() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_remove_project(self):\n pass",
"def delete_project(arn=None):\n pass",
"def destroy(config, args):\n log = logging.getLogger('kraftwerk.destroy')\n if confirm(\"Remove project %s from node %s along with all services and data?\" % \n (args.project.name, args.node.hostname)):\... | [
"0.78088254",
"0.7433542",
"0.71992093",
"0.7100344",
"0.6999118",
"0.69928163",
"0.69796044",
"0.69558465",
"0.6908469",
"0.68370533",
"0.679688",
"0.6792618",
"0.6792618",
"0.67563593",
"0.6748435",
"0.6722493",
"0.6663393",
"0.665515",
"0.66471046",
"0.6595111",
"0.6583630... | 0.7941272 | 0 |
Dev function used to remove all projects | def __remove_all_projects__():
p = subprocess.Popen('rm -rf {}/.wcscanner/*'.format(context.__BASE_PATH__), shell=True)
p.wait() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_remove_project(self):\n pass",
"def cleanUp(self):\n import evoware.fileutil as F\n F.tryRemove(self.f_project, verbose=(self.VERBOSITY>1), tree=1)",
"def clean(self):\n\n if not self.__projects:\n return\n\n Console.info(\"Cleaning session...\")\n ... | [
"0.78051233",
"0.7530776",
"0.7457813",
"0.73433113",
"0.7220841",
"0.70927864",
"0.7014415",
"0.7013246",
"0.70059735",
"0.70059735",
"0.6994109",
"0.69718444",
"0.6850931",
"0.68286365",
"0.67603636",
"0.6698705",
"0.66784424",
"0.6565345",
"0.65251285",
"0.6489362",
"0.643... | 0.8361376 | 0 |
Dev method used to remove the base directory of the application | def __remove_base_directory__():
p = subprocess.Popen('rm -rf {}/.wcscanner'.format(context.__BASE_PATH__), shell=True)
p.wait() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_basepath(self, basepath):\n\n # remove leading '/' from basepath so it doesn't screw stuff up\n target = self.install_dir / basepath.lstrip('/')\n\n try:\n # move all contents to the mod-root\n for f in target.iterdir():\n f.rename(self.install_d... | [
"0.6996567",
"0.66437256",
"0.6626104",
"0.65613693",
"0.65441066",
"0.65218043",
"0.6485134",
"0.6461955",
"0.6430868",
"0.63802505",
"0.63655853",
"0.6357699",
"0.6335903",
"0.6290628",
"0.62636834",
"0.62542003",
"0.62300324",
"0.62172204",
"0.6212399",
"0.6205832",
"0.620... | 0.8166111 | 0 |
Create a new revision for each instance of the requested model | def create_revisions_for(model):
total = model.objects.count()
for idx, obj in enumerate(model.objects.iterator()):
with create_revision():
obj.save()
if idx % 100 == 0:
logger.info('Created revision for %s: %s / %s',
model._meta.verbose_name, idx ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NewRevision(self, ids=[], default=None):\n newID, newIndex = [ False, 0 ]\n \n thisContext={ 'internal_writing':True, 'new_revision':True, }\n for tmpObject in self.browse(getListIDs(ids)):\n latestIDs = self.GetLatestIds( [(tmpObject.engineering_code, tmpObject.engineeri... | [
"0.64780706",
"0.6246466",
"0.6127586",
"0.60455424",
"0.6027535",
"0.5952222",
"0.5776394",
"0.5773421",
"0.572619",
"0.5694227",
"0.5680662",
"0.55927366",
"0.55635387",
"0.55238825",
"0.54905146",
"0.53948104",
"0.53815556",
"0.5357851",
"0.53216803",
"0.5307395",
"0.52862... | 0.8095211 | 0 |
Given a sequence of (app_label, model_name) pairs, determine which are still Django models and registered with reversions | def reversion_models(model_pairs):
for app_label, model_name in model_pairs:
try:
model = apps.get_model(app_label, model_name)
if reversion.is_registered(model):
yield model
else:
logger.warn("Model not registered with reversions %s %s",
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def register_models(self, app_label, *models):\n for model in models:\n # Store as 'name: model' pair in a dictionary\n # in the app_models dictionary\n model_name = model._meta.model_name\n model_dict = self.app_models.setdefault(app_label, SortedDict())\n ... | [
"0.637576",
"0.6375394",
"0.630516",
"0.6215255",
"0.61491334",
"0.6054366",
"0.5984944",
"0.58667654",
"0.5846883",
"0.58225566",
"0.5815786",
"0.5760193",
"0.5675553",
"0.5650057",
"0.5580755",
"0.55793256",
"0.5577224",
"0.5542611",
"0.5505628",
"0.5505628",
"0.5504065",
... | 0.73699176 | 0 |
A post_migrate signal handler which creates revisions for models listed in appropriately annotated migrations. | def create_versions_after_migration(**kwargs):
migrations = [migration
for migration, rollback in kwargs.get('plan', [])
if not rollback]
models: Set[Any] = set()
for migration in migrations:
models.update(getattr(migration, 'REVISED_MODELS', []))
with transa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def model_post_migrate(*args, **kwargs):\n global IN_MIGRATIONS\n IN_MIGRATIONS = False",
"def post_migrations(self):",
"def model_pre_migrate(*args, **kwargs):\n global IN_MIGRATIONS\n IN_MIGRATIONS = True",
"def test_migrating_with_post_migrate_function(self):\n yield self.mk_simple_mode... | [
"0.7168965",
"0.68205076",
"0.60526645",
"0.57672065",
"0.5748166",
"0.5628349",
"0.5577539",
"0.55665785",
"0.5546331",
"0.5457541",
"0.5434504",
"0.541682",
"0.5385622",
"0.5384686",
"0.5284687",
"0.5222851",
"0.51773095",
"0.5169075",
"0.51123387",
"0.51044285",
"0.5022356... | 0.703361 | 1 |
bsort simple sorting algorithm that uses any comparison function seq a list to be sorted cmp a function for comparing two elements of seq | def bsort(seq, cmp):
sorted = False # assume the seq is not sorted to start with
while not sorted:
sorted = True # assume it's already sorted correctly
for index, value in enumerate(seq): # for every element in seq
if index > 0: # past the first..
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sort(values, comp_func):\n\n \"\"\"\n 昇順\n comp_func = lambda a, b: a if a<b else b\n\n 降順\n comp_func = lambda a, b: a if a>b else b\n\n 偶数昇順、奇数昇順\n comp_func = lambda a, b: a if \\\n a % 2 == 0 and b % 2 == 1 else \\\n (b if b%2==0 an... | [
"0.69906473",
"0.6801239",
"0.6798643",
"0.669693",
"0.6635075",
"0.6605437",
"0.6601416",
"0.65782595",
"0.6566951",
"0.65586644",
"0.64441836",
"0.6396774",
"0.6370208",
"0.63533443",
"0.63462526",
"0.63443625",
"0.6331016",
"0.6276416",
"0.6274445",
"0.62692845",
"0.625380... | 0.77790433 | 0 |
Interprets the input line as command line arguments to the ``law`` executable and runs it in a subprocess using bash. Output and error streams are piped to the cell. | def law(self, line):
line = line.strip()
if not line:
logger.error(r"the command passed to %law must not be empty")
return
# build the full command
cmd = "law " + line
if line_cmd:
cmd = "{} && {}".format(line_c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def main():\n\targs = sys.argv[1:]\n\t# If stdin is not empty (being piped to)\n\tif not sys.stdin.isatty():\n\t\targs += sys.stdin.readlines()\n\tcommand = Main()\n\tcatch = lnk.errors.Catch(1)\n\tcatch.catch(command.main, args, standalone_mode=False)",
"def ilaw(self, line):\n line = line.strip()\n ... | [
"0.611102",
"0.60783684",
"0.57162184",
"0.5651651",
"0.54892546",
"0.5464681",
"0.5447054",
"0.54450333",
"0.53893256",
"0.5328231",
"0.53135204",
"0.529671",
"0.5282843",
"0.5277602",
"0.52730775",
"0.52728844",
"0.52728844",
"0.52692133",
"0.52558976",
"0.5254265",
"0.5190... | 0.6947543 | 0 |
Interprets the input line as command line arguments to the ``law`` executable, but rather than invoking it in a subprocess, it is evaluated interactively (or inline, thus the i) within the running process. This is especially useful for programmatically running tasks that were defined e.g. in the current notebook. | def ilaw(self, line):
line = line.strip()
if not line:
logger.error(r"the command passed to %ilaw must not be empty")
return
argv = shlex.split(line)
prog = argv.pop(0)
# prog must be a valid law cli prog
if prog n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def law(self, line):\n line = line.strip()\n if not line:\n logger.error(r\"the command passed to %law must not be empty\")\n return\n\n # build the full command\n cmd = \"law \" + line\n if line_cmd:\n cmd = \"{} &... | [
"0.6847528",
"0.571055",
"0.55922145",
"0.5512899",
"0.55023026",
"0.54896945",
"0.54449004",
"0.54421085",
"0.54222596",
"0.5415045",
"0.53889924",
"0.5385756",
"0.5385756",
"0.53805405",
"0.5373572",
"0.5373572",
"0.5373572",
"0.5373572",
"0.5373572",
"0.5373572",
"0.537357... | 0.6991963 | 0 |
register_magics(init_cmd=None, init_fn=None, line_cmd=None, line_fn=None, log_level=None) Registers the two IPython magic methods ``%law`` and ``%ilaw`` which execute law commands either via a subprocess in bash (``%law``) or interactively / inline within the running process (``%ilaw``). init_cmd can be a shell command... | def register_magics(*args, **kwargs):
ipy = None
magics = None
try:
ipy = get_ipython()
except NameError:
logger.error("no running notebook kernel found")
# create the magics
if ipy:
magics = create_magics(*args, **kwargs)
# register it
if ipy and magics:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _register_magics(ipython):\n ipython.register_magic_function(\n _start_magic,\n magic_kind=\"line\",\n magic_name=\"tensorboard\",\n )",
"def load_ipython_extension(ipython):\n\n for module in _MAGICS:\n ipython.register_magic_function(\n getattr(module, 'magic'),\n ... | [
"0.7008458",
"0.6217587",
"0.5964256",
"0.58934474",
"0.56525946",
"0.5644433",
"0.5603719",
"0.5478493",
"0.546413",
"0.5450855",
"0.5428396",
"0.53762233",
"0.52367175",
"0.52102613",
"0.52080494",
"0.5177763",
"0.5166397",
"0.5158223",
"0.5103159",
"0.5101145",
"0.5062271"... | 0.6953809 | 1 |
CSIIsilonSpec defines the desired state of CSIIsilon | def __init__(__self__, *,
driver: 'outputs.CSIIsilonSpecDriver'):
pulumi.set(__self__, "driver", driver) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def driver(self) -> 'outputs.CSIIsilonSpecDriver':\n return pulumi.get(self, \"driver\")",
"def __init__(__self__, *,\n common: 'outputs.CSIIsilonSpecDriverCommon',\n config_version: str,\n replicas: int,\n auth_secret: Optional[str] = None,\... | [
"0.5846621",
"0.5841295",
"0.51959497",
"0.49822912",
"0.4924128",
"0.49084496",
"0.4894449",
"0.48541084",
"0.4831767",
"0.4813849",
"0.476087",
"0.47559026",
"0.47226313",
"0.46790582",
"0.4671698",
"0.4648874",
"0.46272394",
"0.46069556",
"0.460521",
"0.46032214",
"0.45957... | 0.6181904 | 0 |
Driver is the specification for the CSI Isilon Driver | def driver(self) -> 'outputs.CSIIsilonSpecDriver':
return pulumi.get(self, "driver") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n driver: 'outputs.CSIIsilonSpecDriver'):\n pulumi.set(__self__, \"driver\", driver)",
"def __init__(__self__, *,\n driver: 'outputs.CSIVXFlexOSSpecDriver'):\n pulumi.set(__self__, \"driver\", driver)",
"def driver(self) -> 'outputs.CSIVXF... | [
"0.7755355",
"0.6638118",
"0.659107",
"0.6575005",
"0.6453641",
"0.64318734",
"0.62873507",
"0.6273736",
"0.61924016",
"0.6038243",
"0.5645263",
"0.5640794",
"0.5625848",
"0.5540442",
"0.5512617",
"0.5436864",
"0.5334795",
"0.5277546",
"0.5276694",
"0.5274879",
"0.52567095",
... | 0.78547376 | 0 |
ConfigVersion is the configuration version of the driver | def config_version(self) -> str:
return pulumi.get(self, "config_version") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def original_config_version(self):\n return self._get_param(\"ConfigVersion\")",
"def get_config_version(config):\n return 2 if is_v2_config(config) else 1",
"def configversion(self, args):\n print(CONFIG_VERSION)",
"def productVersion( self ):\n return Config.ProductVersion",
"def ... | [
"0.7028426",
"0.6824842",
"0.68103474",
"0.61671114",
"0.61632943",
"0.5905669",
"0.5839637",
"0.5696008",
"0.5659997",
"0.55798566",
"0.55448544",
"0.5508866",
"0.55024767",
"0.5405574",
"0.5395576",
"0.5393082",
"0.5381021",
"0.5331651",
"0.5284632",
"0.5284632",
"0.5284632... | 0.70424426 | 1 |
Replicas is the count of controllers for Controller plugin | def replicas(self) -> int:
return pulumi.get(self, "replicas") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_num_replicas():\n\n tf_replicator = get_tf_replicator()\n\n if tf_replicator:\n return tf_replicator.num_replicas_in_sync\n elif tf.distribute.has_strategy():\n return tf.distribute.get_strategy().num_replicas_in_sync\n else:\n # I'm assuming replicas and shards are always equal until someone ... | [
"0.6779487",
"0.652515",
"0.63903236",
"0.633039",
"0.62465656",
"0.62465656",
"0.6225653",
"0.6089452",
"0.6044615",
"0.6033277",
"0.60150945",
"0.60065347",
"0.5897805",
"0.5868112",
"0.5853733",
"0.5828359",
"0.5775845",
"0.5618973",
"0.5611121",
"0.5611121",
"0.55873203",... | 0.70805544 | 0 |
AuthSecret is the name of the credentials secret for the driver | def auth_secret(self) -> Optional[str]:
return pulumi.get(self, "auth_secret") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def client_secret(self) -> str:",
"def secret(self):\n return self._secret",
"def secret(self) -> str:\n return pulumi.get(self, \"secret\")",
"def secret(self) -> str:\n return pulumi.get(self, \"secret\")",
"def pull_secret(self):\n return self._pull_secret",
"def pull_secre... | [
"0.6323842",
"0.62277025",
"0.61372435",
"0.61372435",
"0.6120714",
"0.6120714",
"0.6079962",
"0.60155314",
"0.5946268",
"0.59420717",
"0.58244205",
"0.57821745",
"0.57658476",
"0.5765793",
"0.57578164",
"0.5710769",
"0.56896",
"0.5686426",
"0.56813496",
"0.56813496",
"0.5677... | 0.7148475 | 0 |
SideCars is the specification for CSI sidecar containers | def side_cars(self) -> Optional[Sequence['outputs.CSIIsilonSpecDriverSideCars']]:
return pulumi.get(self, "side_cars") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def side_cars(self) -> Optional[Sequence['outputs.CSIUnitySpecDriverSideCars']]:\n return pulumi.get(self, \"side_cars\")",
"def side_cars(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverSideCars']]:\n return pulumi.get(self, \"side_cars\")",
"def side_cars(self) -> Optional[Sequence['ou... | [
"0.7081632",
"0.7079114",
"0.69084525",
"0.6728122",
"0.55585927",
"0.55331933",
"0.55313885",
"0.54547393",
"0.5330515",
"0.52934235",
"0.52900565",
"0.51547766",
"0.51150274",
"0.5092653",
"0.48261854",
"0.48198652",
"0.47952843",
"0.46908915",
"0.46813545",
"0.46591654",
"... | 0.71216536 | 0 |
TLSCertSecret is the name of the TLS Cert secret | def tls_cert_secret(self) -> Optional[str]:
return pulumi.get(self, "tls_cert_secret") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_httpstls_secret():\n if 'tls_secret' in DEFINES:\n return DEFINES['tls_secret']\n # The default matches oic-auth-apps flucd manifest defaults\n return DEFAULT_HTTPSTLS_SECRET",
"def get_certificate_from_secret(secret_name, secret_ns):\n kube = kubernetes.KubeOperator()\n secret = ku... | [
"0.6616211",
"0.5982307",
"0.5846973",
"0.5846973",
"0.57956576",
"0.5743475",
"0.57429445",
"0.5594936",
"0.54812825",
"0.5443535",
"0.544203",
"0.5437286",
"0.54145914",
"0.53607064",
"0.53595865",
"0.5357208",
"0.5354906",
"0.5345842",
"0.5342153",
"0.53241307",
"0.5321885... | 0.7376017 | 1 |
Path of the field to select in the specified API version. | def field_path(self) -> str:
return pulumi.get(self, "field_path") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_field_in_version_json(field_name):\n if not os.environ.get(\"create_version_request\"):\n return None\n request = json.loads(os.environ.get(\"create_version_request\"))\n if not request or not isinstance(request, dict):\n return None\n version = request.get(\"version\")\n if not version or not i... | [
"0.6015512",
"0.58980846",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
"0.5766664",
... | 0.6314984 | 0 |
Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. | def effect(self) -> Optional[str]:
return pulumi.get(self, "effect") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testEffects(self):\n \n action = Parser.parse_as(drive.split(\"\\n\"), Action, self.domain)\n self.assert_(isinstance(action.effect, SimpleEffect))",
"def test_effect(self):\n self.check_search(\n dict(similar_to=u'icy wind'),\n [ u'Bubble', u'BubbleBeam', u'... | [
"0.5248231",
"0.5175058",
"0.5093315",
"0.5070223",
"0.46813372",
"0.46715102",
"0.45769897",
"0.45475003",
"0.45334455",
"0.45069087",
"0.44731933",
"0.44663164",
"0.44419047",
"0.4404099",
"0.43879226",
"0.4374986",
"0.43658465",
"0.4363518",
"0.42775276",
"0.42558998",
"0.... | 0.5197251 | 1 |
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. | def toleration_seconds(self) -> Optional[int]:
return pulumi.get(self, "toleration_seconds") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def toleration(self, toleration: Dict[str, str]):\n\n self._toleration = toleration",
"def toleration(self) -> Dict[str, str]:\n return self._toleration",
"def tolerations(self) -> Optional[Sequence['outputs.CSIIsilonSpecDriverNodeTolerations']]:\n return pulumi.get(self, \"tolerations\")"... | [
"0.714702",
"0.67864156",
"0.6333408",
"0.6319307",
"0.6268101",
"0.6245598",
"0.61886585",
"0.6141688",
"0.61333245",
"0.6113511",
"0.6008451",
"0.59721786",
"0.59702766",
"0.59684473",
"0.5959957",
"0.5933874",
"0.58801407",
"0.5768864",
"0.57512695",
"0.5694877",
"0.568268... | 0.742108 | 0 |
ReclaimPolicy is the reclaim policy for the storage class | def reclaim_policy(self) -> Optional[str]:
return pulumi.get(self, "reclaim_policy") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rebalance_policy(self):\n return self._rebalance_policy",
"def rebalance_policy(self, rebalance_policy):\n allowed_values = [\"auto\", \"manual\"]\n if rebalance_policy is not None and rebalance_policy not in allowed_values:\n raise ValueError(\n \"Invalid value... | [
"0.6216241",
"0.5859391",
"0.5115956",
"0.5060897",
"0.5006874",
"0.49962115",
"0.48800308",
"0.48706514",
"0.48706514",
"0.48609537",
"0.48232886",
"0.48182634",
"0.4793153",
"0.47804967",
"0.47694635",
"0.4755424",
"0.47546563",
"0.475363",
"0.4752715",
"0.47368622",
"0.473... | 0.6900613 | 1 |
RevProxyConfig represents the reverse proxy configuration | def config(self) -> 'outputs.CSIPowerMaxRevProxySpecConfig':
return pulumi.get(self, "config") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configure_proxy(self, proxy):\n server_name = self.get_external_domain()\n tls_enabled = self.get_tls()\n ircd_enabled = self.charm_config.get(\"enable-ircd\")\n federation_enabled = self.get_federation()\n\n if tls_enabled:\n self.external_port = 443\n else... | [
"0.59436744",
"0.5851036",
"0.5817962",
"0.5768158",
"0.5693754",
"0.5600076",
"0.55077446",
"0.5401389",
"0.5344445",
"0.52294475",
"0.51776654",
"0.51657885",
"0.5130818",
"0.51041347",
"0.5099259",
"0.50747913",
"0.5042219",
"0.49751547",
"0.49545452",
"0.4948692",
"0.4940... | 0.623585 | 0 |
LinkConfig is one of the configuration modes for reverse proxy | def link_config(self) -> Optional['outputs.CSIPowerMaxRevProxySpecConfigLinkConfig']:
return pulumi.get(self, "link_config") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_link(self, conf, link_id):\n\t\tpass",
"def configure(self):\n self.configureLinks()\n self.isConfigured = True\n return",
"def server_link_setup(self):\n pass",
"def __init__(__self__, *,\n link_config: Optional['outputs.CSIPowerMaxRevProxySpecConfigLinkCo... | [
"0.65031165",
"0.6175159",
"0.59685415",
"0.578361",
"0.56551373",
"0.5577402",
"0.5557687",
"0.5499407",
"0.54680276",
"0.5453428",
"0.5423965",
"0.5338431",
"0.5318767",
"0.51326674",
"0.5110213",
"0.5096941",
"0.50561696",
"0.5044307",
"0.5036249",
"0.5030324",
"0.5007305"... | 0.6454943 | 1 |
StandAloneConfig is one of the configuration modes for reverse proxy | def stand_alone_config(self) -> Optional['outputs.CSIPowerMaxRevProxySpecConfigStandAloneConfig']:
return pulumi.get(self, "stand_alone_config") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def config():\n config_django()\n config_svisor()",
"def test_reverse_proxy_config():\n\n class ReverseProxyConfig(TestingConfig):\n REVERSE_PROXY = \"1,2,3,4\"\n\n app = create_ctfd(config=ReverseProxyConfig)\n with app.app_context():\n assert app.wsgi_app.x_for == 1\n assert... | [
"0.5734231",
"0.5700284",
"0.56778556",
"0.548069",
"0.54663",
"0.54478127",
"0.54054224",
"0.535424",
"0.5339631",
"0.5334389",
"0.5333183",
"0.52794164",
"0.51880765",
"0.5180448",
"0.51594317",
"0.51446605",
"0.51168114",
"0.51168114",
"0.50815207",
"0.50673157",
"0.506122... | 0.60077494 | 0 |
Driver is the specification for the CSI PowerMax Driver | def driver(self) -> 'outputs.CSIPowerMaxSpecDriver':
return pulumi.get(self, "driver") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n driver: 'outputs.CSIPowerMaxSpecDriver'):\n pulumi.set(__self__, \"driver\", driver)",
"def __init__(__self__, *,\n driver: 'outputs.CSIPowerStoreSpecDriver'):\n pulumi.set(__self__, \"driver\", driver)",
"def driver(self) -> 'outputs.CS... | [
"0.7835924",
"0.66870284",
"0.66729796",
"0.6314486",
"0.6233547",
"0.6169987",
"0.6137801",
"0.6074996",
"0.58587897",
"0.5742326",
"0.57361585",
"0.5728146",
"0.5667005",
"0.5643347",
"0.54994494",
"0.545136",
"0.54307276",
"0.5390475",
"0.537022",
"0.5338836",
"0.5310073",... | 0.79797435 | 0 |
Path of the field to select in the specified API version. | def field_path(self) -> str:
return pulumi.get(self, "field_path") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_field_in_version_json(field_name):\n if not os.environ.get(\"create_version_request\"):\n return None\n request = json.loads(os.environ.get(\"create_version_request\"))\n if not request or not isinstance(request, dict):\n return None\n version = request.get(\"version\")\n if not version or not i... | [
"0.6015247",
"0.5895961",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
"0.57634807",
... | 0.6319652 | 1 |
CSIPowerStoreSpec defines the desired state of CSIPowerStore | def __init__(__self__, *,
driver: 'outputs.CSIPowerStoreSpecDriver'):
pulumi.set(__self__, "driver", driver) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def common(self) -> 'outputs.CSIPowerStoreSpecDriverCommon':\n return pulumi.get(self, \"common\")",
"def setWindowStore(s=0):\n sdict = {0:'NOSTORE',1:'STORE'}\n dislin.x11mod(sdict[s])",
"def active_power(self, params=None):\n if self.inv is None:\n raise der.DERError('DER not ... | [
"0.55531",
"0.53814274",
"0.5287721",
"0.51716346",
"0.5164215",
"0.5054662",
"0.49531534",
"0.49034643",
"0.4887106",
"0.48683786",
"0.48633137",
"0.48585188",
"0.480452",
"0.4790361",
"0.4751951",
"0.47489735",
"0.47005275",
"0.4693841",
"0.4692008",
"0.46839023",
"0.465338... | 0.6055389 | 0 |
SnapshotClass is the specification for Snapshot Classes | def snapshot_class(self) -> Optional[Sequence['outputs.CSIPowerStoreSpecDriverSnapshotClass']]:
return pulumi.get(self, "snapshot_class") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def snapshot_class(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverSnapshotClass']]:\n return pulumi.get(self, \"snapshot_class\")",
"def snapshot_class(self) -> Optional[Sequence['outputs.CSIUnitySpecDriverSnapshotClass']]:\n return pulumi.get(self, \"snapshot_class\")",
"def snapshot_c... | [
"0.7336533",
"0.72760487",
"0.7070211",
"0.7056704",
"0.669828",
"0.65507406",
"0.5934098",
"0.59296554",
"0.5928252",
"0.58405566",
"0.5718811",
"0.5634103",
"0.56048465",
"0.5574448",
"0.55006576",
"0.5482949",
"0.53952694",
"0.5382935",
"0.5382102",
"0.5359684",
"0.5347184... | 0.73012376 | 1 |
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. | def toleration_seconds(self) -> Optional[int]:
return pulumi.get(self, "toleration_seconds") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def toleration(self, toleration: Dict[str, str]):\n\n self._toleration = toleration",
"def toleration(self) -> Dict[str, str]:\n return self._toleration",
"def tolerations(self) -> Optional[Sequence['outputs.CSIIsilonSpecDriverNodeTolerations']]:\n return pulumi.get(self, \"tolerations\")"... | [
"0.7147842",
"0.67870635",
"0.6334559",
"0.6320272",
"0.6269226",
"0.62464815",
"0.6189818",
"0.6143222",
"0.6134462",
"0.6114868",
"0.60094",
"0.59734225",
"0.5971313",
"0.59695727",
"0.5961522",
"0.5935294",
"0.58811635",
"0.5770352",
"0.57524425",
"0.5696225",
"0.56837475"... | 0.7421432 | 1 |
NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. | def node_selector(self) -> Optional[Mapping[str, str]]:
return pulumi.get(self, "node_selector") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def node_selector(self, node_selector: Dict[str, str]):\n\n self._node_selector = node_selector",
"def list_of_pods_in_a_node(self, node_name, namespace: Optional[str] = None, label_selector: Optional[str] = None):\n pod_list = []\n if namespace is None:\n api_response = self.list... | [
"0.6502156",
"0.5918389",
"0.59019166",
"0.56973386",
"0.56566566",
"0.5647969",
"0.56320477",
"0.5579677",
"0.5537389",
"0.5537389",
"0.5537389",
"0.5397992",
"0.5397992",
"0.5397992",
"0.53265005",
"0.52993214",
"0.52993214",
"0.52993214",
"0.52291834",
"0.52291834",
"0.522... | 0.62425923 | 1 |
Restrict the node topologies where volumes can be dynamically provisioned. | def allowed_topologies(self) -> Optional[Sequence['outputs.CSIPowerStoreSpecDriverStorageClassAllowedTopologies']]:
return pulumi.get(self, "allowed_topologies") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def allowed_topologies(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverStorageClassAllowedTopologies']]:\n return pulumi.get(self, \"allowed_topologies\")",
"def allowed_topologies(self) -> Optional[Sequence['outputs.CSIPowerMaxSpecDriverStorageClassAllowedTopologies']]:\n return pulumi.ge... | [
"0.5891469",
"0.5813511",
"0.58032465",
"0.56135035",
"0.54997087",
"0.5374481",
"0.5219399",
"0.51760525",
"0.5159506",
"0.5103449",
"0.49977416",
"0.4946259",
"0.49090728",
"0.4903071",
"0.48948416",
"0.48678818",
"0.48345947",
"0.48270988",
"0.48091453",
"0.4797037",
"0.47... | 0.5830229 | 1 |
DriverHash is a hash of the driver specification | def driver_hash(self) -> Optional[int]:
return pulumi.get(self, "driver_hash") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calc_statistics_hash(self) -> bytes:\n return b\"somehash\"",
"def hash(self):\n hash_length = self.conf.get(\"hash_length\", 7)\n if hash_length != 0:\n return self.spec.dag_hash(length=hash_length)\n return None",
"def hash(self) -> str:\n return pulumi.get(s... | [
"0.61757976",
"0.6066933",
"0.60375184",
"0.5997764",
"0.594634",
"0.5918709",
"0.5837613",
"0.5741857",
"0.5730527",
"0.57251143",
"0.571917",
"0.56923187",
"0.56780314",
"0.5644666",
"0.56291103",
"0.5626307",
"0.55769527",
"0.55643994",
"0.5558305",
"0.55445856",
"0.552841... | 0.75255907 | 0 |
CSIUnitySpec defines the desired state of CSIUnity | def __init__(__self__, *,
driver: 'outputs.CSIUnitySpecDriver'):
pulumi.set(__self__, "driver", driver) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n common: 'outputs.CSIUnitySpecDriverCommon',\n config_version: str,\n replicas: int,\n auth_secret: Optional[str] = None,\n controller: Optional['outputs.CSIUnitySpecDriverController'] = None,\n ... | [
"0.6342253",
"0.58682024",
"0.54167765",
"0.53242034",
"0.5032858",
"0.4980972",
"0.49724",
"0.4922244",
"0.4900498",
"0.4853054",
"0.48514065",
"0.48020718",
"0.47460636",
"0.47310558",
"0.4716699",
"0.4690882",
"0.46598062",
"0.46575856",
"0.46110857",
"0.4596909",
"0.45866... | 0.64504963 | 0 |
Driver is the specification for the CSI Unity Driver | def driver(self) -> 'outputs.CSIUnitySpecDriver':
return pulumi.get(self, "driver") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n driver: 'outputs.CSIUnitySpecDriver'):\n pulumi.set(__self__, \"driver\", driver)",
"def driver(self) -> 'outputs.CSIVXFlexOSSpecDriver':\n return pulumi.get(self, \"driver\")",
"def __init__(__self__, *,\n driver: 'outputs.CSIVXFlexOSSp... | [
"0.77165973",
"0.6981358",
"0.68887204",
"0.6443961",
"0.6386162",
"0.63490826",
"0.6150103",
"0.60056",
"0.5816774",
"0.57003725",
"0.56489235",
"0.5635592",
"0.5631918",
"0.5620819",
"0.5620501",
"0.5566235",
"0.5545292",
"0.55352056",
"0.5488729",
"0.547208",
"0.54156655",... | 0.78425765 | 0 |
ConfigVersion is the configuration version of the driver | def config_version(self) -> str:
return pulumi.get(self, "config_version") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def original_config_version(self):\n return self._get_param(\"ConfigVersion\")",
"def get_config_version(config):\n return 2 if is_v2_config(config) else 1",
"def configversion(self, args):\n print(CONFIG_VERSION)",
"def productVersion( self ):\n return Config.ProductVersion",
"def ... | [
"0.7029714",
"0.6827348",
"0.6811454",
"0.616742",
"0.61624855",
"0.590572",
"0.58411497",
"0.5696876",
"0.5662444",
"0.55812186",
"0.5544786",
"0.55088234",
"0.550328",
"0.540622",
"0.5396156",
"0.53930455",
"0.5383128",
"0.5330674",
"0.5284666",
"0.5284666",
"0.5284666",
... | 0.7043955 | 0 |
Replicas is the count of controllers for Controller plugin | def replicas(self) -> int:
return pulumi.get(self, "replicas") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_num_replicas():\n\n tf_replicator = get_tf_replicator()\n\n if tf_replicator:\n return tf_replicator.num_replicas_in_sync\n elif tf.distribute.has_strategy():\n return tf.distribute.get_strategy().num_replicas_in_sync\n else:\n # I'm assuming replicas and shards are always equal until someone ... | [
"0.67781794",
"0.65245944",
"0.6388949",
"0.63295215",
"0.62453663",
"0.62453663",
"0.62261033",
"0.608981",
"0.60434526",
"0.60335743",
"0.60149395",
"0.6006961",
"0.58982265",
"0.5868115",
"0.58531505",
"0.58276963",
"0.5775041",
"0.56192803",
"0.56107664",
"0.56107664",
"0... | 0.7079593 | 1 |
AuthSecret is the name of the credentials secret for the driver | def auth_secret(self) -> Optional[str]:
return pulumi.get(self, "auth_secret") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def client_secret(self) -> str:",
"def secret(self):\n return self._secret",
"def secret(self) -> str:\n return pulumi.get(self, \"secret\")",
"def secret(self) -> str:\n return pulumi.get(self, \"secret\")",
"def pull_secret(self):\n return self._pull_secret",
"def pull_secre... | [
"0.6322999",
"0.6228721",
"0.6138825",
"0.6138825",
"0.61205673",
"0.61205673",
"0.6077916",
"0.6013005",
"0.59475607",
"0.59419864",
"0.58220655",
"0.57813203",
"0.5767015",
"0.5762318",
"0.57585716",
"0.5713077",
"0.5689188",
"0.5688631",
"0.56837416",
"0.56837416",
"0.5676... | 0.7147245 | 1 |
SideCars is the specification for CSI sidecar containers | def side_cars(self) -> Optional[Sequence['outputs.CSIUnitySpecDriverSideCars']]:
return pulumi.get(self, "side_cars") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def side_cars(self) -> Optional[Sequence['outputs.CSIIsilonSpecDriverSideCars']]:\n return pulumi.get(self, \"side_cars\")",
"def side_cars(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverSideCars']]:\n return pulumi.get(self, \"side_cars\")",
"def side_cars(self) -> Optional[Sequence['o... | [
"0.7122332",
"0.7079939",
"0.69095534",
"0.67289656",
"0.55598956",
"0.5531892",
"0.5531867",
"0.5453014",
"0.5329077",
"0.5292361",
"0.52911955",
"0.51534843",
"0.5113812",
"0.50935465",
"0.48243824",
"0.4818962",
"0.4794707",
"0.46911767",
"0.46801996",
"0.4657909",
"0.4617... | 0.70821893 | 1 |
TLSCertSecret is the name of the TLS Cert secret | def tls_cert_secret(self) -> Optional[str]:
return pulumi.get(self, "tls_cert_secret") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_httpstls_secret():\n if 'tls_secret' in DEFINES:\n return DEFINES['tls_secret']\n # The default matches oic-auth-apps flucd manifest defaults\n return DEFAULT_HTTPSTLS_SECRET",
"def get_certificate_from_secret(secret_name, secret_ns):\n kube = kubernetes.KubeOperator()\n secret = ku... | [
"0.6617524",
"0.5983317",
"0.58468336",
"0.58468336",
"0.5796945",
"0.57450837",
"0.5744361",
"0.55957747",
"0.548282",
"0.5444516",
"0.54431623",
"0.54390496",
"0.5414196",
"0.5360056",
"0.535964",
"0.53580487",
"0.5354628",
"0.53463376",
"0.5343948",
"0.5324922",
"0.5321708... | 0.73764014 | 0 |
ImagePullPolicy is the image pull policy for the image | def image_pull_policy(self) -> Optional[str]:
return pulumi.get(self, "image_pull_policy") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _determine_image_pull_policy(self) -> ImagePullPolicy:\n if not self.image_pull_policy:\n _, tag = self._get_image_and_tag()\n if tag == \"latest\" or not tag:\n return ImagePullPolicy.ALWAYS\n return ImagePullPolicy.IF_NOT_PRESENT\n return self.ima... | [
"0.8125533",
"0.7769158",
"0.68589365",
"0.62248176",
"0.59526604",
"0.5950211",
"0.5819258",
"0.5774122",
"0.56765014",
"0.5624425",
"0.56165045",
"0.5529986",
"0.54840046",
"0.5459022",
"0.54292417",
"0.54169023",
"0.5408534",
"0.53826547",
"0.53813297",
"0.5363186",
"0.535... | 0.7893667 | 1 |
AllowVolumeExpansion is a boolean flag which indicates if volumes can be expanded | def allow_volume_expansion(self) -> Optional[bool]:
return pulumi.get(self, "allow_volume_expansion") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def expand_volume(self, vol, new_size):\n self.authenticate_user()\n volume_name = self._get_vipr_volume_name(vol)\n size_in_bytes = vipr_utils.to_bytes(str(new_size) + \"G\")\n\n try:\n self.volume_obj.expand(\n self.configuration.vipr_tenant +\n ... | [
"0.5745551",
"0.54371166",
"0.5398411",
"0.5398006",
"0.5301903",
"0.5236258",
"0.5219399",
"0.5200871",
"0.51637703",
"0.51509345",
"0.512159",
"0.5095982",
"0.50772727",
"0.506262",
"0.50104576",
"0.49561206",
"0.4911384",
"0.49091676",
"0.4906915",
"0.48999748",
"0.4882017... | 0.80991673 | 0 |
ReclaimPolicy is the reclaim policy for the storage class | def reclaim_policy(self) -> Optional[str]:
return pulumi.get(self, "reclaim_policy") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rebalance_policy(self):\n return self._rebalance_policy",
"def rebalance_policy(self, rebalance_policy):\n allowed_values = [\"auto\", \"manual\"]\n if rebalance_policy is not None and rebalance_policy not in allowed_values:\n raise ValueError(\n \"Invalid value... | [
"0.6216241",
"0.5859391",
"0.5115956",
"0.5060897",
"0.5006874",
"0.49962115",
"0.48800308",
"0.48706514",
"0.48706514",
"0.48609537",
"0.48232886",
"0.48182634",
"0.4793153",
"0.47804967",
"0.47694635",
"0.4755424",
"0.47546563",
"0.475363",
"0.4752715",
"0.47368622",
"0.473... | 0.6900613 | 0 |
ControllerStatus is the status of Controller pods | def controller_status(self) -> Optional['outputs.CSIUnityStatusControllerStatus']:
return pulumi.get(self, "controller_status") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def controller_status(self) -> Optional['outputs.CSIVXFlexOSStatusControllerStatus']:\n return pulumi.get(self, \"controller_status\")",
"def status(self) -> ControllerStatus:\n return self._status",
"def controller_status(self) -> Optional['outputs.CSIPowerStoreStatusControllerStatus']:\n ... | [
"0.78950554",
"0.7656238",
"0.7582138",
"0.74687314",
"0.7435508",
"0.6915362",
"0.68638337",
"0.5934879",
"0.5923136",
"0.5888573",
"0.58432204",
"0.58387125",
"0.58308405",
"0.5828534",
"0.58209366",
"0.5818346",
"0.5816",
"0.5798976",
"0.57974327",
"0.57905334",
"0.5790449... | 0.7717445 | 1 |
DriverHash is a hash of the driver specification | def driver_hash(self) -> Optional[int]:
return pulumi.get(self, "driver_hash") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calc_statistics_hash(self) -> bytes:\n return b\"somehash\"",
"def hash(self):\n hash_length = self.conf.get(\"hash_length\", 7)\n if hash_length != 0:\n return self.spec.dag_hash(length=hash_length)\n return None",
"def hash(self) -> str:\n return pulumi.get(s... | [
"0.6173768",
"0.6065773",
"0.6036141",
"0.59962916",
"0.59433484",
"0.59169525",
"0.5836508",
"0.57406753",
"0.5732935",
"0.5724046",
"0.5717286",
"0.56912756",
"0.5676674",
"0.5643813",
"0.56277317",
"0.5624637",
"0.5575219",
"0.55626106",
"0.5556711",
"0.5542709",
"0.552776... | 0.7525444 | 1 |
NodeStatus is the status of Controller pods | def node_status(self) -> Optional['outputs.CSIUnityStatusNodeStatus']:
return pulumi.get(self, "node_status") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def node_status(self) -> Optional['outputs.CSIVXFlexOSStatusNodeStatus']:\n return pulumi.get(self, \"node_status\")",
"def node_status(self) -> Optional['outputs.CSIIsilonStatusNodeStatus']:\n return pulumi.get(self, \"node_status\")",
"def node_statuses(self) -> pulumi.Output[Sequence['outputs.... | [
"0.75052977",
"0.7269733",
"0.71536577",
"0.7088996",
"0.70575774",
"0.70387757",
"0.6946383",
"0.6911487",
"0.68622947",
"0.6709298",
"0.6686322",
"0.65567106",
"0.6555048",
"0.6541361",
"0.6439678",
"0.63545966",
"0.63124776",
"0.62752545",
"0.62047577",
"0.6166106",
"0.608... | 0.73668116 | 1 |
CSIVXFlexOSSpec defines the desired state of CSIVXFlexOS | def __init__(__self__, *,
driver: 'outputs.CSIVXFlexOSSpecDriver'):
pulumi.set(__self__, "driver", driver) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n common: 'outputs.CSIVXFlexOSSpecDriverCommon',\n config_version: str,\n replicas: int,\n auth_secret: Optional[str] = None,\n controller: Optional['outputs.CSIVXFlexOSSpecDriverController'] = None,\n ... | [
"0.60012674",
"0.5062758",
"0.4951055",
"0.4939356",
"0.49062017",
"0.48738027",
"0.48640075",
"0.48322517",
"0.48254272",
"0.48190284",
"0.48021835",
"0.47678328",
"0.47568431",
"0.47492415",
"0.4741626",
"0.4740513",
"0.47390306",
"0.4738941",
"0.47331664",
"0.47286186",
"0... | 0.5843422 | 1 |
Driver is the specification for the CSI VxFlexOS Driver | def driver(self) -> 'outputs.CSIVXFlexOSSpecDriver':
return pulumi.get(self, "driver") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n driver: 'outputs.CSIVXFlexOSSpecDriver'):\n pulumi.set(__self__, \"driver\", driver)",
"def driver(self) -> 'outputs.CSIUnitySpecDriver':\n return pulumi.get(self, \"driver\")",
"def __init__(__self__, *,\n driver: 'outputs.CSIUnitySpecD... | [
"0.7499845",
"0.65094316",
"0.64233506",
"0.6400509",
"0.6386327",
"0.62878305",
"0.60758394",
"0.6042327",
"0.5886265",
"0.58776003",
"0.58217376",
"0.5741687",
"0.57011986",
"0.5674426",
"0.5655592",
"0.56050086",
"0.55793077",
"0.5455731",
"0.54092747",
"0.5309138",
"0.527... | 0.7507063 | 0 |
SnapshotClass is the specification for Snapshot Classes | def snapshot_class(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverSnapshotClass']]:
return pulumi.get(self, "snapshot_class") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def snapshot_class(self) -> Optional[Sequence['outputs.CSIPowerStoreSpecDriverSnapshotClass']]:\n return pulumi.get(self, \"snapshot_class\")",
"def snapshot_class(self) -> Optional[Sequence['outputs.CSIUnitySpecDriverSnapshotClass']]:\n return pulumi.get(self, \"snapshot_class\")",
"def snapshot... | [
"0.73012376",
"0.72760487",
"0.7070211",
"0.7056704",
"0.669828",
"0.65507406",
"0.5934098",
"0.59296554",
"0.5928252",
"0.58405566",
"0.5718811",
"0.5634103",
"0.56048465",
"0.5574448",
"0.55006576",
"0.5482949",
"0.53952694",
"0.5382935",
"0.5382102",
"0.5359684",
"0.534718... | 0.7336533 | 0 |
Tolerations is the list of tolerations for the driver pods | def tolerations(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverControllerTolerations']]:
return pulumi.get(self, "tolerations") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tolerations(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverNodeTolerations']]:\n return pulumi.get(self, \"tolerations\")",
"def tolerations(self) -> Optional[Sequence['outputs.CSIPowerStoreSpecDriverControllerTolerations']]:\n return pulumi.get(self, \"tolerations\")",
"def tolerat... | [
"0.7678924",
"0.7636232",
"0.7588812",
"0.7569768",
"0.75446975",
"0.7522246",
"0.75063044",
"0.74759024",
"0.7431494",
"0.7366254",
"0.73646927",
"0.73607546",
"0.73571926",
"0.7320017",
"0.7289272",
"0.7288363",
"0.7259748",
"0.7181028",
"0.71584857",
"0.67214155",
"0.66434... | 0.77393144 | 0 |
Tolerations is the list of tolerations for the driver pods | def tolerations(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverNodeTolerations']]:
return pulumi.get(self, "tolerations") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tolerations(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverControllerTolerations']]:\n return pulumi.get(self, \"tolerations\")",
"def tolerations(self) -> Optional[Sequence['outputs.CSIPowerStoreSpecDriverControllerTolerations']]:\n return pulumi.get(self, \"tolerations\")",
"def t... | [
"0.77384454",
"0.7635416",
"0.7587556",
"0.7568399",
"0.7544048",
"0.7521143",
"0.75056195",
"0.7474809",
"0.7430536",
"0.73656464",
"0.7363599",
"0.735969",
"0.7356401",
"0.73185813",
"0.7287663",
"0.7287038",
"0.7258097",
"0.7179613",
"0.7157681",
"0.67209274",
"0.6642811",... | 0.76782155 | 1 |
AllowVolumeExpansion is a boolean flag which indicates if volumes can be expanded | def allow_volume_expansion(self) -> Optional[bool]:
return pulumi.get(self, "allow_volume_expansion") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def expand_volume(self, vol, new_size):\n self.authenticate_user()\n volume_name = self._get_vipr_volume_name(vol)\n size_in_bytes = vipr_utils.to_bytes(str(new_size) + \"G\")\n\n try:\n self.volume_obj.expand(\n self.configuration.vipr_tenant +\n ... | [
"0.5748133",
"0.5436244",
"0.54004693",
"0.53974086",
"0.53028864",
"0.52384055",
"0.52220774",
"0.5203464",
"0.51631445",
"0.5153655",
"0.5122452",
"0.5096057",
"0.5078894",
"0.50637805",
"0.50124866",
"0.4956496",
"0.4913379",
"0.49104056",
"0.49088234",
"0.49020234",
"0.48... | 0.8099426 | 1 |
Restrict the node topologies where volumes can be dynamically provisioned. | def allowed_topologies(self) -> Optional[Sequence['outputs.CSIVXFlexOSSpecDriverStorageClassAllowedTopologies']]:
return pulumi.get(self, "allowed_topologies") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def allowed_topologies(self) -> Optional[Sequence['outputs.CSIPowerStoreSpecDriverStorageClassAllowedTopologies']]:\n return pulumi.get(self, \"allowed_topologies\")",
"def allowed_topologies(self) -> Optional[Sequence['outputs.CSIPowerMaxSpecDriverStorageClassAllowedTopologies']]:\n return pulumi.... | [
"0.5830229",
"0.5813511",
"0.58032465",
"0.56135035",
"0.54997087",
"0.5374481",
"0.5219399",
"0.51760525",
"0.5159506",
"0.5103449",
"0.49977416",
"0.4946259",
"0.49090728",
"0.4903071",
"0.48948416",
"0.48678818",
"0.48345947",
"0.48270988",
"0.48091453",
"0.4797037",
"0.47... | 0.5891469 | 0 |
ControllerStatus is the status of Controller pods | def controller_status(self) -> Optional['outputs.CSIVXFlexOSStatusControllerStatus']:
return pulumi.get(self, "controller_status") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def controller_status(self) -> Optional['outputs.CSIUnityStatusControllerStatus']:\n return pulumi.get(self, \"controller_status\")",
"def status(self) -> ControllerStatus:\n return self._status",
"def controller_status(self) -> Optional['outputs.CSIPowerStoreStatusControllerStatus']:\n re... | [
"0.7716838",
"0.76570404",
"0.7581352",
"0.74678415",
"0.7435039",
"0.6915596",
"0.6864449",
"0.59351426",
"0.59238404",
"0.5888972",
"0.584402",
"0.58390266",
"0.58311397",
"0.5826533",
"0.58211887",
"0.5818358",
"0.5816246",
"0.58006066",
"0.57969457",
"0.57903516",
"0.5789... | 0.7894275 | 0 |
NodeStatus is the status of Controller pods | def node_status(self) -> Optional['outputs.CSIVXFlexOSStatusNodeStatus']:
return pulumi.get(self, "node_status") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def node_status(self) -> Optional['outputs.CSIUnityStatusNodeStatus']:\n return pulumi.get(self, \"node_status\")",
"def node_status(self) -> Optional['outputs.CSIIsilonStatusNodeStatus']:\n return pulumi.get(self, \"node_status\")",
"def node_statuses(self) -> pulumi.Output[Sequence['outputs.Nod... | [
"0.73655444",
"0.7268281",
"0.7152991",
"0.7087971",
"0.70559794",
"0.70392525",
"0.69451696",
"0.69108874",
"0.68627334",
"0.67092526",
"0.6685717",
"0.655616",
"0.65551025",
"0.65426487",
"0.6439449",
"0.6357788",
"0.63130367",
"0.6275088",
"0.62040925",
"0.6166804",
"0.608... | 0.75042415 | 0 |
Store browser cookies in a pickle file | def save_cookies_in_pickle(self):
with open(self.path, "wb") as file:
pickle.dump(self.browser.get_cookies(), file)
print(f'Cookies saved to {self.service}.pickle') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def save_cookies(self):\n\n with open(self.location_of_cookies, 'wb') as f:\n pickle.dump(self.get_cookies(), f)\n f.close()",
"def _save_cookies(requests_cookiejar, filename):\n with open(filename, 'wb') as handle:\n pickle.dump(requests_cookiejar, handle)",
"def save_co... | [
"0.8294968",
"0.82088995",
"0.81902015",
"0.79834753",
"0.79596627",
"0.7889409",
"0.7766356",
"0.775621",
"0.74142534",
"0.7398106",
"0.709393",
"0.69966495",
"0.6756405",
"0.67221403",
"0.66975796",
"0.66403407",
"0.6575654",
"0.6550851",
"0.6473795",
"0.6444341",
"0.639624... | 0.88248575 | 0 |
read_file Here this function will read a text file (UTF8) and prints it as the standardoutput | def read_file(filename=""):
with open(filename, encoding="utf-8") as n:
print(n.read(), end="") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_file(filename=\"\"):\n with open(filename, encoding='utf-8') as f:\n print(f.read(), end=\"\")",
"def read_file(filename=\"\"):\n with open(filename, 'r', encoding='utf-8') as fi:\n print(fi.read(), end=\"\")",
"def read_file(filename=\"\"):\n with open(filename, 'r', encodi... | [
"0.8073081",
"0.80356634",
"0.8004845",
"0.8001571",
"0.7931309",
"0.77453053",
"0.74300694",
"0.74248487",
"0.7419696",
"0.72860175",
"0.7252469",
"0.7177055",
"0.7169224",
"0.7169224",
"0.7058749",
"0.70194954",
"0.7015463",
"0.6956451",
"0.6943433",
"0.687878",
"0.68684185... | 0.8194404 | 0 |
Print objects to stderr then exit | def printExit(*objects):
print(*objects, file=sys.stderr)
sys.exit(1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def finalize_error():\n print('')\n exit(-1)",
"def _error(self, *args, **kwargs):\n print(\"[{}]\".format(self.type), *args, file=sys.stderr, **kwargs)\n sys.exit(1)",
"def err(*objects, file=sys.stderr, flush=True, style=Fore.RED, **kwargs):\r\n with ScopedColoredStream(file, style, fl... | [
"0.69286865",
"0.67440766",
"0.66084737",
"0.65934783",
"0.65758634",
"0.6541604",
"0.6508118",
"0.6497011",
"0.6484108",
"0.64639866",
"0.64514565",
"0.6436417",
"0.6435237",
"0.64178294",
"0.6345792",
"0.62707883",
"0.6222666",
"0.61963606",
"0.61913276",
"0.6187603",
"0.61... | 0.7785314 | 0 |
Plot computed solutions to recurrences | def plot_example(length):
rec_plot = []
sol_plot = []
sol = SOL_DICT[INDEX]
for num in range(2, length):
rec_plot.append([num, recur(num)])
sol_plot.append([num, sol(num)])
simpleplot.plot_lines("Recurrence solutions", 600, 600, "number", "value",
[rec_plot,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plot_solution(self):\n\n plt.plot(self.x_values, self.analytical(self.x_values, self.C,self.D), label = \"Analytical\")\n plt.plot(self.x_values, self.numerical, label = \"Numerical\")\n plt.title(\"Numerical vs. Analytical Solution\")\n plt.xlabel(\"x\")\n plt.ylabel(\"u(x)\... | [
"0.6978192",
"0.6843992",
"0.67658085",
"0.6505199",
"0.6289391",
"0.6274354",
"0.627349",
"0.627176",
"0.62675595",
"0.62425923",
"0.6217016",
"0.62123513",
"0.6169168",
"0.6159171",
"0.6141866",
"0.61326224",
"0.6091893",
"0.6089854",
"0.6078055",
"0.6043386",
"0.6042587",
... | 0.73072284 | 0 |
Text definitions to format strings. | def formatter(text):
repl_map = {
"degC": "$^o$C",
"K": "$^o$C",
"month-1": "month$^{{-1}}$",
"day-1": "day$^{{-1}}$",
"d-1": "day$^{{-1}}$",
"decade-1": "decade$^{{-1}}$",
"year-1": "year$^{{-1}}$",
"rcp85": "RCP8.5... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def syntax_text():",
"def complete_opt_format(self, text, *_):\n return [t + \" \" for t in FORMATTERS if t.startswith(text)]",
"def formatted(self) -> str:\r\n ...",
"def get_text_format(self) -> constants.TextFormatStr:\n return constants.TEXT_FORMAT.inverse[self.textFormat()]",
"def... | [
"0.65333766",
"0.62248075",
"0.60538745",
"0.5975071",
"0.594579",
"0.5892548",
"0.5857848",
"0.58462155",
"0.58382225",
"0.5814157",
"0.58111644",
"0.5772846",
"0.5740308",
"0.5735877",
"0.5732846",
"0.5682013",
"0.56642157",
"0.56596196",
"0.56564844",
"0.56554836",
"0.5654... | 0.6782625 | 0 |
Sorts the longitudes of the cubes from 0/360 degrees to 180/180. | def regrid_longitude_coord(self, cube):
# make a list with the 'longitude' coord in the form: 0/180/-180/0
neg_lons = ((cube.coord("longitude").points + 180) % 360) - 180
# interpolates the cube data to the new 'longitude' dimensions
cube = cube.interpolate([("longitude", neg_lons)],
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _sort_cubelist(self, cubelist):\n sorted_cubelist = []\n realization_num = 1\n cubelist = cubelist.merge(unique=False)\n for cube in cubelist:\n # If time is a scalar coordinate, promote it to a dimension \n # coordinate, this is because all cubes must have the... | [
"0.6514328",
"0.6512158",
"0.6155754",
"0.61285055",
"0.58211863",
"0.5708495",
"0.5647426",
"0.5640268",
"0.5631797",
"0.56041026",
"0.5532551",
"0.5342842",
"0.5309956",
"0.530769",
"0.5285943",
"0.5281094",
"0.5253457",
"0.5238142",
"0.5233403",
"0.5211333",
"0.5211333",
... | 0.6862481 | 0 |
Create a provenance record describing the hotspot fields plots. | def get_hotspot_provenance(self, suptitle, scenario, ancestor_files):
caption = (f"{suptitle}. Calculated for seasons "
f"{self.seasons[0].upper()}, "
f"{self.seasons[1].upper()} and {self.seasons[2].upper()} "
f"in the future periods {self.cfg['future_pe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _hotspot_fields_plot_save(self, against_region, variable, scenario,\n ancestor_files):\n suptitle = (f\"{self.cfg['region_name']} {variable.upper()} \"\n f\"change against mean {against_region} future \"\n f\"climatology. Baseline pe... | [
"0.5756424",
"0.5504841",
"0.54990816",
"0.54645437",
"0.540593",
"0.535219",
"0.52645105",
"0.51810455",
"0.5171368",
"0.5142758",
"0.4949729",
"0.4925848",
"0.48983437",
"0.48819402",
"0.48776308",
"0.48431304",
"0.47729012",
"0.47432384",
"0.4723387",
"0.47224906",
"0.4721... | 0.58652025 | 0 |
Create a provenance record with the rolling mean diagnostic data. | def get_rolling_mean_provenance(self, suptitle, ancestor_files):
suptitle = suptitle.replace('\n', '')
caption = (f"{suptitle}. For CMIP5 ("
f"{self.formatter(f'cmip5-{self.scenarios[0]}')}, "
f"{self.formatter(f'cmip5-{self.scenarios[1]}')} and "
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_rolling_mean(self, rm):\n self.data['rolling_mean'] = rm",
"def new_archive_record(self, event):\n end_ts = event.record['dateTime']\n start_ts = end_ts - event.record['interval'] * 60\n\n for topic in self.subscriber.subscribed_topics: # topics might not be cached.. therefore... | [
"0.5613848",
"0.50898737",
"0.5073275",
"0.5069689",
"0.5012415",
"0.50077665",
"0.499012",
"0.49855378",
"0.49821198",
"0.49237096",
"0.4893636",
"0.47850022",
"0.47435543",
"0.47421452",
"0.47396365",
"0.47319072",
"0.47303843",
"0.47267595",
"0.47252092",
"0.46979374",
"0.... | 0.66347843 | 0 |
validate Prophet parameters This method validates some key parameters including growth rate and custom_seasonalities. | def validate_params(self) -> None:
# cap must be given when using logistic growth
if (self.growth == "logistic") and (self.cap is False):
msg = "Capacity must be provided for logistic growth"
logging.error(msg)
raise ValueError(msg)
# If custom_seasonalities ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _data_params_validation(self) -> None:\n extra_regressor_names = set(self.params._reqd_regressor_names)\n # univariate case\n if self.data.is_univariate():\n if len(extra_regressor_names) != 0:\n msg = (\n f\"Missing data for extra regressors: {... | [
"0.6698862",
"0.6689876",
"0.6623971",
"0.65948725",
"0.65588653",
"0.6514061",
"0.6488414",
"0.64832795",
"0.6465186",
"0.64392763",
"0.64350533",
"0.6429519",
"0.6407982",
"0.63650566",
"0.6298115",
"0.62283796",
"0.62046695",
"0.61903995",
"0.61821324",
"0.6179447",
"0.613... | 0.7009893 | 0 |
Validate whether `data` contains specified regressors or not. | def _data_params_validation(self) -> None:
extra_regressor_names = set(self.params._reqd_regressor_names)
# univariate case
if self.data.is_univariate():
if len(extra_regressor_names) != 0:
msg = (
f"Missing data for extra regressors: {self.params.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fitRegressor(self, data):\r\n if data.SETS == 2:\r\n self.regressor.fit(data.trainX, data.trainy)",
"def validate(self, data):\n return any(imap(lambda validator: validate_common(validator, data), self.validators))",
"def check_regressor(self):\n\n # Sklearn and Mlxtend stac... | [
"0.66148984",
"0.6360852",
"0.63539565",
"0.6292314",
"0.58856297",
"0.5856178",
"0.5741423",
"0.57359177",
"0.5584346",
"0.5562927",
"0.5553923",
"0.55270314",
"0.552547",
"0.5523597",
"0.551913",
"0.55061245",
"0.5425437",
"0.5414315",
"0.5379005",
"0.5355849",
"0.5340424",... | 0.67881787 | 0 |
get default parameter search space for Prophet model | def get_parameter_search_space() -> List[Dict[str, object]]:
return get_default_prophet_parameter_search_space() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def default_params():\n params = {}\n params['dataset'] = 'adult'\n params['engines'] = ['MD','RDA']\n params['iters'] = 10000\n params['epsilon'] = 1.0\n params['delta'] = 0.0\n params['bounded'] = True\n params['frequency'] = 1\n params['seed'] = 0\n params['save'] = None\n param... | [
"0.65847033",
"0.6535262",
"0.63484514",
"0.6261159",
"0.615016",
"0.6135261",
"0.60658514",
"0.6031016",
"0.59677446",
"0.5958387",
"0.5953047",
"0.58978546",
"0.5886156",
"0.58836716",
"0.58489406",
"0.58475643",
"0.5846227",
"0.58361953",
"0.58296055",
"0.5819666",
"0.5811... | 0.80838275 | 0 |
Sample draws of the future trend values. Vectorized version of sample_predictive_trend(). | def _sample_predictive_trend_vectorized(
prophet_model: Prophet, df: pd.DataFrame, n_samples: int, iteration: int = 0
) -> np.ndarray:
if prophet_model.growth == "linear":
return sample_linear_predictive_trend_vectorize(
prophet_model, df, n_samples, iteration
)
deltas = prophe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sample_linear_predictive_trend_vectorize(\n prophet_model: Prophet, df: pd.DataFrame, sample_size: int, iteration: int\n) -> np.ndarray:\n k = prophet_model.params[\"k\"][iteration]\n m = prophet_model.params[\"m\"][iteration]\n deltas = prophet_model.params[\"delta\"][iteration]\n changepoints_... | [
"0.64506996",
"0.6297814",
"0.61076504",
"0.57060647",
"0.56256115",
"0.5473225",
"0.547147",
"0.5432517",
"0.5382349",
"0.53632545",
"0.53604054",
"0.5356977",
"0.5291475",
"0.52841",
"0.52544636",
"0.5239208",
"0.52355576",
"0.5212369",
"0.5200511",
"0.5188102",
"0.51754284... | 0.74734485 | 0 |
Creates a matrix of random trend shifts based on historical likelihood and size of shifts. Can be used for either linear or logistic trend shifts. Each row represents a different sample of a possible future, and each column is a time step into the future. | def _make_trend_shift_matrix(
mean_delta: float, likelihood: float, future_length: float, n_samples: int
) -> np.ndarray:
# create a bool matrix of where these trend shifts should go
bool_slope_change = np.random.uniform(size=(n_samples, future_length)) < likelihood
shift_values = np.random.laplace(0, m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gen_all_arms_reward_shifts(self):\n reward_shifts = (\n torch.randn(self._num_arms_all) * self.sigma_shift + self.mu_shift\n )\n return reward_shifts",
"def generate_shift(self, k=1, static=False):\n if static:\n shift = np.zeros((k, 2))\n else:\n ... | [
"0.58462596",
"0.5509655",
"0.5509655",
"0.53215075",
"0.5302834",
"0.52888364",
"0.5211271",
"0.5162743",
"0.5153816",
"0.5103179",
"0.509162",
"0.5089095",
"0.5083639",
"0.504301",
"0.49893412",
"0.49773443",
"0.49760026",
"0.4973572",
"0.4966216",
"0.49432498",
"0.492389",... | 0.7993488 | 0 |
Vectorizes prophet's logistic uncertainty by creating a matrix of future possible trends. | def _logistic_uncertainty(
prophet_model: Prophet,
mat: np.ndarray,
deltas: np.ndarray,
k: float,
m: float,
cap: np.ndarray,
t_time: np.ndarray,
n_length: int,
single_diff: float,
) -> np.ndarray:
def _ffill(arr: np.ndarray) -> np.ndarray:
mask = arr == 0
idx = n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _sample_trend_uncertainty(\n prophet_model: Prophet,\n n_samples: int,\n df: pd.DataFrame,\n iteration: int = 0,\n) -> np.ndarray:\n\n # when there is only historical data\n # given that df is sorted by time, it's last item has the largest date.\n if df[\"t\"].iloc[-1] <= 1:\n # the... | [
"0.62239593",
"0.555138",
"0.55282885",
"0.54154485",
"0.54047865",
"0.5336276",
"0.5314676",
"0.5234991",
"0.520957",
"0.5207892",
"0.51892084",
"0.51597226",
"0.5141467",
"0.5124765",
"0.5116228",
"0.5116116",
"0.50987893",
"0.509756",
"0.5079248",
"0.50788826",
"0.50776434... | 0.6462167 | 0 |
This is the 1st version of the cookies checker In this function, we check the website cookies | def cookies_check_v1():
cookies_check = driver.find_element_by_xpath("//button[@id='didomi-notice-agree-button']")
cookies_check.click() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cookies_check_v2():\n cookies_check = driver.find_element_by_xpath(\"//button[@class='jad_cmp_paywall_button jad_cmp_paywall_button-cookies jad_cmp_paywall_cookies didomi-components-button didomi-button didomi-dismiss-button didomi-components-button--color didomi-button-highlight highlight-button']\")\n ... | [
"0.70112216",
"0.68745637",
"0.6659873",
"0.66192377",
"0.6598411",
"0.6596154",
"0.65820396",
"0.6524812",
"0.64531296",
"0.63488746",
"0.6323791",
"0.63105494",
"0.6305254",
"0.62533003",
"0.6236098",
"0.62262046",
"0.6187676",
"0.61697054",
"0.6099342",
"0.6093783",
"0.606... | 0.7016504 | 0 |
This is the 2nd version of the cookies checker In this function, we check the website cookies | def cookies_check_v2():
cookies_check = driver.find_element_by_xpath("//button[@class='jad_cmp_paywall_button jad_cmp_paywall_button-cookies jad_cmp_paywall_cookies didomi-components-button didomi-button didomi-dismiss-button didomi-components-button--color didomi-button-highlight highlight-button']")
cookies_c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cookies_check_v1():\n cookies_check = driver.find_element_by_xpath(\"//button[@id='didomi-notice-agree-button']\")\n cookies_check.click()",
"def check_cookies(self):\r\n try:\r\n driver = self.driver\r\n my_file = open(\"CookiesFb.pkl\")\r\n return my_file, driv... | [
"0.70106214",
"0.686315",
"0.66480744",
"0.6626341",
"0.652721",
"0.6525927",
"0.6513388",
"0.64766115",
"0.6431573",
"0.6409806",
"0.63803834",
"0.6351012",
"0.63405955",
"0.6314522",
"0.62200975",
"0.620027",
"0.61731374",
"0.61453736",
"0.61277217",
"0.612463",
"0.6109356"... | 0.70474845 | 0 |
This is the 1st version of movie reviews page browser In this function, we navigate to the movie reviews page in order to get the top ten prolifics reviews | def go_to_movie_reviews_page_v1(movie):
#get search bar input and send the movie name as key
search_bar = driver.find_element_by_xpath("//input[@id='header-search-input']")
search_bar.send_keys(movie)
sleep(5)
search_button = driver.find_element_by_xpath("//button[@class='header-search-submit icon i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def go_to_movie_reviews_page_V2(movie):\n #/film/fichefilm-249877/critiques/spectateurs/\n driver.get(search_url_base+movie)\n # driver.get(\"https://www.allocine.fr/rechercher/?q=yourname\")\n sleep(5)\n movie_link = driver.find_element_by_link_text(movie)\n movie_link.click()\n # sleep(5)\n ... | [
"0.73674446",
"0.68199515",
"0.65317106",
"0.6462899",
"0.6443715",
"0.6410947",
"0.64017564",
"0.6366908",
"0.6355977",
"0.6304084",
"0.6208476",
"0.6156166",
"0.6142576",
"0.61343473",
"0.6131709",
"0.6118773",
"0.6112458",
"0.60929984",
"0.6059543",
"0.6041042",
"0.6027874... | 0.70917654 | 1 |
This is the 2nd version of movie reviews page browser In this function, we navigate to the movie reviews page in order to get the top ten prolifics reviews | def go_to_movie_reviews_page_V2(movie):
#/film/fichefilm-249877/critiques/spectateurs/
driver.get(search_url_base+movie)
# driver.get("https://www.allocine.fr/rechercher/?q=yourname")
sleep(5)
movie_link = driver.find_element_by_link_text(movie)
movie_link.click()
# sleep(5)
# close_popu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def go_to_movie_reviews_page_v1(movie):\n #get search bar input and send the movie name as key\n search_bar = driver.find_element_by_xpath(\"//input[@id='header-search-input']\")\n search_bar.send_keys(movie)\n sleep(5)\n search_button = driver.find_element_by_xpath(\"//button[@class='header-search-... | [
"0.7084704",
"0.6852602",
"0.66241145",
"0.6481701",
"0.6451495",
"0.642058",
"0.641994",
"0.6399066",
"0.63749605",
"0.63677484",
"0.6301293",
"0.6188999",
"0.61817837",
"0.61139286",
"0.61109746",
"0.6109608",
"0.6074871",
"0.60566145",
"0.6026517",
"0.60226715",
"0.5995197... | 0.7519103 | 0 |
convert keyboard event into double2 movement code and return if unrecognized key obtained, return None ======KEYBOARD MANUAL====== W/up_arrow = forward S/down_arrow = backward A/left_arrow = turn left D/right_arrow = turn right P = parking V = stop ALL action I = pole up K = pole down ============================ | def db2_movement_convert(evtype, kname):
if evtype == 'down':
if kname == 'w' or kname == 'W' or kname == 'up':
return 'f'
elif kname == 's' or kname == 'S' or kname == 'down':
return 'b'
elif kname == 'a' or kname == 'A' or kname == 'left':
return 'l'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def keyMove(self, event):\n UP = 111\n RIGHT = 114\n DOWN = 116\n LEFT = 113\n dct = {\n RIGHT: 0,\n DOWN: 1,\n LEFT: 2,\n UP: 3\n }[event.keycode]\n self.requestSegByDct(dct)",
"def get_event(self, event):\n\n if... | [
"0.7092827",
"0.6680352",
"0.65994185",
"0.65799326",
"0.6546511",
"0.64121026",
"0.64097077",
"0.63590294",
"0.6296625",
"0.62940115",
"0.62729996",
"0.6228549",
"0.6190524",
"0.6168614",
"0.61459535",
"0.6139373",
"0.6129849",
"0.61266243",
"0.61151725",
"0.61027867",
"0.60... | 0.7269131 | 0 |
Testing M6 remeshing formula in 2D, 2 kernel, simple precision, o2 splitting. | def test_2D_m6_2k():
scal, velo = setup_2D()
advec = Advection(velo, scal, discretization=d2d,
method={TimeIntegrator: RK2,
Interpolation: Linear,
Remesh: L4_2,
Support: 'gpu_2k',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_1_2_2D_cube_splits(self):\n check = [(0, 0), (1, 1), (1, 0), (0, 1), (0.5, 0.5), (0.0, 0.5),\n (0.5, 0.0),\n (0.25, 0.25), (1.0, 0.5), (0.5, 1.0), (0.75, 0.75),\n (0.75, 0.25),\n (0.25, 0.75), (0.5, 0.25), (0.25, 0.5), (0.375, 0.375),\... | [
"0.6104809",
"0.60860753",
"0.60539633",
"0.60334903",
"0.60219675",
"0.5804723",
"0.5646907",
"0.5639585",
"0.56350946",
"0.5630155",
"0.56274045",
"0.56215525",
"0.5603267",
"0.55760777",
"0.55667526",
"0.55426526",
"0.55111784",
"0.5501427",
"0.5493366",
"0.5487018",
"0.54... | 0.6174399 | 0 |
Testing M6 remeshing formula in 2D, 1 kernel, simple precision, o2_FullHalf splitting. | def test_2D_m6_1k_sFH():
scal, velo = setup_2D()
advec = Advection(velo, scal, discretization=d2d,
method={TimeIntegrator: RK2,
Interpolation: Linear,
Remesh: L4_2,
Support: 'gpu_2k',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_2D_m6_2k_sFH():\n scal, velo = setup_2D()\n\n advec = Advection(velo, scal, discretization=d2d,\n method={TimeIntegrator: RK2,\n Interpolation: Linear,\n Remesh: L4_2,\n Support: 'gpu_2k',\n ... | [
"0.6300875",
"0.60879",
"0.60446244",
"0.6017783",
"0.5991836",
"0.5873277",
"0.5863614",
"0.576695",
"0.5719629",
"0.5708563",
"0.56913555",
"0.5682705",
"0.56802297",
"0.563788",
"0.56305665",
"0.55943346",
"0.5587067",
"0.5576163",
"0.5573613",
"0.5570954",
"0.5570553",
... | 0.63488454 | 0 |
Testing M6 remeshing formula in 2D, 2 kernel, simple precision, o2_FullHalf splitting. | def test_2D_m6_2k_sFH():
scal, velo = setup_2D()
advec = Advection(velo, scal, discretization=d2d,
method={TimeIntegrator: RK2,
Interpolation: Linear,
Remesh: L4_2,
Support: 'gpu_2k',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_2D_m6_1k_sFH():\n scal, velo = setup_2D()\n\n advec = Advection(velo, scal, discretization=d2d,\n method={TimeIntegrator: RK2,\n Interpolation: Linear,\n Remesh: L4_2,\n Support: 'gpu_2k',\n ... | [
"0.64069176",
"0.61746925",
"0.615539",
"0.60826963",
"0.5995368",
"0.59154975",
"0.58935124",
"0.5843884",
"0.57958406",
"0.5770665",
"0.5739061",
"0.56951934",
"0.5687086",
"0.5672048",
"0.5666419",
"0.56554663",
"0.56394726",
"0.563752",
"0.5588909",
"0.55872774",
"0.55717... | 0.64465004 | 0 |
Testing M6 remeshing formula in 3D, 1 kernel, simple precision, o2_FullHalf splitting. | def test_3D_m6_1k_sFH():
scal, velo = setup_3D()
advec = Advection(velo, scal, discretization=d3d,
method={TimeIntegrator: RK2,
Interpolation: Linear,
Remesh: L4_2,
Support: 'gpu_1k',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_2_2_3D_cube_splits(self):\n check = [(0, 0, 0), (1, 1, 1), (1, 0, 0), (1, 1, 0), (1, 0, 1),\n (0, 1, 0),\n (0, 1, 1), (0, 0, 1), (0.5, 0.5, 0.5), (0.0, 0.5, 0.5),\n (0.0, 0.0, 0.5), (0.0, 0.5, 0.0), (0.5, 0.0, 0.5),\n (0.5, 0.0, 0.0),\... | [
"0.62784815",
"0.62468976",
"0.61536515",
"0.6124293",
"0.6061565",
"0.5950473",
"0.59444374",
"0.59142166",
"0.59101874",
"0.59000397",
"0.5889153",
"0.57894564",
"0.57214046",
"0.56897634",
"0.5670261",
"0.56692517",
"0.5658906",
"0.56425905",
"0.5625305",
"0.5608881",
"0.5... | 0.6311414 | 0 |
Testing M6 remeshing formula in 3D, 2 kernel, simple precision, o2_FullHalf splitting. | def test_3D_m6_2k_sFH():
scal, velo = setup_3D()
advec = Advection(velo, scal, discretization=d3d,
method={TimeIntegrator: RK2,
Interpolation: Linear,
Remesh: L4_2,
Support: 'gpu_2k',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_2_2_3D_cube_splits(self):\n check = [(0, 0, 0), (1, 1, 1), (1, 0, 0), (1, 1, 0), (1, 0, 1),\n (0, 1, 0),\n (0, 1, 1), (0, 0, 1), (0.5, 0.5, 0.5), (0.0, 0.5, 0.5),\n (0.0, 0.0, 0.5), (0.0, 0.5, 0.0), (0.5, 0.0, 0.5),\n (0.5, 0.0, 0.0),\... | [
"0.62774265",
"0.6248158",
"0.615843",
"0.61519164",
"0.61302435",
"0.5975631",
"0.5969894",
"0.59696215",
"0.59506017",
"0.5889328",
"0.5815332",
"0.58082706",
"0.5774815",
"0.57495856",
"0.57449704",
"0.57132375",
"0.56907326",
"0.5676495",
"0.56660473",
"0.5663885",
"0.565... | 0.6285738 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.