query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Updates a Switch. [Arguments]
def fusion_api_edit_switch(self, body, uri, api=None, headers=None): return self.switch.update(body, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_switch(self, value):\n act = SwitchAction(self, value)\n return act.invoke()", "def switch_changed(self, switch, name):\n section, option = name\n v = (\"1\" if switch.value else \"0\")\n _stash.config.set(section, option, v)\n self.save()", "def command_update...
[ "0.6282466", "0.6170663", "0.6168931", "0.61634696", "0.60626763", "0.5929562", "0.5883229", "0.5791149", "0.578171", "0.5781447", "0.5766732", "0.57095605", "0.57047874", "0.5698562", "0.5698562", "0.5691825", "0.5651865", "0.5648597", "0.5609185", "0.5602009", "0.5587439", ...
0.6216313
1
Refreshes a Switch based on uri provided [Arguments]
def fusion_api_refresh_switch(self, uri, api=None, headers=None): return self.switch.refresh(uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh(self, url, args, cancellationSignal):\n pass", "def fusion_api_edit_switch(self, body, uri, api=None, headers=None):\n return self.switch.update(body, uri, api, headers)", "def fusion_api_get_switch(self, uri=None, param='', api=None, headers=None):\n return self.switch...
[ "0.6420177", "0.5545554", "0.53256416", "0.52885365", "0.519113", "0.5158461", "0.5119947", "0.5117481", "0.5094451", "0.50451607", "0.4990647", "0.49901125", "0.49833083", "0.49725384", "0.49562463", "0.49557462", "0.4953017", "0.4822759", "0.48081386", "0.47947106", "0.4782...
0.62286013
1
Removes a Switch based on name OR uri provided [Arguments]
def fusion_api_remove_switch(self, name=None, uri=None, api=None, headers=None): return self.switch.delete(name, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _remove_from_switch(self, _switch, context):\n _network = context.current['id']\n _vlanid = context.current['provider:segmentation_id']\n\n # BRIDGE_PORT_URL = '{url_prefix}://{switch_name_or_ip}:{port}/networks/{vlan}/{network_id}/{port_id}'\n for _switchport in _switch.get('ports'...
[ "0.64799225", "0.60489744", "0.58654183", "0.5754106", "0.5738819", "0.5728677", "0.5728677", "0.5728677", "0.5728677", "0.5618364", "0.5616719", "0.5604793", "0.5554135", "0.55125505", "0.55086726", "0.5494269", "0.5492298", "0.5490624", "0.5460127", "0.5402718", "0.53422207...
0.74323237
0
Gets a default or paginated collection of Switches. [Arguments]
def fusion_api_get_switch(self, uri=None, param='', api=None, headers=None): return self.switch.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def switches(self) -> List[dict]:\n return self.items_by_domain(\"switch\")", "def get_switches(self) -> tuple:\n return self.switches", "def get_all_switches(name):\n return [False,False,False,False] #TODO Implement", "def list_switches(self):\n return [x for x,y in self.devices.item...
[ "0.66555697", "0.62274754", "0.61897916", "0.6063627", "0.5905055", "0.58005565", "0.5560024", "0.54443353", "0.5429717", "0.5364094", "0.50684166", "0.5063844", "0.498563", "0.4979441", "0.49684566", "0.49450362", "0.49447513", "0.48136824", "0.4667985", "0.4659238", "0.4647...
0.44127655
45
Gets a default or paginated collection of Switches without ports info [Arguments]
def fusion_api_get_switches_without_ports(self, uri=None, api=None, headers=None): return self.switch.get(uri=uri, api=api, headers=headers, param='/withoutPorts')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def switches(self) -> List[dict]:\n return self.items_by_domain(\"switch\")", "def get_all_switches(name):\n return [False,False,False,False] #TODO Implement", "def list_switches(self):\n return [x for x,y in self.devices.items() if y.device_type == \"Switch\"]", "def get_all_switch(self, co...
[ "0.6520135", "0.6164974", "0.6038765", "0.5980532", "0.58495516", "0.5426051", "0.5400386", "0.53886455", "0.5363743", "0.533867", "0.52681065", "0.52616465", "0.52521765", "0.52512336", "0.5225842", "0.5202271", "0.518069", "0.5145818", "0.51111346", "0.51039314", "0.5092655...
0.6331513
1
Gets a default or paginated collection of Switch Types. [Arguments]
def fusion_api_get_switch_types(self, param='', api=None, headers=None): return self.swtypes.get(api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def switches(self) -> List[dict]:\n return self.items_by_domain(\"switch\")", "def list_switches(self):\n return [x for x,y in self.devices.items() if y.device_type == \"Switch\"]", "def get_all_switch(self, conf):\n\t\tpass", "def switches(self):\n return {k:v for k, v in self._data.ite...
[ "0.6429243", "0.62044716", "0.5973956", "0.5961749", "0.58429617", "0.5724761", "0.56757826", "0.54745233", "0.5419325", "0.5411464", "0.53042865", "0.5303776", "0.53003997", "0.52718854", "0.5233143", "0.5197792", "0.5194815", "0.5182634", "0.5126415", "0.50823814", "0.50694...
0.6891026
0
Creates a Task [Arguments]
def fusion_api_create_task(self, body, api=None, headers=None): return self.task.create(body, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_task():", "def create_task(*args, **kwargs):\n loop = asyncio.get_event_loop()\n return wrapped_create_task(loop.create_task, None, args, kwargs)", "def create_task(self, name, value):\n pass", "def task(self, *args, **options):\n\n def inner_create_task_cls(**options):\n\n ...
[ "0.8011033", "0.7843258", "0.7491234", "0.70794857", "0.69540536", "0.6945269", "0.69161403", "0.6859351", "0.6717535", "0.6621745", "0.6604567", "0.65662825", "0.6554302", "0.65538955", "0.65415233", "0.6530246", "0.651675", "0.6513346", "0.650371", "0.65025675", "0.6305668"...
0.6178013
32
Updates an Task [Arguments]
def fusion_api_update_task(self, body, uri, api=None, headers=None): return self.task.update(body, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_task(self, name, fields):\n pass", "def _update(self, task):\n raise NotImplementedError(\"Subclasses should implement this!\")", "def Change(self, key, args):\n\n if not key in self.tasks:\n msg = 'Change task: Invalid task key `{0}` !'.format(key)\n log.e...
[ "0.76636237", "0.69986445", "0.6734116", "0.665341", "0.6600154", "0.6549522", "0.6547815", "0.64374274", "0.6367899", "0.6296061", "0.6277164", "0.626235", "0.62505513", "0.62035644", "0.62005514", "0.6162473", "0.6152132", "0.6140762", "0.6118181", "0.6065055", "0.60466886"...
0.5948605
26
Gets a default or paginated collection of Tasks. [Arguments]
def fusion_api_get_task(self, param='', uri=None, api=None, headers=None): if uri is not None: # update fully qualified URL to relative URI uri = re.sub('^https://\d*.\d*.\d*.\d*', '', uri) return self.task.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tasks(self, *args, **kwargs):\n tasks_endpoint = furl(self.ENDPOINT) / self.id / \"tasks\"\n return self._client.list(Task, endpoint=tasks_endpoint.url, *args, **kwargs)", "def get_tasks(self):\n return self.task_collection", "def get_tasks(**filters):\n return db.task.find(filt...
[ "0.7213014", "0.70587885", "0.7034884", "0.6874994", "0.68596977", "0.6810289", "0.66682065", "0.6592856", "0.657917", "0.6548827", "0.654578", "0.6506617", "0.6473319", "0.64598674", "0.6409869", "0.6409496", "0.6403472", "0.6366313", "0.634452", "0.6337339", "0.6310356", ...
0.0
-1
Wait for a task to complete
def fusion_api_wait_for_task_to_complete(self, uri=None, api=None, headers=None, retries=5, sleep_time=5, param=''): task_attempts = 0 for _ in range(0, retries): time.sleep(sleep_time) task_attempts += 1 response = self.task.get(uri=uri, api=api, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait_completion(self):\r\n self.tasks.join()", "def wait_completion(self):\n self.tasks.join()", "def wait_completion(self):\n self.tasks.join()", "def wait_completion(self):\n self.tasks.join()", "def wait_completion(self):\n self.tasks.join()", "def wait_completio...
[ "0.82319665", "0.8147526", "0.8147526", "0.8147526", "0.8147526", "0.8147526", "0.8147526", "0.8147526", "0.8147526", "0.8147526", "0.7852364", "0.7812979", "0.7726616", "0.74486876", "0.7161544", "0.7150226", "0.7150226", "0.7150226", "0.7150226", "0.7123602", "0.71155137", ...
0.62950313
70
Creates a Uplink Set [Arguments]
def fusion_api_create_uplink_set(self, body, param='', api=None, headers=None): return self.uplink_set.create(body, param, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def up_cmd(ctx):\n pass", "def addOnCreate(call, args=(), kwargs={}, nodeClass='*'):\n pass", "def get_args():\n\n parser = argparse.ArgumentParser(description=\"Tool to create an uplink subnet for FIP access via VSG/VRS-G gateway.\")\n parser.add_argument('-d', '--debug', required=False, help='Enabl...
[ "0.54519755", "0.5435972", "0.5399245", "0.5381882", "0.52568656", "0.5251068", "0.5216274", "0.5202875", "0.5168291", "0.51639724", "0.51597434", "0.5073443", "0.50513744", "0.5046323", "0.50254655", "0.5006739", "0.4990694", "0.4967758", "0.4956707", "0.4934899", "0.4934899...
0.7222193
0
Updates an Uplink Set [Arguments]
def fusion_api_edit_uplink_set(self, body, uri, api=None, headers=None): return self.uplink_set.update(body, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def command_update(arguments):\n global current_name\n tag = arguments[0]\n if (len(arguments) == 2):\n old_target, new_target = (...), arguments[1]\n else:\n old_target, new_target = arguments[1:]\n\n to_replace = network[current_name, tag, old_target]\n if not len(to_replace):\n ...
[ "0.6135603", "0.609327", "0.5954924", "0.5858715", "0.57880354", "0.56711507", "0.563974", "0.563974", "0.563974", "0.563974", "0.563974", "0.563974", "0.56302327", "0.55801797", "0.5516977", "0.5502105", "0.54873466", "0.54873466", "0.54873466", "0.5427483", "0.53419477", ...
0.67684245
0
Deletes an Uplink Set from the appliance based on name OR uri [Arguments]
def fusion_api_delete_uplink_set(self, name=None, uri=None, api=None, headers=None): return self.uplink_set.delete(name, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_delete_network_set(self, name=None, uri=None, api=None, headers=None):\n return self.network_set.delete(name, uri, api, headers)", "def test_remove_share(self):\n self.app.delete(url=\"/config/shares?share=80&destination=gsiftp://nowhere&vo=dteam\", status=400)\n self.app....
[ "0.60390645", "0.5904155", "0.59041137", "0.58668137", "0.5849788", "0.5787649", "0.569228", "0.56363535", "0.56350154", "0.5628608", "0.5624718", "0.5623885", "0.55697083", "0.5543166", "0.55367833", "0.55204713", "0.55089206", "0.5494897", "0.5448532", "0.54449373", "0.5438...
0.8037802
0
Gets a default or paginated collection of Uplink Sets. [Arguments]
def fusion_api_get_uplink_set(self, uri=None, param='', api=None, headers=None): return self.uplink_set.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_create_uplink_set(self, body, param='', api=None, headers=None):\n return self.uplink_set.create(body, param, api, headers)", "def link_to_set(page):\n #s = set()\n links = Measurements.get_all_links(page)\n s = set(links)\n return s", "def getSets():", "...
[ "0.6034614", "0.5520875", "0.5430212", "0.5270419", "0.5221473", "0.519221", "0.5191031", "0.5018383", "0.500693", "0.49028212", "0.48873365", "0.48775196", "0.48375025", "0.47938913", "0.47694138", "0.47593793", "0.475309", "0.47418198", "0.47398478", "0.47387344", "0.473623...
0.67165923
0
Adds a User [Arguments]
def fusion_api_add_user(self, body, api=None, headers=None): return self.user.create(body, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AddUser(parser, help_text):\n parser.add_argument('--user', help=help_text)", "def add(self, user: U) -> None:\n ...", "def add_user(self, attrs):\n pass", "def addOnUserCreate(call, args=(), kwargs={}, nodeClass='*'):\n pass", "def add_user(name: str, last_name: str, username: str) -> ...
[ "0.7790889", "0.75756246", "0.7296528", "0.7267467", "0.7150628", "0.7091388", "0.70566016", "0.70124805", "0.7008827", "0.6976111", "0.6905856", "0.69011384", "0.6829945", "0.6728949", "0.67069227", "0.6658954", "0.6657766", "0.6651403", "0.6642268", "0.66226834", "0.6617833...
0.61678165
79
Updates an User [Arguments]
def fusion_api_edit_user(self, body, uri, api=None, headers=None): return self.user.update(body, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_user():", "def update_user():\n #TODO user update \n pass", "def update(self, user: U) -> None:\n ...", "def update_user(id):\n pass", "def update_user(self, username):\n parser_update.add_argument('email', type=validate_email,\n required=...
[ "0.8097058", "0.80039686", "0.7922248", "0.7566493", "0.7442345", "0.7264984", "0.7099788", "0.6986422", "0.69840693", "0.69803154", "0.6952232", "0.69398516", "0.6865809", "0.6853799", "0.68250316", "0.6780849", "0.67680717", "0.67405397", "0.6722382", "0.6696561", "0.667379...
0.6642952
21
Changes the initial Administrator password [Arguments]
def fusion_api_change_administrator_password(self, host, body, api=None, headers=None): return self.user.change_administrator_password(host, body, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_admin_password(self, instance, new_pass):\n pass", "def set_admin_password(self, instance, new_pass):\n raise NotImplementedError()", "def setpassword(self, pwd):\n pass", "def change_password(change_account):\n change_data(change_account, changed_data='password')", "def ent...
[ "0.7797398", "0.75489056", "0.7274242", "0.6766541", "0.6759145", "0.6675851", "0.6674586", "0.6574223", "0.65674484", "0.6566203", "0.6559955", "0.6536543", "0.6505592", "0.6501263", "0.65009403", "0.6483434", "0.6459152", "0.6399476", "0.6369289", "0.6338821", "0.6307511", ...
0.64521575
17
Removes a User from the appliance based on name OR uri [Arguments]
def fusion_api_remove_user(self, name=None, uri=None, api=None, headers=None): return self.user.delete(name, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wipe_user(user_name):\n user_name = urllib.unquote(user_name) # Username is coming straight from the url bar.\n user = User.query.filter(User.user_name==user_name).first()\n delete_user(user)", "def del_user(self, username):\n pass", "def delete_user():", "def delete_user():\n del glob...
[ "0.7027543", "0.70250374", "0.6999531", "0.68815476", "0.67725843", "0.6740869", "0.67364764", "0.6715946", "0.6699434", "0.6612588", "0.6598224", "0.6559849", "0.65336317", "0.65224516", "0.6503584", "0.6503184", "0.64976114", "0.6484936", "0.6465641", "0.6463593", "0.637226...
0.76143265
0
Gets a default or paginated collection of Users. [Arguments]
def fusion_api_get_user(self, uri=None, param='', api=None, headers=None): return self.user.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self):\n\n offset = 0\n limit = Config.get_page_limit()\n args = request.args\n try:\n offset = request.args['offset']\n except Exception:\n pass\n\n try:\n limit = request.args['limit']\n except Exception:\n pass\...
[ "0.76156676", "0.7431279", "0.7306973", "0.7306973", "0.7306973", "0.7306973", "0.7288005", "0.72703344", "0.71852463", "0.71760064", "0.7103368", "0.70146334", "0.69881964", "0.6980028", "0.6972747", "0.6967067", "0.69606084", "0.6943062", "0.6935658", "0.6906606", "0.684384...
0.0
-1
Gets the appliance's supported API versions [Example] ${resp} = Fusion Api Get Appliance Api Versions | |
def fusion_api_get_appliance_api_versions(self, api=None, headers=None): return self.version.get(api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_versions():\n ret_obj = {'versions': picard_versions(current_app)}\n return make_response(jsonify(ret_obj), 200)", "def api_versions(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"api_versions\")", "def api_versions(self) -> Optional[Sequence[str]]:\n return pulumi.ge...
[ "0.7494345", "0.73989725", "0.73989725", "0.73989725", "0.73989725", "0.73362356", "0.72414464", "0.708449", "0.70133454", "0.6999114", "0.6908404", "0.68778837", "0.6701922", "0.6691587", "0.66610116", "0.65204805", "0.64245963", "0.6255539", "0.62366027", "0.62292904", "0.6...
0.77546126
0
Sets the XAPIVersion header to the specified value for all future requests. If no value is supplied, the value of ${XAPIVersion} is used if it exists else the appliances current version is queried and used [Example] ${resp} = |Fusion Api Set Default Api Version | |
def fusion_api_set_default_api_version(self, api=None): return self.version.set(api=api)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_api_version_header(response):\n response.headers.setdefault('X-API-Version', g.api_version)\n return response", "def SetDefaultVersion(self, request, context):\n context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)", "def getAPIVersion(self):\r\n self._update('getAPIVersion')\r\n ...
[ "0.7020459", "0.5847266", "0.58408767", "0.581011", "0.56751347", "0.55736", "0.5506365", "0.5420947", "0.53353244", "0.5267194", "0.52175796", "0.5127778", "0.51140654", "0.49792168", "0.49792168", "0.49792168", "0.49792168", "0.49792168", "0.49792168", "0.49792168", "0.4979...
0.61179054
1
Send a Discover rest call to the HAL Test Webapp on Fusion
def hal_api_perform_discover(self, fusion_ip, retries=5): url = "https://%s/perm/rest/tbird/pemOperation" % fusion_ip # Payload data = {"PemOperation": "discover", "operationParameters": {}, "SN": BuiltIn().get_variable_value("${ENC_SERIAL_NUM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_discover(self):\n client = Client()\n response = client.get('/discover/authors')\n print 'status code for authors', response.status_code\n self.failUnlessEqual(response.status_code, 200)\n\n response = client.get('/simple_search') \n print 'status code for ...
[ "0.6165252", "0.61452", "0.6050974", "0.5893037", "0.5875728", "0.5712863", "0.5700525", "0.5700222", "0.5694469", "0.5694469", "0.56819326", "0.5649935", "0.563441", "0.5621778", "0.560783", "0.5597023", "0.55802965", "0.5571526", "0.555497", "0.5546627", "0.55412745", "0....
0.59111637
3
Send a POST rest call to the HAL Test Webapp on Fusion
def hal_api_perform_post_action(self, fusion_ip, action=None, parameters=None, retries=5): url = "https://" + fusion_ip + \ "/perm/rest/tbird/pemOperation" # Build Payload and initialize data = {"PemOperation": "performAction", "ActionName": "", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_post_method(self):\n self.getPage('/', method='POST')\n self.assertStatus('200 OK')\n self.assertHeader('Content-Type', 'application/json')", "def test_post(self):\n return self.doRequest(self.url, method=\"POST\", body=self.input)", "def test_post(self):\n client = ...
[ "0.7195425", "0.702145", "0.69609934", "0.69108003", "0.6867677", "0.6861576", "0.67064506", "0.666035", "0.66593635", "0.66006505", "0.65784454", "0.65768015", "0.6563718", "0.6562291", "0.6559118", "0.65375435", "0.65372556", "0.65215045", "0.65138274", "0.6511443", "0.6489...
0.0
-1
Send a GET rest call to the EM RIS interface through the Fusion appliance
def hal_api_get_em_ris(self, fusion_ip, em_ip, resource, option='', retries=5, header=None): # pylint: disable=unused-argument dcs = BuiltIn().get_variable_value("${DCS}") nic = BuiltIn().get_variable_value("${FUSION_NIC}") # Assume Auth Token is passed in header if not...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def do_GET(self):\n self.http_method = 'GET'\n self.response()", "def do_GET(self):\n self.log.debug('do_GET called')\n self.HeadGet('GET')", "def do_GET(self):\r\n self._send_handler_response('GET')", "def _rest_call(self, data, action):\n path = '/wm/device/?ipv4=' + d...
[ "0.6762276", "0.66173995", "0.6569333", "0.642698", "0.6295788", "0.6270782", "0.6196003", "0.596039", "0.5944416", "0.5940878", "0.5936868", "0.59321934", "0.5915703", "0.59051216", "0.58766127", "0.58628124", "0.5860995", "0.5836819", "0.5836726", "0.58301824", "0.58266276"...
0.5909346
13
Send a POST rest call to the EM RIS interface through the Fusion appliance
def hal_api_post_em_ris(self, fusion_ip, em_ip, resource, data=None, header=None, retries=5): # pylint: disable=unused-argument dcs = BuiltIn().get_variable_value("${DCS}") nic = BuiltIn().get_variable_value("${FUSION_NIC}") ssh = paramiko.client.SSHClient() ssh.load_sys...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(self):\n text = 'HELLO from socnet API Server!'\n return push_to_mattermost(text)", "def do_POST(self,):\n self.http_method = 'POST'\n self.response()", "def hal_api_perform_post_action(self, fusion_ip, action=None, parameters=None, retries=5):\n url = \"https://...
[ "0.629005", "0.6278455", "0.6227176", "0.61504656", "0.6135106", "0.6040742", "0.60321116", "0.6011967", "0.5993692", "0.59902436", "0.59897685", "0.59825003", "0.5982412", "0.59688205", "0.59475356", "0.59312737", "0.59105766", "0.5900485", "0.5899863", "0.5885932", "0.58621...
0.6545464
0
Send a Claim call to the Perm Webapp on Fusion
def perm_api_perform_claim(self, fusion_ip, fusion_claim_ip, retries=5): # Build URL url = "https://" + fusion_ip + "/perm/rest/resources/atlas/tbird/fts?ipAddress=" + fusion_claim_ip response = None # Retry in case rest call fails. # Currently calls to the w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def claim(self, ctx, *args):\n if has_post_permission(ctx.guild.id, ctx.channel.id):\n number, name = ch.parse_number_and_name(args)\n out = ch.claim(ctx.user_object, name, number)\n await ctx.send(out)", "def post(self):\n dao = ClaimDao()\n return dao...
[ "0.58439505", "0.55393654", "0.52551943", "0.5190258", "0.5176609", "0.51296705", "0.51259375", "0.51256275", "0.5119167", "0.50780183", "0.5069017", "0.50431377", "0.50258064", "0.49945018", "0.49897614", "0.49878263", "0.49685344", "0.49454448", "0.49396595", "0.49318913", ...
0.64909756
0
Compare two IP addresses. Return True if they are equal. False otherwise
def ip_address_match(self, ip1, ip2): # Build IP objects converted_ip1 = IPy.IP(ip1) converted_ip2 = IPy.IP(ip2) if converted_ip1 == converted_ip2: return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compare_ip(ip1, ip2):\n return cmp(normalize_ip(ip1), normalize_ip(ip2))", "def is_ip_address_equal(ip1, ip2):\n if Convert.is_valid_ipv6_address(ip1) and Convert.is_valid_ipv6_address(ip2):\n if Convert.is_ipv6_equal(ip1, ip2):\n return True\n else:\n re...
[ "0.78469706", "0.7376112", "0.73338", "0.67397344", "0.6569595", "0.647767", "0.641742", "0.6412459", "0.6405167", "0.63363826", "0.6331186", "0.6294796", "0.62394756", "0.6137863", "0.61093587", "0.6021489", "0.5972934", "0.59692293", "0.59515405", "0.59456486", "0.593293", ...
0.8048186
0
Gets a Deployment Manager. [Arguments]
def fusion_api_get_deployment_manager(self, uri=None, param='', api=None, headers=None): return self.dep_mgr.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_manager(api_version=None):\n from manager import get_keystone_manager\n return get_keystone_manager(get_local_endpoint(), get_admin_token(),\n api_version)", "def GetManager(self):\r\n\r\n return self.manager", "def get_manager():\n return __manager__", ...
[ "0.6725439", "0.64918023", "0.62597597", "0.6233775", "0.61700165", "0.6023853", "0.58021766", "0.57533944", "0.57072103", "0.5679756", "0.5606789", "0.5581873", "0.55539227", "0.5527742", "0.55214655", "0.5490343", "0.54241663", "0.53941226", "0.53548354", "0.5341178", "0.53...
0.7509083
0
Creates a Deployment Manager. [Arguments]
def fusion_api_create_deployment_manager(self, body, api=None, headers=None): return self.dep_mgr.create(body=body, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_podmanager(cls, values):\n return cls.dbdriver.create_podmanager(values)", "def create_manager(self, username, tenancy):\n raise NotImplementedError", "def create_manager(app, db):\n manager = Manager(app)\n\n manager.add_command(\"runserver\", Server())\n\n def make_shell_con...
[ "0.6148503", "0.6106779", "0.59578663", "0.59382886", "0.5600401", "0.5570314", "0.5496767", "0.5469237", "0.5436702", "0.54037696", "0.53826296", "0.53341144", "0.5308474", "0.53061575", "0.5288264", "0.5222923", "0.51940596", "0.51562995", "0.5129845", "0.51202434", "0.5110...
0.72286177
0
Updates a Deployment Manager. [Arguments]
def fusion_api_update_deployment_manager(self, body=None, uri=None, api=None, headers=None): return self.dep_mgr.update(body=body, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def manager_update(self, manager, config):\n self.request('/v1.1/managers/configs/%s' % manager, 'POST', body=config)", "def update_podmanager(cls, podmanager_uuid, values):\n return cls.dbdriver.update_podmanager(podmanager_uuid, values)", "def fusion_api_update_hypervisor_manager(self, body=Non...
[ "0.66454226", "0.6606417", "0.5710404", "0.5449812", "0.5437378", "0.5316729", "0.5316729", "0.53141195", "0.52908653", "0.52317894", "0.5228793", "0.520537", "0.52035236", "0.5133824", "0.51167214", "0.5114726", "0.5045032", "0.503883", "0.5027585", "0.49912292", "0.49884212...
0.7084983
0
Deletes a Deployment Manager. [Arguments]
def fusion_api_delete_deployment_manager(self, name=None, uri=None, api=None, headers=None): return self.dep_mgr.delete(name=name, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_podmanager(cls, podmanager_uuid):\n cls.dbdriver.delete_podmanager(podmanager_uuid)", "def manager_remove(self, manager):\n self.request('/v1.1/managers/configs/%s' % manager, 'DELETE')", "def delete_deployment(request, deployment, **_kwargs):\n pass", "def fusion_api_delete_hyper...
[ "0.69262546", "0.66423124", "0.6501913", "0.6232213", "0.5951453", "0.5951453", "0.58923715", "0.5875943", "0.58508486", "0.57864344", "0.5729849", "0.57091665", "0.5703853", "0.56583726", "0.5641767", "0.5613142", "0.5593527", "0.55735373", "0.5569031", "0.55578", "0.555631"...
0.7267033
0
Gets a hypervisor Manager. [Arguments]
def fusion_api_get_hypervisor_manager(self, uri=None, param='', api=None, headers=None): return self.hypervisor_mgr.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetManager(self):\r\n\r\n return self.manager", "def get_manager():\n\n return multiprocessing.Manager()", "def getManager(self):\n return self._manager", "def get_manager(api_version=None):\n from manager import get_keystone_manager\n return get_keystone_manager(get_local_endp...
[ "0.6979449", "0.67611295", "0.66910297", "0.6666388", "0.66302234", "0.65858084", "0.6492841", "0.61952776", "0.61311185", "0.6104131", "0.59339416", "0.58791596", "0.5862384", "0.5799686", "0.57992333", "0.57717127", "0.57673347", "0.5757488", "0.5752421", "0.5737294", "0.57...
0.800843
0
Creates a hypervisor Manager. [Arguments]
def fusion_api_create_hypervisor_manager(self, body, api=None, headers=None): return self.hypervisor_mgr.create(body=body, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_manager(self, username, tenancy):\n raise NotImplementedError", "def create_manager(\n pdb_hierarchy,\n geometry_restraints_manager,\n fmodel,\n wavelength,\n params,\n resolution_factor = 0.25,\n nproc = Auto,\n verbose = False,\n log = None,\n manager_class=None)...
[ "0.6740068", "0.62326854", "0.6093036", "0.60881156", "0.6008856", "0.5954897", "0.59497124", "0.5865377", "0.5721835", "0.56874454", "0.56452775", "0.56088275", "0.56063145", "0.554333", "0.54826665", "0.5461298", "0.5404432", "0.5404395", "0.53953975", "0.5392871", "0.53741...
0.7718598
0
Updates a hypervisor Manager. [Arguments]
def fusion_api_update_hypervisor_manager(self, body=None, uri=None, api=None, headers=None): return self.hypervisor_mgr.update(body=body, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def manager_update(self, manager, config):\n self.request('/v1.1/managers/configs/%s' % manager, 'POST', body=config)", "def fusion_api_create_hypervisor_manager(self, body, api=None, headers=None):\n return self.hypervisor_mgr.create(body=body, api=api, headers=headers)", "async def light_ma...
[ "0.66171026", "0.582097", "0.5712763", "0.56886685", "0.56004804", "0.56004804", "0.55416906", "0.55198437", "0.53832316", "0.5369145", "0.5321215", "0.5302087", "0.52570873", "0.52438563", "0.52284807", "0.52227217", "0.52209795", "0.5214909", "0.5200389", "0.5195968", "0.51...
0.77996296
0
Deletes a hypervisor Manager. [Arguments]
def fusion_api_delete_hypervisor_manager(self, name=None, uri=None, api=None, headers=None): return self.hypervisor_mgr.delete(name=name, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_podmanager(cls, podmanager_uuid):\n cls.dbdriver.delete_podmanager(podmanager_uuid)", "def manager_remove(self, manager):\n self.request('/v1.1/managers/configs/%s' % manager, 'DELETE')", "def delete(self):\n self.manager.delete(self.name)", "def delete(self):\n self.ma...
[ "0.6937779", "0.67486507", "0.63681626", "0.63681626", "0.6347231", "0.6175517", "0.6060668", "0.59882313", "0.59756935", "0.5936945", "0.59265184", "0.58496314", "0.5802527", "0.5783574", "0.57668984", "0.57509613", "0.57486266", "0.57470006", "0.5669473", "0.55834955", "0.5...
0.806357
0
Gets a Hypervisor clusters. [Arguments]
def fusion_api_get_hypervisor_clusters(self, uri=None, param='', api=None, headers=None): return self.hypervisor_clusters.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_clusters(self):\n fields = ['name', ]\n return self.get_data(\"clusters\", fields)", "def list_clusters(self, **kwargs):\n return self._get_names('SCVMHostCluster')", "def get_clusters(self):\r\n\r\n return self.__clusters", "def _get_cluster_list(self):\n return self._...
[ "0.7424538", "0.7212302", "0.71992284", "0.7133369", "0.7071449", "0.70424414", "0.697467", "0.693924", "0.69356865", "0.6861388", "0.68498963", "0.68434745", "0.6812175", "0.6797095", "0.67725927", "0.6652517", "0.66451806", "0.6602558", "0.6587589", "0.6474094", "0.6470819"...
0.80251724
0
Gets a Hypervisor cluster profile. [Arguments]
def fusion_api_get_hypervisor_cluster_profile(self, uri=None, param='', api=None, headers=None): return self.cluster_profile.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cluster(self, profile):\n if self._value.has_option(profile, 'cluster'):\n if self._value.has_option(profile, 'cluster'):\n cluster = self._value.get(profile, 'cluster')\n self.logger.info(\"Connecting to: %s cluster\" % cluster)\n else:\n ...
[ "0.71974623", "0.645041", "0.6425894", "0.6204044", "0.6123612", "0.60758156", "0.6050714", "0.59964824", "0.59913784", "0.59863085", "0.5854982", "0.5842499", "0.58419126", "0.57995874", "0.57753825", "0.5745835", "0.57405496", "0.5696487", "0.56512314", "0.56255156", "0.561...
0.80410475
0
Creates a hypervisor cluster profile. [Arguments]
def fusion_api_create_hypervisor_cluster_profile(self, body, api=None, headers=None): return self.cluster_profile.create(body=body, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_hyperflex_cluster_profile(self):\n pass", "def create_cluster():\n config = get_kube_config()\n command = CLUSTER_CREATE_COMMAND.replace('\\n','').format(cluster_name=config['cluster_name'],\n project_name=config['project_na...
[ "0.7299049", "0.6737419", "0.6406335", "0.63813174", "0.62996036", "0.6183486", "0.61396635", "0.6103186", "0.6031262", "0.6022853", "0.6017192", "0.5997851", "0.5964505", "0.5943418", "0.5941464", "0.5923629", "0.5901515", "0.5809093", "0.57562375", "0.57538897", "0.5749142"...
0.78777266
0
Updates a hypervisor cluster profile. [Arguments]
def fusion_api_update_hypervisor_cluster_profile(self, uri=None, body=None, api=None, headers=None): return self.cluster_profile.update(body=body, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_hyperflex_cluster_profile(self):\n pass", "def update_network_profile(self, profile, body=None):\r\n return self.put(self.network_profile_path % (profile), body=body)", "def update_cluster(self, cluster, params, *args, **kwargs):\n raise NotImplementedError", "def fusion_...
[ "0.69869", "0.65845144", "0.6579093", "0.6464687", "0.6215387", "0.60455185", "0.6026187", "0.60101837", "0.59323263", "0.5911774", "0.5902939", "0.58916545", "0.5850991", "0.57385135", "0.5716251", "0.5682264", "0.567401", "0.56732166", "0.56196904", "0.55932254", "0.5577131...
0.8152496
0
Deletes a hypervisor cluster profile. [Arguments]
def fusion_api_delete_hypervisor_cluster_profile(self, name=None, uri=None, api=None, headers=None): return self.cluster_profile.delete(name, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_hyperflex_cluster_profile(self):\n pass", "def delete_network_profile(arn=None):\n pass", "def delete(profile, name):\n client = boto3client.get(\"iam\", profile)\n params = {}\n params[\"InstanceProfileName\"] = name\n return client.delete_instance_profile(**params)", "...
[ "0.73555297", "0.7025996", "0.6983594", "0.69076455", "0.64352804", "0.643093", "0.6422486", "0.64189655", "0.6414927", "0.63980794", "0.6384168", "0.6366012", "0.62055856", "0.61796516", "0.6123568", "0.6111072", "0.60962975", "0.6093105", "0.6040947", "0.5955083", "0.592536...
0.8240659
0
Creates a virtual switch layout. [Arguments]
def fusion_api_create_virtual_switch_layout(self, body, api=None, headers=None): return self.cluster_profile.create(body=body, api=api, headers=headers, param='/virtualswitch-layout')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_layout( self ):", "def create_logical_router(self, switch):\n if self.nb_api is None:\n self.nb_api = api_nb.NbApi.get_instance(False)\n\n # TODO: lswitch from nb api\n router_ports = []\n dpid = str(switch.dp.id)\n\n for port in switch.ports:\n ...
[ "0.6015329", "0.57742697", "0.56836456", "0.5482166", "0.54532725", "0.5418142", "0.53833425", "0.53744787", "0.5351992", "0.53280634", "0.53216034", "0.53180486", "0.5310005", "0.53014076", "0.52938443", "0.524624", "0.5244449", "0.5193772", "0.51780003", "0.5163845", "0.514...
0.67626137
0
Gets a Hypervisor host profile. [Arguments]
def fusion_api_get_hypervisor_host_profile(self, uri=None, param='', api=None, headers=None): return self.host_profile.get(uri, api, headers, param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_get_hypervisor_cluster_profile(self, uri=None, param='', api=None, headers=None):\n return self.cluster_profile.get(uri=uri, api=api, headers=headers, param=param)", "def fusion_api_get_hypervisor_host(self, uri=None, param='', api=None, headers=None): # pylint: disable=unused-argument...
[ "0.6291275", "0.62387", "0.59896106", "0.5946244", "0.5946244", "0.5942801", "0.5914829", "0.58072954", "0.5784481", "0.5778", "0.57352436", "0.5682452", "0.5610289", "0.5591172", "0.55779195", "0.5567231", "0.5545119", "0.5533411", "0.55181134", "0.5480795", "0.5428293", "...
0.80805653
0
Updates a hypervisor host profile. [Arguments]
def fusion_api_update_hypervisor_host_profile(self, uri=None, body=None, api=None, headers=None): return self.host_profile.update(body, uri, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_update_hypervisor_cluster_profile(self, uri=None, body=None, api=None, headers=None):\n return self.cluster_profile.update(body=body, uri=uri, api=api, headers=headers)", "def update_network_profile(self, profile, body=None):\r\n return self.put(self.network_profile_path % (profi...
[ "0.6738024", "0.63721013", "0.6303127", "0.6171435", "0.6132946", "0.6038028", "0.59906864", "0.5918259", "0.5901422", "0.58302", "0.5811974", "0.5763593", "0.57516897", "0.5698796", "0.56739473", "0.567078", "0.5663646", "0.56575376", "0.56191176", "0.55845803", "0.5581878",...
0.80823314
0
Gets a Hypervisor host profile. [Arguments]
def fusion_api_get_hypervisor_host(self, uri=None, param='', api=None, headers=None): # pylint: disable=unused-argument return self.hypervisor_host.get(uri, api, headers, param='')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_get_hypervisor_host_profile(self, uri=None, param='', api=None, headers=None):\n return self.host_profile.get(uri, api, headers, param)", "def fusion_api_get_hypervisor_cluster_profile(self, uri=None, param='', api=None, headers=None):\n return self.cluster_profile.get(uri=ur...
[ "0.80808896", "0.6291424", "0.5987496", "0.59451413", "0.59451413", "0.5941102", "0.591636", "0.58055425", "0.5782506", "0.57764745", "0.5735029", "0.5680166", "0.5608863", "0.5591165", "0.5578232", "0.55682737", "0.5541697", "0.55317914", "0.55167407", "0.548264", "0.5425572...
0.624134
2
Edit the remote support to initiate remote support registration [Example] ${resp} = Fusion Api Edit Remote Support | | |
def fusion_api_edit_remote_support(self, body, api=None, headers=None): return self.remote_support.update(body, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edit(cm_response, **data):\n return cm_response", "def respond(self, resp):\n self.push(resp + '\\r\\n')\n self.logline('==> %s' % resp)", "def setResponse(self, response):\n if(Debug_Level==2):\n print'response =',response \n #removing the end line and splitti...
[ "0.56080025", "0.54728335", "0.5336991", "0.53315264", "0.52677256", "0.5175285", "0.51725364", "0.51725364", "0.5153644", "0.512804", "0.5109952", "0.50710225", "0.5068613", "0.50233895", "0.50152797", "0.5004218", "0.49749124", "0.49616578", "0.49452564", "0.49318555", "0.4...
0.5913376
0
Get the remote support configuration details [Example] ${resp} = Fusion Api Get Configuration | | |
def fusion_api_get_configuration(self, uri=None, param='', api=None, headers=None): return self.configuration.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config(req):\n #try:\n # user_id = req.user\n #except KeyError as e:\n # msg = req.get_error_msg(e)\n # return send_error_response(msg)\n try:\n config = tools_config_get_config(req)\n except Exception:\n raise http_exc.HTTPClientError()\n else:\n retur...
[ "0.66445255", "0.61464477", "0.614004", "0.6097132", "0.6057521", "0.6036706", "0.6006283", "0.5937391", "0.5936521", "0.590213", "0.5879762", "0.5877101", "0.5839141", "0.58137393", "0.5808278", "0.57864505", "0.5757012", "0.5752552", "0.57210034", "0.5696712", "0.5687088", ...
0.62298936
1
Create OS Deployment Server. [Arguments]
def fusion_api_create_os_deploymentserver(self, body, api=None, headers=None): return self.osds.create(body, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_server(DisableAutomatedBackup=None, Engine=None, EngineModel=None, EngineVersion=None, EngineAttributes=None, BackupRetentionCount=None, ServerName=None, InstanceProfileArn=None, InstanceType=None, KeyPair=None, PreferredMaintenanceWindow=None, PreferredBackupWindow=None, SecurityGroupIds=None, ServiceR...
[ "0.6567448", "0.6424248", "0.64162976", "0.63874674", "0.63142943", "0.6168334", "0.61501795", "0.61205155", "0.6112681", "0.6051007", "0.60456806", "0.6044642", "0.6022895", "0.599268", "0.59312016", "0.58959", "0.582929", "0.58238673", "0.58151454", "0.580947", "0.5804975",...
0.70523727
0
Delete OS Deployment server. [Arguments]
def fusion_api_delete_os_deploymentserver(self, name=None, uri=None, param='', api=None, headers=None): return self.osds.delete(name=name, uri=uri, param=param, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_server(ServerName=None):\n pass", "def delete(args):\n if args.tag is not None:\n tag = str(args.tag)\n interface = DigitalOceanSetup.create_interface()\n # Delete everything matching the tag\n interface.destroy_machines_by_tag(tag)\n elif a...
[ "0.7311343", "0.7191963", "0.698584", "0.65994453", "0.64927745", "0.6424388", "0.6421005", "0.63916403", "0.63363886", "0.62683016", "0.6262936", "0.62379235", "0.6201516", "0.6142421", "0.61166936", "0.61104494", "0.6102672", "0.60981226", "0.59932476", "0.598643", "0.59757...
0.758158
0
Gets value of the OS Deployment Server is available [Arguments]
def fusion_api_get_os_deploymentserver(self, uri=None, param='', api=None, headers=None): return self.osds.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def server(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"server\")", "def get_server():\n pass", "def config_server(self) -> Optional[pulumi.Input['ConfigServerSettingsArgs']]:\n return pulumi.get(self, \"config_server\")", "def get_os_version(self):\n\t\treturn call_sdk_...
[ "0.6122306", "0.6116507", "0.60377234", "0.5933984", "0.59329784", "0.59246665", "0.5922845", "0.5922845", "0.58639693", "0.5771792", "0.57105774", "0.57105774", "0.56729096", "0.56728786", "0.5656897", "0.5648294", "0.5638455", "0.56105363", "0.5601789", "0.55934906", "0.558...
0.659178
0
Gets value of an i3s appliance [Arguments]
def fusion_api_get_i3sappliance_uri(self, uri=None, param='', api=None, headers=None): return self.osds.geti3suri(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_current_ami ( s3_infra_conn, region_name, env_type, app_name ) :\n ami_bucket = get_admin_bucket_name( region_name = region_name )\n return retrieve_s3_contents( s3_conn = s3_infra_conn,\n bucket_name = ami_bucket,\n key_name = get_ami_keypa...
[ "0.6054499", "0.5129115", "0.5069351", "0.50430375", "0.50374556", "0.5037109", "0.49930125", "0.49121296", "0.48898426", "0.48777938", "0.4867673", "0.4867673", "0.4867673", "0.4867673", "0.4867673", "0.4867673", "0.48612306", "0.48609614", "0.48272517", "0.4798483", "0.4786...
0.5175439
1
Gets a primary cluster ipv4 ip [Arguments]
def fusion_api_get_i3scluster_ip(self, uri=None, param='', api=None, headers=None): return self.osds.geti3sclusterip(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_primary_ip(options, index):\n\n second_octet = 160 + index\n return \"192.%s.1.1\" % second_octet", "def get_ip(self):", "def get_ip():\n with hide(\"everything\"):\n ip_addresses = run('hostname -I').split(' ')\n return ip_addresses[0]", "def get_ip(self, node_id):\n return...
[ "0.676709", "0.6641365", "0.66157246", "0.6515281", "0.63866675", "0.6368455", "0.63406724", "0.6326053", "0.63233435", "0.63233435", "0.63039035", "0.62750375", "0.6261349", "0.62158364", "0.6186754", "0.61736035", "0.61672837", "0.6143021", "0.6135342", "0.6132189", "0.6114...
0.0
-1
Gets OS Deployment Plan [Arguments]
def fusion_api_get_os_deploymentplan(self, uri=None, param='', api=None, headers=None): return self.osds.getosdp(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_deployment_parameters(plan_name):\n pass", "def plan_get(request):\n company = auth_api_key(request)\n plan = get_and_check_plan(request, company)\n return plan", "def deploy_plan(plan_name):\n pass", "def plan(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"pl...
[ "0.68726015", "0.63036317", "0.59006155", "0.5568436", "0.5565372", "0.55153424", "0.5511352", "0.5364062", "0.5345589", "0.53239554", "0.5298429", "0.5253463", "0.52343905", "0.5222922", "0.521661", "0.5208022", "0.5189935", "0.5159971", "0.51265657", "0.50976896", "0.507150...
0.6821857
1
Adds Fabric Manager to One View [Arguments]
def fusion_api_create_fabric_manager(self, body, api=None, headers=None): return self.fabricmanager.post(body, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_view( *args, **kwargs ):", "def add_view(self, *args, **kwargs):\n return self._resources_manager.add_view(*args, **kwargs)", "def manager():\n pass", "def add_views(self, *args):\n for view in args:\n self.add_view(view)", "def manage_afterAdd(self, item, container) :\n...
[ "0.59634304", "0.5662595", "0.5455031", "0.5405313", "0.53803706", "0.534478", "0.5262761", "0.5262761", "0.5262761", "0.5087117", "0.5053838", "0.504193", "0.50273764", "0.50249666", "0.5023837", "0.5022318", "0.4999911", "0.49980935", "0.49980935", "0.49811444", "0.4964837"...
0.5848207
1
Gets the Fabric Manager details for the provided name or list of all Fabric Managers if name is not provided [Arguments]
def fusion_api_get_fabric_manager(self, uri=None, param='', api=None, headers=None): return self.fabricmanager.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_get_fabric_manager_tenants(self, uri, name=None, param='', api=None, headers=None):\n param = '/tenants/'\n if name:\n param += '?&filter=\"\\'name\\' == \\'%s\\'\"' % (name)\n return self.fabricmanager.get(uri=uri, api=api, headers=headers, param=para...
[ "0.60854346", "0.59693724", "0.59690547", "0.59468293", "0.56654155", "0.5441895", "0.53470236", "0.5284382", "0.52781856", "0.5217851", "0.520762", "0.51865655", "0.5180018", "0.51691216", "0.514083", "0.51072943", "0.50171417", "0.49826366", "0.49755776", "0.49681163", "0.4...
0.63042766
0
Deletes the Fabric Manager [Arguments]
def fusion_api_delete_fabric_manager(self, name, uri=None, api=None, headers=None): return self.fabricmanager.delete(name=name, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rm(args):\n args.delete = True\n return remove(args)", "def delete(self):\n self.manager.delete(self.name)", "def delete(self):\n self.manager.delete(self.name)", "def delete(self):\n os.system(\"rm \"+self._name)", "def delete(args, config):\n print('Deletes a selected HP...
[ "0.6673103", "0.6598021", "0.6598021", "0.65250075", "0.6506779", "0.64955616", "0.64426833", "0.6403957", "0.63426346", "0.6341505", "0.6298142", "0.6287084", "0.62784547", "0.6251517", "0.6181623", "0.6166767", "0.61451185", "0.6132013", "0.6025371", "0.6014678", "0.6004683...
0.72733957
0
Edits Fabric Manager [Arguments]
def fusion_api_edit_fabric_manager(self, body, uri, api=None, headers=None): return self.fabricmanager.put(body=body, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edit():", "def edit(self, **kwargs):\n ...", "async def edit(self, *, name, roles: Optional[Any] = ..., reason: Optional[Any] = ...):\n ...", "def edit(argv):\n output = lib.output.CLIoutput(\"vadapter\")\n valid_list = ['assignment_type','component_mask' ,'vfabric_id', 'init_type', '...
[ "0.5791912", "0.5778062", "0.55881244", "0.5558738", "0.5506726", "0.5498924", "0.5436379", "0.54148054", "0.53646386", "0.53453696", "0.53438175", "0.53438175", "0.5334068", "0.53141785", "0.5312301", "0.5311755", "0.52907723", "0.526777", "0.5249392", "0.52193946", "0.52171...
0.6381094
0
Gets Tenants for the provided Fabric Manager [Arguments]
def fusion_api_get_fabric_manager_tenants(self, uri, name=None, param='', api=None, headers=None): param = '/tenants/' if name: param += '?&filter="\'name\' == \'%s\'"' % (name) return self.fabricmanager.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tenants():\n # these are the tenant_id strings configured for the service -\n tenants_strings = conf.tenants\n result = []\n # the tenants service is a special case, as it must be a) configured to serve all tenants and b) actually maintains\n # the list of tenants in its own DB. in this case...
[ "0.5958651", "0.584731", "0.57416695", "0.5416656", "0.5394366", "0.5332738", "0.52771735", "0.5249437", "0.5218875", "0.51591974", "0.5118933", "0.5095858", "0.5093036", "0.5080304", "0.50682324", "0.4968553", "0.4935974", "0.4935974", "0.49077785", "0.4867381", "0.48321927"...
0.70706767
0
Initiates Fabric Manager Refresh using Snapshot API [Arguments]
def fusion_api_fabric_manager_refresh(self, body, uri, api=None, headers=None): param = '/snapshot/' return self.fabricmanager.put(body=body, uri=uri, param=param, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Refresh(self, *args, **kwargs):\n # type: (*Any, **Any) -> None\n payload = {}\n for i in range(len(args)):\n payload[\"Arg%s\" % (i + 1)] = args[i]\n for item in kwargs.items():\n payload[item[0]] = item[1]\n return self._execute(\"refresh\", payload=pa...
[ "0.58108914", "0.56057084", "0.55814093", "0.55398834", "0.5529131", "0.5527788", "0.55108947", "0.53939646", "0.5334728", "0.530829", "0.529463", "0.52867246", "0.52867246", "0.52739894", "0.523049", "0.5227205", "0.5202879", "0.5193885", "0.51764804", "0.5140236", "0.513587...
0.6941463
0
Gets Reports for Fabric Manager [Arguments] Uri of the existing Fabric Manager or Tenant
def fusion_api_get_fabric_manager_report(self, uri, api=None, headers=None): param = '/report/' return self.fabricmanager.get(uri=uri, api=api, headers=headers, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_get_fabric_manager(self, uri=None, param='', api=None, headers=None):\n return self.fabricmanager.get(uri=uri, api=api, headers=headers, param=param)", "def fusion_api_get_fabric_manager_tenants(self, uri, name=None, param='', api=None, headers=None):\n param = '/tenants/'\n ...
[ "0.56766737", "0.54050255", "0.5230322", "0.5214337", "0.5190606", "0.5153666", "0.5005133", "0.4954604", "0.49541247", "0.4939854", "0.49134123", "0.49134123", "0.48381823", "0.481615", "0.48036653", "0.47944608", "0.47694454", "0.47487447", "0.4656791", "0.4603878", "0.4581...
0.70640254
0
Remediates Fabric Manager inconsistencies(Automatic only) for the provided resource. [Arguments]
def fusion_api_fabric_manager_remediate(self, body, uri, api=None, headers=None): # pylint: disable=unused-argument param = '/compliance/' return self.fabricmanager.put(body=body, uri=uri, api=None, headers=None, param=param)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_02_self_downgrade_resource(self):\n holes = self.holes\n cat = self.cat\n dog = self.dog\n cat.uaccess.share_resource_with_user(holes, dog, PrivilegeCodes.CHANGE)\n self.assertTrue(dog in holes.raccess.edit_users)\n self.assertTrue(dog in holes.raccess.view_users)...
[ "0.531209", "0.5108747", "0.5033532", "0.5032901", "0.50251716", "0.4990143", "0.49796566", "0.49243283", "0.49155882", "0.48749104", "0.48641658", "0.48292047", "0.4809559", "0.47962046", "0.47859555", "0.47744963", "0.47544578", "0.4742638", "0.47292352", "0.47280586", "0.4...
0.4680398
24
Adds an rackmaager to the appliance [Arguments]
def fusion_api_add_rack_manager(self, body, api=None, headers=None): return self.rackmanager.post(body, api, headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_add_rack(self, body, api=None, headers=None):\n return self.rack.create(body, api, headers)", "def add(self, arguments):\n url = arguments['<location>']\n if url:\n name = arguments['<name>']\n else:\n url = arguments['<name>']\n nam...
[ "0.5335254", "0.52000356", "0.519472", "0.5162352", "0.5091715", "0.50824", "0.50122625", "0.5003473", "0.49970138", "0.49732828", "0.49596536", "0.4910242", "0.48956198", "0.4864047", "0.48495474", "0.48495474", "0.48495474", "0.48479155", "0.48257363", "0.48086825", "0.4787...
0.55991477
0
Gets a Rack Manager [Arguments]
def fusion_api_get_rack_manager(self, uri=None, api=None, headers=None): return self.rackmanager.get(uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cli_arguments(self):\n pass", "def get_options():\n parser = argparse.ArgumentParser(\n description=\"view the aria2 queue on localhost:6800\",\n )\n # parser.add_argument() calls here\n options = parser.parse_args()\n # extra processing of options here\n retu...
[ "0.55990356", "0.5466417", "0.54518133", "0.54118025", "0.5386328", "0.53435844", "0.5313144", "0.52774763", "0.5259597", "0.52551603", "0.5208383", "0.5194557", "0.51910126", "0.5186137", "0.5174422", "0.5167607", "0.5161358", "0.51293916", "0.5108545", "0.5103814", "0.51020...
0.575111
0
Issues a PATCH request. See RESTAPI docs for valid request bodies [Arguments]
def fusion_api_patch_rack_manager(self, body, uri, api=None, headers=None): return self.rackmanager.patch(body=body, uri=uri, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch(self, *args, **kwargs):\n self.request(\"patch\", *args, **kwargs)", "def patch(self, url, body=None, headers=None):\n return self._request('PATCH', url, body, headers)", "def patch(self, url_or_path, *args, **kwargs):\n return self.request.patch(url_or_path, *args, **kwargs).jso...
[ "0.7937596", "0.7447879", "0.7425883", "0.7416192", "0.7356485", "0.72845966", "0.7232765", "0.71977687", "0.7190924", "0.71888465", "0.7187323", "0.7187323", "0.7187323", "0.7187323", "0.7187323", "0.7187323", "0.7187323", "0.7187323", "0.7187323", "0.7187323", "0.7187323", ...
0.0
-1
Deletes Rack Manager from the appliance based on uri [Arguments]
def fusion_api_delete_rack_manager(self, uri, name=None, param='', api=None, headers=None): return self.rackmanager.delete(uri=uri, name=name, param=param, api=api, headers=headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fusion_api_remove_rack(self, name=None, uri=None, api=None, headers=None):\n return self.rack.delete(name, uri, api, headers)", "def fusion_api_remove_san_manager(self, name=None, uri=None, api=None, headers=None):\n return self.dm.delete(name, uri, api, headers)", "def fusion_api_del...
[ "0.68630743", "0.67151904", "0.6714827", "0.6587817", "0.6407161", "0.63303494", "0.615097", "0.6058198", "0.6026346", "0.59584045", "0.5894118", "0.58919597", "0.5862057", "0.583348", "0.5830776", "0.57852274", "0.575848", "0.5754835", "0.57540447", "0.5753239", "0.574271", ...
0.79687536
0
Initialize particles to be consistent with a uniform prior. Each particle is a tuple of ghost positions. Use self.numParticles for
def initializeParticles(self): import itertools import random #create a list of possible ghost permutations, where each of three ghosts can be on any of the legal positions in the boards. permutations = list(itertools.product(self.legalIntentions, repeat=self.numAgents)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_particles(self):\n \n # Each particle is a dimension-K vector. We generate each particle \n # uniformly at random from the space [0,1]^K. \n self.Particles = np.random.uniform(0, 1, (self.Npar, self.K))\n #print(\"Particles: \", self.Particles) \n return None", ...
[ "0.73676294", "0.7053749", "0.68827", "0.6763224", "0.671548", "0.6645336", "0.6637801", "0.66186696", "0.6572894", "0.6544678", "0.64980954", "0.6426581", "0.6356929", "0.6327402", "0.63196164", "0.62938076", "0.6253168", "0.62287265", "0.6143017", "0.6065585", "0.60641867",...
0.7536992
0
Resamples the set of particles using the likelihood of the noisy observations.
def observe(self, gameState, meanfunc): if len(self.beliefs.keys()) == 1: self.initializeParticles() othercars = gameState.getOtherCars() # history = othercars[index].history tempCounter = util.Counter() #weight every particle for intentions in self.partic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resample(self):\n self.particles = ParticleFilter.weighted_values(self.particles,\n [p.weight for p in self.particles],\n len(self.particles))\n for p in self.particles:\n p.we...
[ "0.7578449", "0.6862948", "0.6840294", "0.6798337", "0.67019075", "0.65841156", "0.64345276", "0.6409418", "0.6307416", "0.63003314", "0.6028069", "0.60231316", "0.60106105", "0.59658694", "0.5932079", "0.5880796", "0.5876781", "0.58584905", "0.58534026", "0.5830622", "0.5805...
0.0
-1
Get the value of the ADDONSPATH variable.
def get_cached_addon_path(): settingspath = get_cached_setting_path() if not settingspath: logger.error("#SETTINGSPATH# resolution required but was not found") return return os.path.join(settingspath, "Addons") + "\\"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_abs_path(self, value):\n return os.path.abspath(os.path.expanduser(os.path.expandvars(value)))", "def location(self):\n\n p = os.path.abspath(__file__)\n pathSP = os.path.split(p)\n return pathSP", "def _GetSystemPath():\n return encoding_util.GetEncodedValue(os.environ, \"PATH...
[ "0.6033623", "0.5921134", "0.58051646", "0.5630593", "0.5581429", "0.5525819", "0.55247533", "0.5490318", "0.5476768", "0.54625976", "0.54127926", "0.53831667", "0.5338885", "0.5338132", "0.53280693", "0.53262985", "0.52948344", "0.5281537", "0.52779865", "0.52707076", "0.526...
0.5957791
1
Get the VOLTHA PORT object for this port
def get_port(self): if self._port is None: self._port = Port(port_no=self._port_no, label=self._label, type=Port.PON_OLT, admin_state=AdminState.ENABLED, oper_status=OperStatus.ACT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_port(self):\n return self.__port", "def getPort(self):\n return self._port", "def get_port(self):\n return self.__port", "def getPort(self):\n return self._port", "def get_port(self):\n return self.port", "def get_port(self):\n \n return self._por...
[ "0.6576839", "0.6366624", "0.63357687", "0.628415", "0.62502146", "0.62232053", "0.59385276", "0.5834423", "0.58323324", "0.5817069", "0.5712418", "0.5707369", "0.56816727", "0.564813", "0.56160957", "0.5613599", "0.55900675", "0.55900675", "0.5557575", "0.55402493", "0.55366...
0.69255394
0
Maximum deployment range (in meters)
def deployment_range(self): return self._deployment_range
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_range(self):\n return self._max_range", "def deployment_range(self):\n return self._packet.get('deployment-range', 25000)", "def port_range_max(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"port_range_max\")", "def _maximum(self) -> float:\n return self._con...
[ "0.7241852", "0.6838855", "0.68250173", "0.6728705", "0.66163015", "0.66163015", "0.6560473", "0.6504628", "0.64851713", "0.646604", "0.64363337", "0.64268076", "0.6366648", "0.63537395", "0.6349277", "0.62995404", "0.62718433", "0.62551", "0.62526906", "0.624499", "0.6244911...
0.6509842
7
Maximum deployment range (in meters)
def deployment_range(self, value): if not 0 <= value <= PonPort.MAX_DEPLOYMENT_RANGE: raise ValueError('Deployment range should be 0..{} meters'. format(PonPort.MAX_DEPLOYMENT_RANGE)) if self._deployment_range != value: self._deployment_range = value ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_range(self):\n return self._max_range", "def deployment_range(self):\n return self._packet.get('deployment-range', 25000)", "def port_range_max(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"port_range_max\")", "def _maximum(self) -> float:\n return self._con...
[ "0.7240557", "0.684023", "0.68245083", "0.67264986", "0.6615649", "0.6615649", "0.655932", "0.6511038", "0.65031415", "0.6484346", "0.64648944", "0.6435333", "0.6426856", "0.6355536", "0.6346728", "0.6301131", "0.6269651", "0.62554026", "0.6254242", "0.62475336", "0.6244085",...
0.6369216
13
Get the VOLTHA logical port for this port. For PON ports, a logical port is not currently created, so always return None
def get_logical_port(self): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_port(self):\n if self._port is None:\n self._port = Port(port_no=self._port_no,\n label=self._label,\n type=Port.PON_OLT,\n admin_state=AdminState.ENABLED,\n oper_status=Ope...
[ "0.69949347", "0.6425281", "0.6324397", "0.6155099", "0.61252946", "0.608648", "0.6081095", "0.60716444", "0.6043632", "0.60040736", "0.5972916", "0.5964086", "0.5931539", "0.59029865", "0.59029865", "0.58882225", "0.58602065", "0.5801619", "0.57786167", "0.5769991", "0.57699...
0.73856133
0
Start/enable this PON and start ONU discover
def start(self): if self._state == PonPort.State.RUNNING: return succeed('Running') self.log.info('start') self._cancel_deferred() self._state = PonPort.State.INITIAL self._oper_status = OperStatus.ACTIVATING self._enabled = True # Do the rest of th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def turn_on(self, **kwargs):\n if not self.is_on:\n _LOGGER.debug(\"Sending START command to: %s\", self._name)\n self._api.control('START')\n self._mower_status = STATUS_EXECUTING_START\n self.schedule_update_ha_state()", "def discover(self):\n self.ola_thre...
[ "0.6436649", "0.62929535", "0.6235116", "0.6157351", "0.6152264", "0.6091492", "0.604593", "0.6035692", "0.6026379", "0.6003635", "0.5969122", "0.59499156", "0.59331805", "0.59136343", "0.5892307", "0.58815545", "0.5853527", "0.58459485", "0.58366793", "0.58250326", "0.582430...
0.59338707
12
Do all startup offline since REST may fail
def _finish_startup(self): if self._state != PonPort.State.INITIAL: returnValue('Done') self.log.debug('final-startup') try: self._deferred = self._get_pon_config() results = yield self._deferred except Exception as e: self.log.exception...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _startup():\n from octoprint_dashboard.model import User, Config\n if Config.query.scalar() is None:\n print(\"No config, add config via command 'python -m flask config'\")\n shutdown_server()\n if User.query.filter_by(superadmin=True).count() == 0:\n print(\"No superadmin, add su...
[ "0.606752", "0.60158694", "0.60118955", "0.60118955", "0.5940273", "0.5921473", "0.5856143", "0.58185446", "0.5739744", "0.5731567", "0.5704968", "0.559677", "0.55901814", "0.55886877", "0.55782545", "0.55745685", "0.5546327", "0.55310905", "0.5507531", "0.55060315", "0.55005...
0.0
-1
Set the PON Port to a known good state on initial port startup. Actual PON 'Start' is done elsewhere
def reset(self): if self._state != PonPort.State.INITIAL: self.log.error('reset-ignored', state=self._state) returnValue('Ignored') initial_port_state = AdminState.ENABLED if self.olt.autoactivate else AdminState.DISABLED self.log.info('reset', initial_state=initial_port...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dummy_set_comm_port(port):\n pass", "def set_working_state(self):\n self.state = 0\n self.port = None", "def test_startedOnce(self):\n port = self.port(store=self.store, portNumber=self.lowPortNumber, factory=self.factory)\n port._listen = self.listen\n port.privil...
[ "0.6601327", "0.6589182", "0.6515379", "0.6474944", "0.6314016", "0.6276096", "0.6271981", "0.6253798", "0.61761045", "0.6171055", "0.6082276", "0.6035634", "0.6031597", "0.6029879", "0.60172546", "0.5989861", "0.5933295", "0.59226084", "0.5880648", "0.5876261", "0.58369833",...
0.57729936
25
Parent device is being deleted. Do not change any config but stop all polling
def delete(self): self.log.info('Deleting') self._state = PonPort.State.DELETING self._cancel_deferred()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_device(self):\n # PROTECTED REGION ID(SdpMasterLeafNode.delete_device) ENABLED START #\n # PROTECTED REGION END # // SdpMasterLeafNode.delete_device", "def delete_device(self):\n # PROTECTED REGION ID(AsyncTabata.delete_device) ENABLED START #\n # PROTECTED REGION END #...
[ "0.66895455", "0.6487008", "0.64431536", "0.6428766", "0.6428766", "0.6404535", "0.62856865", "0.6260708", "0.6171797", "0.60268766", "0.59398943", "0.593268", "0.5892114", "0.5876798", "0.5840125", "0.5776807", "0.5762006", "0.57404035", "0.5723884", "0.5723558", "0.56577355...
0.5392219
41
Get all GEM Port IDs used on a given PON
def gem_ids(self, vid, exception_gems, multicast_gems): gem_ids = {} if multicast_gems: # Multicast GEMs belong to the PON, but we may need to register them on # all ONUs. Rework when BBF MCAST Gems are supported for vlan, gem_port in self._mcast_gem_ports.iteritems(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all_port(self, conf, dpid):\n\t\tpass", "def get_open_port_numbers(host):\n ports_per_host =[]\n for h in host:\n ports = h.findAll(\"port\")\n for port in ports:\n port_id = check_if_unicode(port[\"portid\"])\n ports_per_host.append(port_id)\n return port...
[ "0.6755023", "0.66243875", "0.64086825", "0.62845874", "0.6248362", "0.62020355", "0.61398154", "0.6062057", "0.604446", "0.60085815", "0.59973913", "0.5984092", "0.5959045", "0.58891875", "0.5880742", "0.58673495", "0.586281", "0.58524436", "0.58212495", "0.5807238", "0.5792...
0.0
-1
This method is called after the REST POST to request ONU discovery is completed. The results (body) of the post is always empty / 204 NO CONTENT
def _onu_discovery_init_complete(self, _): delay = self._no_onu_discover_tick if len(self._onus) == 0 else self._discovery_tick delay += random.uniform(-delay / 10, delay / 10) self._discovery_deferred = reactor.callLater(delay, self._discover_onus)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(self):\n\n json_data = json.loads(self.request.body)\n response = PluginHelper.request_post(json_body=json_data)\n if (\n response.status_code == 200\n and response.json()[\"status\"] == \"ok\"\n ):\n result_json = {\n \"results\"...
[ "0.58197933", "0.55222416", "0.53681517", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.53295606", "0.5324583", "0.5316479", "0.5294385", ...
0.53206235
18
Process PON status poll request
def process_status_poll(self, status): self.log.debug('process-status-poll', status=status) if self._admin_state != AdminState.ENABLED: return # Get new/missing from the discovered ONU leaf. Stale ONUs from previous # configs are now cleaned up during h/w re-sync/reflow. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def poll(self, poll_input):", "def _process_pool_status_response(self, buf, length):\n\t\tself.pcpResInfo.pcp_add_json_result('command_status', 'success')\n\t\tvalue, index = self._getNextString(buf, 0)\n\t\tif value == 'ArraySize':\n\t\t\tindex += 1\n\t\t\tci_size = buf[index:]\n\t\t\tci_size = self.bytes_to_in...
[ "0.66186523", "0.6358219", "0.5927366", "0.58907", "0.58850914", "0.5843748", "0.5833384", "0.5741044", "0.5719501", "0.5672158", "0.56507057", "0.56396514", "0.5633935", "0.5629005", "0.5579656", "0.5574", "0.5571632", "0.5566738", "0.5507098", "0.5507098", "0.5507098", "0...
0.68012106
0
Process ONU status for this PON
def _update_onu_status(self, onus): for onu_id, onu_status in onus.iteritems(): if onu_id in self._onu_by_id: self._onu_by_id[onu_id].rssi = onu_status.rssi self._onu_by_id[onu_id].equalization_delay = onu_status.equalization_delay self._onu_by_id[onu_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_status_poll(self, status):\n self.log.debug('process-status-poll', status=status)\n\n if self._admin_state != AdminState.ENABLED:\n return\n\n # Get new/missing from the discovered ONU leaf. Stale ONUs from previous\n # configs are now cleaned up during h/w re-sy...
[ "0.655683", "0.6364406", "0.5901802", "0.5859409", "0.573432", "0.5732758", "0.57218087", "0.567886", "0.5675471", "0.56213325", "0.55984366", "0.55904573", "0.5551701", "0.5540505", "0.55091304", "0.54808426", "0.547645", "0.54632586", "0.54630697", "0.5462684", "0.54545075"...
0.70205426
0
Walk current LOS and set/clear LOS as appropriate
def _process_los_alarms(self, ont_los): cleared_alarms = self._active_los_alarms - ont_los new_alarms = ont_los - self._active_los_alarms def los_alarm(status, _id): alarm = 'LOS' alarm_data = { 'ts': arrow.utcnow().timestamp, 'description...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_rollout(self):\n self._path_length = 0\n self._prev_obs = self.env.reset()", "def reset_context():\n global root_dir\n global wells_list\n global tops_list\n\n del root_dir, wells_list, tops_list\n root_dir = WellsDir(None, 'root')\n wells_list = list()\n tops_list = ...
[ "0.5628606", "0.54195035", "0.53496313", "0.5299118", "0.52863634", "0.52720195", "0.5239692", "0.5183885", "0.5114963", "0.50833416", "0.5076959", "0.50679976", "0.5066194", "0.50555396", "0.504516", "0.5002649", "0.499138", "0.4989557", "0.49638978", "0.49396208", "0.489839...
0.0
-1
Look for new ONUs
def _process_status_onu_discovered_list(self, discovered_onus): self.log.debug('discovered-ONUs', list=discovered_onus) # Only request discovery if activation is auto-discovery or auto-activate continue_discovery = ['autodiscovery', 'autoactivate'] if self._activation_method not in con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_onu_status(self, onus):\n for onu_id, onu_status in onus.iteritems():\n if onu_id in self._onu_by_id:\n self._onu_by_id[onu_id].rssi = onu_status.rssi\n self._onu_by_id[onu_id].equalization_delay = onu_status.equalization_delay\n self._onu_...
[ "0.54137886", "0.53629065", "0.52104586", "0.5158937", "0.5099225", "0.50604165", "0.5048969", "0.5013519", "0.4945172", "0.48758712", "0.48715416", "0.48257077", "0.48216808", "0.48082477", "0.48046583", "0.47961265", "0.4791001", "0.47633", "0.47597477", "0.47561663", "0.47...
0.510958
4
Parse through available xPON information for ONU configuration settings
def _get_onu_info(self, serial_number): try: from flow.demo_data import get_tconts, get_gem_ports, get_onu_id if self.activation_method == "autoactivate": onu_id = get_onu_id(serial_number) if onu_id is None: onu_id = self....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_knx(self, config):\n\t\tif \"knx\" in config:\n\t\t\tself._knx = config[\"knx\"]\n\t\tfor item in self._knx[\"sensors\"]:\n\t\t\tif not \"address\" in item:\n\t\t\t\traise ValueError(\"Missing address for KNX sensor\")\n\t\tfor item in self._knx[\"switches\"]:\n\t\t\tif not \"address\" in item:\n\t\t\t\...
[ "0.5860691", "0.53012323", "0.52924263", "0.5150295", "0.50907314", "0.49680468", "0.49017316", "0.4875954", "0.48654738", "0.48572677", "0.48541096", "0.48308924", "0.48128533", "0.4808714", "0.47831556", "0.47818446", "0.4748246", "0.47355053", "0.47156107", "0.47149676", "...
0.56708354
1
Called when a new ONU is discovered and VOLTHA device adapter needs to be informed
def activate_onu(self, onu): if self.olt.autoactivate: self.log.info('activate-onu', onu=onu) olt = self.olt adapter = self.adapter_agent channel_id = onu.onu_vid proxy = onu.proxy_address # NOTE: The following method will be deprecated....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_discovered():\n event.set()", "def on_connect(client, userdata, flags, rc):\n\t# subscribe to the LEDs topic when connected\n\tclient.subscribe(\"SNHU/IT697/leds\")", "def test_device_on(self):\n self.ms.add_response({'\\x14081031031E226410\\x0D': 'PA\\x0D'})\n # Network / Devic...
[ "0.65213245", "0.6183199", "0.6078185", "0.6038242", "0.6008273", "0.5960707", "0.59480184", "0.5902333", "0.58434427", "0.5833241", "0.5729351", "0.5601769", "0.55898815", "0.55544865", "0.55472565", "0.55431855", "0.55277807", "0.55186784", "0.5476209", "0.5475365", "0.5475...
0.6676301
0
Add any new Multicast GEM Ports to the PON
def add_mcast_gem_port(self, mcast_gem, vlan): if vlan in self._mcast_gem_ports: return assert len(self._mcast_gem_ports) == 0, 'Only 1 MCAST GEMPort until BBF Support' assert 1 <= vlan <= 4095, 'Invalid Multicast VLAN ID' assert len(self.olt.multicast_vlans) == 1, 'Only sup...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addMulticast(command, controlList):\n _addMulticast(command, controlList)", "def add_out_port(self, m: int, content: str, **opts) -> None:", "def add_in_port(self, m: int, content: str, **opts) -> None:", "def bind(self):\n self.udpsock = socket.socket(\n socket.AF_INET,\n s...
[ "0.6131278", "0.6098075", "0.6030798", "0.6017879", "0.59524167", "0.5872222", "0.5801942", "0.5765269", "0.56313396", "0.55752605", "0.5575107", "0.554513", "0.55404675", "0.551846", "0.5503523", "0.54727435", "0.54429936", "0.5422253", "0.539305", "0.5391756", "0.53804827",...
0.59668195
4
Delete/enable/disable a specified channel partition on this PON. When creating a new Channel Partition, create it disabled, then define any associated Channel Pairs. Then enable the Channel Partition.
def channel_partition(self, name, partition=0, xpon_system=0, operation=None): if operation.lower() not in ['delete', 'enable', 'disable']: raise ValueError('Unsupported operation: {}'.format(operation)) try: xml = 'interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def channel_pair(self, name, partition, operation=None, **kwargs):\n if operation.lower() not in ['delete', 'enable', 'disable']:\n raise ValueError('Unsupported operation: {}'.format(operation))\n\n try:\n xml = 'interfaces xmlns=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\"'...
[ "0.5930615", "0.5629349", "0.5421836", "0.52993655", "0.52665484", "0.5152782", "0.5028327", "0.49557593", "0.48950937", "0.4868015", "0.4856679", "0.47942936", "0.47765732", "0.47706714", "0.47600013", "0.4758206", "0.47271204", "0.47198334", "0.4715526", "0.47069684", "0.46...
0.7122026
0
Create/delete a channel pair on a specific channel_partition for a PON
def channel_pair(self, name, partition, operation=None, **kwargs): if operation.lower() not in ['delete', 'enable', 'disable']: raise ValueError('Unsupported operation: {}'.format(operation)) try: xml = 'interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def channel_partition(self, name, partition=0, xpon_system=0, operation=None):\n if operation.lower() not in ['delete', 'enable', 'disable']:\n raise ValueError('Unsupported operation: {}'.format(operation))\n\n try:\n xml = 'interfaces xmlns=\"urn:ietf:params:xml:ns:yang:ietf-i...
[ "0.61758345", "0.53666586", "0.5140615", "0.4981957", "0.49264306", "0.4917317", "0.4888045", "0.48726103", "0.48679605", "0.48194185", "0.48172766", "0.47911158", "0.47854713", "0.47262764", "0.4725585", "0.47093052", "0.4699324", "0.46934438", "0.4691812", "0.4669043", "0.4...
0.6580948
0
Evaluates calls from call_queue and places the results in result_queue. This worker is run in a separate process.
def _process_worker(call_queue, result_queue): while True: call_item = call_queue.get(block=True) if call_item is None: # Wake up queue management thread result_queue.put(os.getpid()) return try: r = call_item.fn(*call_item.args, **call_item.kw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def call_queue_closure(data, call_queue):\n result = data.copy()\n for func, f_args, f_kwargs in call_queue:\n try:\n result = func(result, *f_args, **f_kwargs)\n except Exception as err:\n self.call_queue = []\n ...
[ "0.6878254", "0.653854", "0.6499669", "0.6313003", "0.6291972", "0.61565644", "0.6106621", "0.60317", "0.6018602", "0.59836715", "0.59836715", "0.59609747", "0.5950041", "0.5924165", "0.5924025", "0.59115165", "0.590969", "0.58802915", "0.5863303", "0.5858751", "0.58530885", ...
0.7384044
0
Convert a BGR color tuple (e.g. (0, 147, 255)) to a color tuple that can be used by Matplotlib (e.g. (0, 0.5764705882352941, 1)).
def color_tuple_bgr_to_plt(color_tuple): return (color_tuple[2]/255, color_tuple[1]/255, color_tuple[0]/255)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def int2color_tuple(x):\n red_val = int(1000 * x % 255)\n green_val = int(10000 * x % 255)\n blue_val = int(100000 * x % 255)\n return red_val, green_val, blue_val", "def to_color(self):\n return (int(self.r * 255), int(self.g * 255), int(self.b * 255))", "def colour_to_rgb_tuple(cls, col_st...
[ "0.7479977", "0.72842014", "0.723168", "0.71900856", "0.7151505", "0.71181124", "0.7104675", "0.7094821", "0.7084356", "0.70437115", "0.7004791", "0.6984981", "0.6979475", "0.69711167", "0.6894583", "0.6887978", "0.6884093", "0.684709", "0.6821083", "0.68084604", "0.6765526",...
0.8025614
0
Convert a BGR color tuple (e.g. (0, 147, 255)) to an RGB color tuple (e.g. (255, 147, 0)).
def bgr_to_rgb(image_bgr): b, g, r = cv2.split(image_bgr) image_rgb = cv2.merge([r, g, b]) return image_rgb
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _binary_to_rgb(*args) -> tuple:\n if len(args) == 1:\n red = args[0][0]\n green = args[0][1]\n blue = args[0][2]\n elif len(args) == 3:\n red = args[0]\n green = args[1]\n blue = args[2]\n else:\n raise ValueError...
[ "0.773246", "0.7556711", "0.7530567", "0.7476492", "0.73897356", "0.7369811", "0.7366458", "0.72832555", "0.7278421", "0.72596794", "0.7223585", "0.7198768", "0.7175646", "0.71632576", "0.7161026", "0.7161026", "0.7161026", "0.7161026", "0.714561", "0.7134249", "0.7133074", ...
0.6443899
73
Save an object to a given path as a pickle file.
def pickle_save(file_path, obj): with open(file_path, 'wb') as f: pickle.dump(obj, f)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def picklesave(obj, path):\n with open(path, 'wb') as file:\n pickle.dump(obj, file)", "def save_pickle(obj, path):\n may_make_dir(osp.dirname(osp.abspath(path)))\n with open(path, 'wb') as f:\n pickle.dump(obj, f, protocol=2)", "def save_pickle(obj, path):\n may_make_dir(osp.dirname(path))\n ...
[ "0.90992534", "0.8983763", "0.8871169", "0.88379884", "0.8829182", "0.880986", "0.8776351", "0.8729025", "0.8513582", "0.8496143", "0.8445727", "0.830995", "0.8307056", "0.82842016", "0.82842016", "0.8066629", "0.8039737", "0.8001305", "0.7950542", "0.79200506", "0.7896429", ...
0.8953766
2
Load an object from a given path to a pickle file.
def pickle_load(file_path): if not os.path.isfile(file_path): return None with open(file_path, 'rb') as f: return pickle.load(f)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_obj(path):\n with open(path, 'rb') as f:\n return pickle.load(f)", "def load_obj(path: str):\n with open(path, 'rb') as h:\n return pickle.load(h)", "def load_object(path):\r\n with open(path,\"rb\") as f:\r\n object = pickle.load(f) \r\n return object", ...
[ "0.8905462", "0.88720864", "0.88675714", "0.8396519", "0.83959174", "0.82973844", "0.8243843", "0.81742144", "0.8155702", "0.81482124", "0.8042912", "0.8042912", "0.8042912", "0.8011096", "0.78667134", "0.78514236", "0.7846291", "0.7840309", "0.78266627", "0.7821241", "0.7797...
0.75162077
33
Yield successive nsized chunks from lst.
def chunks(lst, n): for i in range(0, len(lst), n): yield lst[i:i + n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def chunks(self, lst, n):\n for i in range(0, len(lst), n):\n yield lst[i:i + n]", "def chunks(lst: list, n: int):\n for i in range(0, len(lst), n):\n yield lst[i : i + n]", "def chunks(lst, n):\n for i in range(0, len(lst), n):\n yield lst[i:i + n]", "de...
[ "0.83071756", "0.81939614", "0.81910837", "0.81910837", "0.8190213", "0.81267184", "0.81218547", "0.81218547", "0.80773693", "0.80526286", "0.80526286", "0.80526286", "0.80526286", "0.80526286", "0.80042696", "0.7871678", "0.7845623", "0.7828392", "0.7827006", "0.78138447", "...
0.80533457
21
Retrieve the list of all City from an State objects
def retrieve_city_in_state(state_id): city_list = [] if storage.get("State", state_id) is not None: for city in storage.get("State", state_id).cities: city_list.append(city.to_dict()) return make_response(jsonify(city_list)) else: return abort(404)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cities_in_state(state_id=None):\n for obj in storage.all(State).values():\n if obj.id == state_id:\n city_list = []\n for city in obj.cities:\n city_list.append(city.to_dict())\n return jsonify(city_list)\n abort(404)", "def cities_all(state_id...
[ "0.83650404", "0.83278394", "0.8295975", "0.82495445", "0.824326", "0.81476617", "0.8083895", "0.80771977", "0.7993509", "0.785245", "0.7839386", "0.7800313", "0.7735459", "0.77141005", "0.7687449", "0.7603044", "0.7559026", "0.75254625", "0.7391879", "0.73894644", "0.7380609...
0.7450396
18
Method to retrieve City
def city(city_id): if storage.get("City", city_id) is not None: return jsonify(storage.get("City", city_id).to_dict()) else: abort(404)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_city(self, territory_id: str = \"\"):", "def get_city(self, territory_id: str = \"\"):", "def GetCity():\n IPinfoRequest = requests.get('https://ipinfo.io/')\n IPinfo = IPinfoRequest.json()\n City = IPinfo['city']\n return(City)", "def retrieve_city(city_id):\n city = storage.get('City...
[ "0.79814726", "0.79814726", "0.7756098", "0.76612717", "0.765196", "0.75768644", "0.7573178", "0.74518216", "0.7417468", "0.7341574", "0.7341574", "0.7341574", "0.7341574", "0.7341574", "0.7334732", "0.73209304", "0.73209304", "0.72968584", "0.7249383", "0.7244634", "0.722611...
0.70367837
24
Method to delete a City object using the DELETE method and his id
def del_city_id(city_id): if storage.get("City", city_id) is not None: obj = storage.get("City", city_id) storage.delete(obj) storage.save() return make_response({}, 200) else: abort(404)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def city_delete_by_id(city_id):\n\n fetched_obj = storage.get(\"City\", str(city_id))\n\n if fetched_obj is None:\n abort(404)\n\n storage.delete(fetched_obj)\n storage.save()\n\n return jsonify({})", "def del_city(city_id):\n for obj in storage.all(City).values():\n if obj.id == ...
[ "0.84084433", "0.83369017", "0.83023196", "0.83013195", "0.82527554", "0.81764203", "0.817475", "0.8161531", "0.7972673", "0.7146561", "0.71002424", "0.70608056", "0.6821544", "0.67846936", "0.65920323", "0.65473217", "0.6542934", "0.64872056", "0.6479222", "0.64613926", "0.6...
0.8010895
8
Method to creates an City object using POST
def post_state_city(state_id): if not request.get_json(): return make_response(jsonify({"error": "Not a JSON"}), 400) if storage.get("State", state_id) is None: abort(404) if 'name' not in request.get_json(): return make_response(jsonify({"error": "Missing name"}), 400) obj = re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_city(state_id=None):\n jreq = request.get_json(silent=True)\n state = storage.get(State, state_id)\n\n if state is None:\n abort(404)\n if jreq is None:\n abort(400, 'Not a JSON')\n if 'name' not in jreq:\n abort(400, 'Missing name')\n new_city = City(**jreq)\n ne...
[ "0.79649186", "0.79572505", "0.7762739", "0.7654357", "0.73793656", "0.7293891", "0.6985512", "0.68425363", "0.66014796", "0.64874905", "0.64441365", "0.64099985", "0.6333697", "0.6226037", "0.6224602", "0.6222621", "0.62019914", "0.60947216", "0.6058716", "0.6040446", "0.603...
0.7480158
4
Method to update a City object using PUT
def put_city(city_id): if not request.get_json(): return make_response(jsonify({"error": "Not a JSON"}), 400) if storage.get("City", city_id) is not None: obj = storage.get("City", city_id) obj_dict = obj.to_dict() dict1 = request.get_json() ignored_keys = ['id', 'create...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def put_update_city(city_id):\n city = storage.get(\"City\", city_id)\n if city is None:\n abort(404)\n kwargs = request.get_json()\n if kwargs is None:\n return ('Not a JSON', 400)\n for k, v in kwargs.items():\n setattr(city, k, v)\n city.save()\n return (jsonify(city.to...
[ "0.832392", "0.77662885", "0.77056277", "0.7651104", "0.745792", "0.73036516", "0.6740853", "0.6739187", "0.6671405", "0.64194614", "0.6406273", "0.6359972", "0.63585967", "0.63535124", "0.63325053", "0.63252425", "0.6323284", "0.6287959", "0.6281824", "0.6281575", "0.6276768...
0.7762031
2
Reads and process xml using lxml. The result is saved in json_path
def parse_xml(file_name): events = ("start", "end") has_start = False json_dict = dict() # Traverse the XML for event, element in ET.iterparse(file_name, events=events, encoding="utf-8", load_dtd=True, recover=True): print(event, element.tag, element.text) # Article node: initialize ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_xml(self):\n self.process_gpx_file(str(self.filename))", "def xml_parser(xml_path, tag='DESPESA'):\n for event, element in iterparse(xml_path, tag=tag):\n\n # get data\n fields = {c.tag: c.text for c in element.iter() if c.tag != tag}\n element.clear()\n\n # expo...
[ "0.5835775", "0.5785217", "0.55124164", "0.54979795", "0.5481061", "0.54597664", "0.5445305", "0.5339281", "0.5328666", "0.5291677", "0.52587175", "0.5231648", "0.51636916", "0.515232", "0.5130471", "0.5129057", "0.50746787", "0.50729805", "0.50667673", "0.5034233", "0.502642...
0.5286885
10
Calculate the modified onesided KolmogorovSmirnov statistic, adjusted for rightcensored timetodeath data, as described in Fleming et al (1980). This calcuate the residues for a nonparametric test of the distribution G(x) of an observed timetodeath random variable against a given distribution F(x). The actual test is pe...
def KSm_gof(data, relative_time_grid, sf, args=(), alternative='two-sided'): def deltaNA (d, Y): return np.sum([ np.power(Y-l,-1) for l in range(int(d))]) mortalities = pd.Series(data.loc[data['status']==1,'mortality'].value_counts(), index=relative_time_grid).fillna(0) censored = pd.Serie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KSm_test(residues, maxcdf, alternative='two-sided', alpha=0.05):\n \n Ystats = residues\n R_MaxCDF = maxcdf\n R_func = np.sqrt(R_MaxCDF-R_MaxCDF*R_MaxCDF)\n \n if alternative=='two-sided':\n \n A_MaxAbsY = np.max(np.abs(Ystats))\n prob_BrownianBridge = 1-norm.cdf(A_M...
[ "0.68917", "0.6444261", "0.62729055", "0.61604184", "0.61538666", "0.6151454", "0.6024589", "0.6015604", "0.6004124", "0.5970615", "0.5871405", "0.5847723", "0.5835547", "0.5832054", "0.5826818", "0.57945913", "0.57876194", "0.5774612", "0.57667327", "0.56664616", "0.56486166...
0.64196706
2
Calculate the modified twosided KolmogorovSmirnov statistic, adjusted for rightcensored timetodeath data, as described in Fleming et al (1980). This calcuate the residues for a nonparametric test for the null hypothesis that 2 independent samples are drawn from the same continuous distribution. The actual test is perfo...
def KSm_2samples(data1, relative_time_grid1, data2, relative_time_grid2): def deltaNA (d, Y): return np.sum([ np.power(Y-l,-1) for l in range(int(d))]) mortalities1 = pd.Series(data1.loc[data1['status']==1,'mortality'].value_counts(), index=relative_time_grid1).fillna(0) censored1 = pd.Series(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KSm_test(residues, maxcdf, alternative='two-sided', alpha=0.05):\n \n Ystats = residues\n R_MaxCDF = maxcdf\n R_func = np.sqrt(R_MaxCDF-R_MaxCDF*R_MaxCDF)\n \n if alternative=='two-sided':\n \n A_MaxAbsY = np.max(np.abs(Ystats))\n prob_BrownianBridge = 1-norm.cdf(A_M...
[ "0.6556137", "0.6203104", "0.61933494", "0.61850893", "0.6151925", "0.60617256", "0.60514313", "0.6029852", "0.5988094", "0.5967601", "0.5933769", "0.59139836", "0.5897438", "0.58525157", "0.5850537", "0.58362997", "0.58152133", "0.5803236", "0.58009744", "0.57719064", "0.576...
0.6239925
1