query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Connect a character to its events and entities.
def visit_character(self, character): self.visit_container(character) # self.connect_equipment(character)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connect(self, entity):\n self._connect_events(entity)\n entity.accept(self)", "def _connect_events(self, entity):\n for event_json in self.entity_json['events']:\n event_id = event_json['id']\n event_verb = event_json['verb']\n event = self.world.events[e...
[ "0.6065438", "0.5955724", "0.57783943", "0.5366029", "0.53510135", "0.5349307", "0.5334294", "0.52464485", "0.51648825", "0.51561", "0.51557654", "0.51391983", "0.5102623", "0.5088478", "0.50585973", "0.50420403", "0.5038125", "0.50270766", "0.5013052", "0.49913365", "0.49897...
0.6460887
0
Connect a npc to its events and entities.
def visit_npc(self, npc): self.visit_character(npc)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def begin_encounter(self):\r\n\r\n #introduce NPCs - run all introduce methods, unless the NPCs have the same name\r\n for i in range(len(self.npc_names)):\r\n for _npc in self.npc_list:\r\n if _npc.name == self.npc_names[i]:\r\n _npc.introduce(self.npc_qu...
[ "0.5983449", "0.57505697", "0.5664563", "0.5664563", "0.5659168", "0.52846205", "0.5250011", "0.5235229", "0.52174544", "0.51748323", "0.5112049", "0.51086766", "0.5030222", "0.50148475", "0.49820703", "0.49741313", "0.49646947", "0.49570033", "0.4952436", "0.49523357", "0.49...
0.6022783
0
connect an entity to its events.
def _connect_events(self, entity): for event_json in self.entity_json['events']: event_id = event_json['id'] event_verb = event_json['verb'] event = self.world.events[event_id] entity.events.add(event_verb, event)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connect(self, entity):\n self._connect_events(entity)\n entity.accept(self)", "def on_join(self, event):\n con = self.connection\n em = self.server.entity_manager\n self.entity.init(con.entity_id, con.entity_data, em)\n self.server.entity_list[self.entity.id] = self....
[ "0.7834202", "0.66124773", "0.63211936", "0.60697263", "0.59788364", "0.56821495", "0.56540227", "0.5629274", "0.5559982", "0.5450188", "0.54257315", "0.54172236", "0.5333959", "0.5327845", "0.5307829", "0.5307829", "0.53036654", "0.5276589", "0.5262206", "0.52462214", "0.523...
0.8382111
0
connect an container to its items.
def _connect_items(self, container): for item in self.entity_json['items']: item_id = item['id'] entity = self.world.entities[item_id] container.add(entity)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visit_container(self, container):\n self._connect_items(container)", "def add(self, comp):\n\t\tif comp:\n\t\t\tif isinstance(comp, Component):\n\t\t\t\tcomp.container = self\n\t\t\telse:\n\t\t\t\tfor item in comp:\n\t\t\t\t\tself.add(item)", "def addItems(c, items):\n\t\tcontainer.containersToSave[...
[ "0.7873877", "0.6368194", "0.6173582", "0.58845496", "0.58202606", "0.58202606", "0.5746645", "0.56929094", "0.5672957", "0.56324863", "0.56178015", "0.56020594", "0.55807084", "0.55807084", "0.550198", "0.5499115", "0.54885566", "0.5447995", "0.5441351", "0.54009783", "0.539...
0.77047986
1
Connect the destination for the move event.
def visit_move(self, move): dest_id = self.event_json['destination']['id'] destination = self.world.entities[dest_id] move.destination = destination
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_destination(self):\n pass", "def send_destination(self):\n\n print('send the target to the robot')\n move_base_action_goal=MoveBaseActionGoal()\n move_base_action_goal.goal.target_pose.header.frame_id=\"map\"\n move_base_action_goal.goal.target_pose.pose.orientation.w=1...
[ "0.6784758", "0.6586634", "0.651744", "0.63565195", "0.63381", "0.6329359", "0.63205934", "0.62343943", "0.6196577", "0.61948794", "0.60471314", "0.6002081", "0.5984645", "0.59630805", "0.59161794", "0.5895241", "0.5894039", "0.58921856", "0.58881867", "0.5882143", "0.5850040...
0.7482719
0
Connect the target of the toggle event.
def visit_toggle(self, toggle): target_id = self.event_json['target']['id'] target = self.world.entities[target_id] toggle.target = target
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toggle(self):", "def toggle(self) -> None:\n ...", "def toggled(self, *args, **kwargs): # real signature unknown\n pass", "def toggle(self) -> None:", "def toggle(self) -> None:", "def connect(self, target):\n self.__sink = target", "def target(self, target):\n\n self._t...
[ "0.6034621", "0.6018901", "0.58700854", "0.5843905", "0.5843905", "0.56049913", "0.5597189", "0.55534697", "0.5536469", "0.5467394", "0.5443622", "0.54325205", "0.542404", "0.54167783", "0.53670555", "0.5342672", "0.53145427", "0.5302233", "0.5302233", "0.5252946", "0.5209735...
0.760078
0
Connect all the events in a group.
def visit_group(self, group): for obj in self.event_json['events']: event_id = obj['id'] event = self.world.events[event_id] group.add(event)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def append_group(self, _groupby):\n # forces a `__getitem__`, which in turn calls `__missing__`\n # the first time we try to insert a value\n def do_append(key, group):\n self[key].send(group)\n appender = yield from starmap(do_append, _groupby)", "def connect(self, event):...
[ "0.601624", "0.5853231", "0.5840765", "0.571391", "0.5645478", "0.56138885", "0.5588904", "0.55673975", "0.55597115", "0.5420512", "0.5371197", "0.5299493", "0.52444977", "0.52325773", "0.52320695", "0.5230734", "0.52220994", "0.5218879", "0.52043945", "0.52010334", "0.519353...
0.67648554
0
Pyntc Device constructor for Cisco ASA.
def __init__(self, host: str, username: str, password: str, secret="", port=22, **kwargs): # nosec super().__init__(host, username, password, device_type="cisco_asa_ssh") self.native: Optional[CiscoAsaSSH] = None self.secret = secret self.port = int(port) self.kwargs = kwargs ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, device):\n logging.info(\"Cert: Init\")\n self._device = device\n self._device.wait_channel_ready()\n self._hci = PyHci(device)\n self._hci.register_for_events(\n hci_packets.EventCode.ENCRYPTION_CHANGE, hci_packets.EventCode.CHANGE_CONNECTION_LINK_K...
[ "0.61121684", "0.5979337", "0.5908789", "0.5875706", "0.57673687", "0.5765516", "0.5726076", "0.5699626", "0.5699626", "0.5699626", "0.5699626", "0.5699626", "0.5699626", "0.56678414", "0.5656306", "0.56558484", "0.56481194", "0.563267", "0.562743", "0.5622742", "0.56157386",...
0.6256579
0
Get IPv4 Addresses for ``host``.
def _get_ipv4_addresses(self, host: str) -> Dict[str, List[IPv4Address]]: if host == "self": command = "show ip address" elif host == "peer": command = "failover exec mate show ip address" show_ip_address = self.show(command) re_ip_addresses = RE_SHOW_IP_ADDRESS....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_ip4_adresses(self):\n self._search_regx(self.PATTERN_IP4)\n return self._ip_adresses", "def ipv4_addresses(self) -> Dict[str, List[IPv4Address]]:\n log.debug(\"Host %s: ipv4 addresses of the devices interfaces %s.\", self.host, self._get_ipv4_addresses(\"self\"))\n return self...
[ "0.7251436", "0.67736113", "0.6504402", "0.64227265", "0.6386803", "0.6125187", "0.5955448", "0.59548193", "0.58945864", "0.58945864", "0.5883269", "0.57915676", "0.57527775", "0.57527775", "0.57527775", "0.5720228", "0.56987894", "0.56748754", "0.5665191", "0.55827206", "0.5...
0.7517396
0
Get IPv6 Addresses for ``host``.
def _get_ipv6_addresses(self, host: str) -> Dict[str, List[IPv6Address]]: if host == "self": command = "show ipv6 interface" elif host == "peer": command = "failover exec mate show ipv6 interface" show_ipv6_interface = self.show(command) show_ipv6_interface_lines...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_ipv6_host(self, host):\n\n try:\n host = u'{0}'.format(host)\n return IPv6Network(host, strict=False)\n except ValueError as e:\n error_msg = \"Given host {0} is an invalid IPv6 format -- \" \\\n \"error {1}\".format(host, str(e))\n ...
[ "0.7069413", "0.69106", "0.6896146", "0.6877306", "0.6798674", "0.6350442", "0.6338886", "0.62348604", "0.60805404", "0.6022318", "0.6012644", "0.596778", "0.59339136", "0.59124595", "0.59091836", "0.5896983", "0.58932257", "0.58231485", "0.57840794", "0.57756394", "0.5718505...
0.7436379
0
Send configuration commands to a device.
def config(self, command): self._enter_config() if isinstance(command, list): entered_commands = [] for command_instance in command: entered_commands.append(command_instance) try: self._send_command(command_instance) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_commands_and_config(device_data: Dict[str, Any]):\n dt_str = datetime.now().strftime(\"%Y-%m-%dT%H:%M:%S\")\n device_name = device_data[\"device_name\"]\n output_file_path = OUTPUT_PATH / f\"{device_name}_{dt_str}.txt\"\n conn_data = create_conn_data(device_data)\n cfg = CFG.format(device=d...
[ "0.7118315", "0.6616108", "0.6555309", "0.64937687", "0.6492234", "0.64378935", "0.64228374", "0.64096457", "0.63932925", "0.63398725", "0.6179773", "0.6131058", "0.6125933", "0.61197627", "0.60923046", "0.6056432", "0.60518897", "0.60366714", "0.5971413", "0.5919621", "0.591...
0.754731
0
Ensure device is in enable mode.
def enable(self): # Netmiko reports enable and config mode as being enabled if not self.native.check_enable_mode(): self.native.enable() # Ensure device is not in config mode if self.native.check_config_mode(): self.native.exit_config_mode() log.debug("Ho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_enable_mode(self, *args, **kwargs):\n pass", "def enable(self):\n try:\n self.bus.open(self.BUS_NUMBER)\n self.write(AntennaDeployerCommand.ARM_ANTS, 0x00)\n self.bus.close()\n return True\n except:\n return False", "def on(s...
[ "0.73708355", "0.69106364", "0.68028337", "0.6690491", "0.66160965", "0.6596094", "0.6556733", "0.6512256", "0.6512256", "0.6468219", "0.64255446", "0.6420506", "0.6413448", "0.6410705", "0.6409053", "0.6403633", "0.63529277", "0.6351532", "0.63419104", "0.63034296", "0.62949...
0.77948546
0
Enable SCP on device by configuring "ssh scopy enable". The command is ran on the active device; if the device is currently standby, then a new connection is created to the active device. The configuration is saved after to sync to peer.
def enable_scp(self) -> None: if self.is_active(): device: ASADevice = self else: device = self.peer_device if not device.is_active(): log.error("Host %s: Unable to establish a connection with the active device", self.host) raise FileTransferError...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scp_enable(task):\n cmd = \"ip scp server enable\"\n task.run(task=netmiko_send_config, config_commands=cmd)\n c_print(f\"*** {task.host}: SCP has been enabled ***\")", "def scp_disable(task):\n cmd = \"no ip scp server enable\"\n task.run(task=netmiko_send_config, config_commands=cmd)\n ta...
[ "0.746182", "0.6131941", "0.5706482", "0.5624617", "0.5605447", "0.55587864", "0.54398704", "0.54394895", "0.53984904", "0.5383803", "0.5339336", "0.5308919", "0.5296935", "0.52571625", "0.52170235", "0.5207964", "0.52029574", "0.5200146", "0.51963264", "0.5171839", "0.516931...
0.8392657
0
Implement this once facts refactor is done.
def facts(self): # pylint: disable=invalid-overridden-method return {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _facts(facts):\n return {'swift_facts': facts}", "def test_retract_fact(self):\n fact = self.env.assert_string('(implied-fact)')\n\n self.assertTrue(fact in list(self.env.facts()))\n\n fact.retract()\n\n self.assertFalse(fact in list(self.env.facts()))", "def feed_treat(s...
[ "0.6041492", "0.5449713", "0.5319306", "0.5313007", "0.5294476", "0.527577", "0.5259083", "0.5259083", "0.51944894", "0.51746345", "0.5147894", "0.5147594", "0.5147594", "0.5117748", "0.5094611", "0.5038199", "0.50337017", "0.5021769", "0.5018717", "0.50171757", "0.5013762", ...
0.56577414
1
Copy ``src`` file to device. The ``src`` file can be copied to both the device and its peer by setting ``peer`` to True. If transferring to the peer device, the transfer will use the address associated with the ``peer_interface`` from "show failover" output.
def file_copy( self, src: str, dest: Optional[str] = None, file_system: Optional[str] = None, peer: Optional[bool] = False, ) -> None: if dest is None: dest = os.path.basename(src) if file_system is None: file_system = self._get_file_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy_file_from(self,src,dst=\".\",password=''):\n command = 'scp -v {0}@{1}:{2} {3}'.format(self.username,self.host,src,dst)\n if ':' in self.host:\n command = 'scp -v -P {0} -o NoHostAuthenticationForLocalhost=yes {1} {2}@{3}:{4}'.format(\n str(self.port),self.username,self...
[ "0.6790603", "0.6491342", "0.631072", "0.6228443", "0.59650034", "0.5949506", "0.5949506", "0.59144557", "0.58390045", "0.5710844", "0.57074004", "0.56817925", "0.5671214", "0.56379044", "0.562822", "0.5621411", "0.5604054", "0.5569768", "0.55686736", "0.55521387", "0.5538707...
0.6926484
0
IPv4 addresses of the device's interfaces.
def ipv4_addresses(self) -> Dict[str, List[IPv4Address]]: log.debug("Host %s: ipv4 addresses of the devices interfaces %s.", self.host, self._get_ipv4_addresses("self")) return self._get_ipv4_addresses("self")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_ip4_adresses(self):\n self._search_regx(self.PATTERN_IP4)\n return self._ip_adresses", "def get_interfaces_ip(self):\n\n interfaces_ip = dict()\n command = '/ip address print terse'\n\n ip_address_output_v4 = self._send_command(command)\n\n ip_addresses = parse_t...
[ "0.73778796", "0.73189545", "0.72656447", "0.7245198", "0.7107166", "0.70019746", "0.6908426", "0.66559345", "0.6652851", "0.6643085", "0.6634424", "0.6591901", "0.6586108", "0.6586108", "0.64732844", "0.64676154", "0.6439842", "0.6420362", "0.6389649", "0.6380036", "0.637399...
0.85117286
0
IPv6 addresses of the device's interfaces.
def ipv6_addresses(self) -> Dict[str, List[IPv6Address]]: log.debug("Host %s: ipv6 addresses of the devices interfaces %s.", self.host, self._get_ipv6_addresses("self")) return self._get_ipv6_addresses("self")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ipv6_addresses(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"ipv6_addresses\")", "def get_ipv6_list():\n ipv6 = __grains__.get(\"ipv6\")\n\n return \" \".join([\"[\" + ip + \"]\" for ip in ipv6])", "def ipv6_addresses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[st...
[ "0.8002467", "0.7705404", "0.76543117", "0.75595784", "0.72636914", "0.7223951", "0.68076736", "0.6796097", "0.6782421", "0.67496467", "0.6724827", "0.67238134", "0.6646632", "0.6623071", "0.6589195", "0.65696245", "0.6557467", "0.6549012", "0.6541031", "0.6484393", "0.648215...
0.8733
0
IP Protocol of the IP Addressed used by the underlying paramiko connection.
def ip_protocol(self) -> str: protocol = f"ipv{self.ip_address.version}" log.debug("Host %s: IP protocol for paramiko is %s.", self.host) return protocol
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ip_protocol(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"ip_protocol\")", "def ip_protocol(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"ip_protocol\")", "def ip_protocol(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"ip_protocol\")", "def Flo...
[ "0.7909567", "0.7878885", "0.7787811", "0.68788445", "0.6820182", "0.67882806", "0.6690934", "0.66006124", "0.66006124", "0.6461896", "0.6398874", "0.63789696", "0.63751405", "0.63751405", "0.63731635", "0.6328507", "0.6306722", "0.6297111", "0.6297111", "0.6297111", "0.62971...
0.8737725
0
Create instance of ASADevice for peer device.
def peer_device(self) -> "ASADevice": if self._peer_device is None: self._peer_device = self.__class__( str(self.peer_ip_address), self.username, self.password, self.secret, self.port, **self.kwargs ) else: self._peer_device.open() log.debug("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, alias, adapter=None):\n\n dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)\n\n self.bus = dbus.SystemBus()\n\n if not adapter:\n adapter = self._find_adapter()\n if not adapter:\n logger.error(\"Could not find any adapter implementin...
[ "0.5547751", "0.54501724", "0.5423695", "0.53721833", "0.53616005", "0.53551817", "0.5348649", "0.5299855", "0.5287739", "0.52432805", "0.52427536", "0.52101296", "0.5192895", "0.5192534", "0.5173347", "0.51700914", "0.51348156", "0.51337343", "0.51220655", "0.51198107", "0.5...
0.7118274
0
IPv4 addresses of the peer device's interfaces.
def peer_ipv4_addresses(self) -> Dict[str, List[IPv4Address]]: return self._get_ipv4_addresses("peer")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ipv4_addresses(self) -> Dict[str, List[IPv4Address]]:\n log.debug(\"Host %s: ipv4 addresses of the devices interfaces %s.\", self.host, self._get_ipv4_addresses(\"self\"))\n return self._get_ipv4_addresses(\"self\")", "def ip_addresses(self):\n try:\n return socket.gethostbyad...
[ "0.8206981", "0.7217757", "0.71656394", "0.7129269", "0.70470345", "0.70271844", "0.68483704", "0.6700128", "0.66638523", "0.66155505", "0.6608589", "0.65831333", "0.65439403", "0.6530989", "0.6492762", "0.6478537", "0.6456251", "0.64527124", "0.6367024", "0.6354821", "0.6350...
0.7692214
1
IPv6 addresses of the peer device's interfaces.
def peer_ipv6_addresses(self) -> Dict[str, List[IPv6Address]]: return self._get_ipv6_addresses("peer")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ipv6_addresses(self) -> Dict[str, List[IPv6Address]]:\n log.debug(\"Host %s: ipv6 addresses of the devices interfaces %s.\", self.host, self._get_ipv6_addresses(\"self\"))\n return self._get_ipv6_addresses(\"self\")", "def ipv6_addresses(self) -> pulumi.Output[Sequence[str]]:\n return pu...
[ "0.85552245", "0.78196806", "0.7588767", "0.7529403", "0.74446034", "0.6982833", "0.67377347", "0.6682601", "0.6619141", "0.6612463", "0.66104954", "0.6551816", "0.65330476", "0.65278524", "0.6522219", "0.6439883", "0.6437582", "0.64316696", "0.6422958", "0.6414799", "0.64107...
0.8090528
1
Determine the current redundancy state of the peer processor. In the case of multicontext configurations, a peer will be considered active if it is the active device for any context. Otherwise, the most common state will be returned.
def peer_redundancy_state(self): try: show_failover = self.show("show failover") except CommandError: log.error("Host %s: Peer redundancy state command error.", self.host) return None if "Failover On" in show_failover: peer_failover_data = show_fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def redundancy_state(self):\n try:\n show_failover = self.show(\"show failover\")\n except CommandError:\n log.error(\"Host %s: Redundancy state command error.\", self.host)\n return None\n\n if \"Failover On\" in show_failover:\n failover_data = sho...
[ "0.6891563", "0.5948181", "0.58459467", "0.5538028", "0.5352779", "0.53333735", "0.53166705", "0.53151697", "0.53068924", "0.529205", "0.52887344", "0.5266675", "0.5266235", "0.52311367", "0.5225656", "0.52236205", "0.5217811", "0.52146417", "0.51875514", "0.5181695", "0.5160...
0.77309406
0
Operating redundancy mode of the device.
def redundancy_mode(self): try: show_failover = self.show("show failover") except CommandError: return "n/a" show_failover_first_line = show_failover.splitlines()[0].strip() redundancy_mode = show_failover_first_line.lower().lstrip("failover") log.debug("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def operation_mode(self) -> int:\n op_mode = self._read_u8(_REG_OP_MODE)\n return (op_mode >> 2) & 0b111", "def redundancy_state(self):\n try:\n show_failover = self.show(\"show failover\")\n except CommandError:\n log.error(\"Host %s: Redundancy state command er...
[ "0.61422956", "0.581451", "0.56283855", "0.5627532", "0.5566297", "0.55505687", "0.5513421", "0.551085", "0.5509868", "0.5508725", "0.5456996", "0.54556763", "0.544835", "0.5437595", "0.542823", "0.5411133", "0.5410392", "0.53494614", "0.5338298", "0.5334401", "0.53319", "0...
0.7073799
0
Determine the current redundancy state of the processor. In the case of multicontext configurations, a device will be considered active if it is the active device for any context. Otherwise, the most common state will be returned.
def redundancy_state(self): try: show_failover = self.show("show failover") except CommandError: log.error("Host %s: Redundancy state command error.", self.host) return None if "Failover On" in show_failover: failover_data = show_failover.split("O...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def peer_redundancy_state(self):\n try:\n show_failover = self.show(\"show failover\")\n except CommandError:\n log.error(\"Host %s: Peer redundancy state command error.\", self.host)\n return None\n\n if \"Failover On\" in show_failover:\n peer_fail...
[ "0.64352334", "0.59143496", "0.59003526", "0.5828942", "0.58288723", "0.5818408", "0.57885593", "0.5722539", "0.56239694", "0.55665034", "0.55622417", "0.5553279", "0.5552862", "0.55470693", "0.5535094", "0.5400997", "0.5400097", "0.539669", "0.5377396", "0.5376658", "0.53713...
0.6911467
0
Get current running config on device.
def running_config(self): return self.show("show running-config")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config(self) -> 'outputs.DeviceConfigResponse':\n return pulumi.get(self, \"config\")", "def get_running_config(self, conn):\n config = conn.get_config(source=\"running\")\n if config:\n root = ET.fromstring(config._raw)\n running_config = root[0][0]\n rg...
[ "0.7413874", "0.7359133", "0.7343755", "0.7283954", "0.70826036", "0.70769906", "0.70321804", "0.70184255", "0.695905", "0.6955101", "0.6938347", "0.6938347", "0.6938347", "0.6938347", "0.6938347", "0.6938347", "0.6938347", "0.6938347", "0.6938347", "0.6938347", "0.6938347", ...
0.77269113
0
Set new image as boot option on device.
def set_boot_options(self, image_name, **vendor_specifics): current_boot = self.show("show running-config | inc ^boot system ") file_system = vendor_specifics.get("file_system") if file_system is None: file_system = self._get_file_system() file_system_files = self.show(f"dir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def image_do_set(self, image_type, image_name):\n if image_type != \"kernel\" and image_type != \"kernel-x86\":\n raise Exception(\"%s: image type not supported (only \"\n \"'kernel[-x86]')\")\n\n self.log.info(\"rebooting to flash image %s:%s \" \\\n ...
[ "0.6523156", "0.64540255", "0.62690246", "0.62173736", "0.6194308", "0.61799806", "0.61075765", "0.60420656", "0.6038812", "0.60344654", "0.5972624", "0.59504646", "0.594038", "0.5903931", "0.5863324", "0.58616394", "0.58594525", "0.58594525", "0.58459204", "0.58053875", "0.5...
0.6537051
0
Make a perinstance config message from preserved state.
def MakePerInstanceConfig(messages, name, preserved_state_disks, preserved_state_metadata, preserved_internal_ips=None, preserved_external_ips=None): return messages.PerInstanceConfig( name=name, preser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CreateShieldedInstanceConfigMessage(messages, enable_secure_boot,\n enable_vtpm,\n enable_integrity_monitoring):\n\n shielded_instance_config = messages.ShieldedInstanceConfig(\n enableSecureBoot=enable_secure_boot,\n enab...
[ "0.6162472", "0.5999556", "0.5879726", "0.5559529", "0.53812367", "0.5338278", "0.529255", "0.52844757", "0.5122174", "0.5110902", "0.5082805", "0.50676465", "0.50576746", "0.5038483", "0.50216097", "0.50089294", "0.49941856", "0.49889913", "0.49441692", "0.49346197", "0.4930...
0.8064605
0
Create a perinstance config message from disks and metadata attributes.
def MakePerInstanceConfigFromDiskAndMetadataDicts(messages, name, disks=None, metadata=None): preserved_state_disks = [] for disk_dict in disks or []: preserved_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MakePerInstanceConfig(messages, name,\n preserved_state_disks,\n preserved_state_metadata,\n preserved_internal_ips=None,\n preserved_external_ips=None):\n return messages.PerInstanceConfig(\n name=name,\n...
[ "0.717759", "0.6028734", "0.6007295", "0.578322", "0.55491096", "0.55491096", "0.5411169", "0.53859323", "0.53558975", "0.52869064", "0.5234745", "0.51855505", "0.51635075", "0.5161731", "0.5146419", "0.5135368", "0.5135162", "0.51308906", "0.5108282", "0.5104824", "0.5064909...
0.71765083
1
Make a map entry for disks field in preservedState message.
def MakePreservedStateDiskMapEntry(messages, device_name, source, mode, auto_delete='never'): mode_map = { 'READ_ONLY': messages.PreservedStatePreservedDisk.ModeV...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_disk_dict():\n disk_dict = {}\n with open(FILEPATH) as f:\n for line in f:\n data = line.strip().split()\n disk_bean = DiskStatsBean(data[0], data[1], data[2], data[12])\n disk_dict[disk_bean.device_name] = disk_bean\n return disk_dict", "def get_storable...
[ "0.54839134", "0.5450073", "0.5441374", "0.5357047", "0.5272922", "0.5161582", "0.51596695", "0.51469713", "0.5123579", "0.50942993", "0.50771785", "0.5051472", "0.50067323", "0.49578694", "0.49215576", "0.4918804", "0.4904561", "0.49035487", "0.4882516", "0.48762035", "0.485...
0.6614397
0
Make a map entry for metadata field in preservedState message.
def MakePreservedStateMetadataMapEntry(messages, key, value): return messages.PreservedState.MetadataValue.AdditionalProperty( key=key, value=value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _metadata_map():\n return {\n 'date_added': 'dateAdded',\n 'dns_active': 'dnsActive',\n 'last_modified': 'lastModified',\n 'private_flag': 'privateFlag',\n 'whois_active': 'whoisActive',\n 'key_name': 'Key Name',\n 'value_type'...
[ "0.66491055", "0.6499685", "0.626608", "0.60734075", "0.6012537", "0.57903886", "0.56847423", "0.5660466", "0.56240875", "0.55993325", "0.5591641", "0.55731374", "0.55731374", "0.5473831", "0.5453376", "0.54472023", "0.5440625", "0.5346436", "0.5336981", "0.53064156", "0.5294...
0.70379853
0
Construct a preserved state IP message.
def _MakePreservedStateIPAddress(messages, ip_address_literal=None, ip_address_url=None): if ip_address_literal is None and ip_address_url is None: raise ValueError( """ For a stateful network IP you must specify either the IP or th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clone(self, uNodeState):\n s = {}\n s['input_msg'] = uNodeState['input_msg']\n s['coincidences'] = uNodeState['coincidences']\n s['cls_prior_prob'] = uNodeState['cls_prior_prob']\n s['PCW'] = uNodeState['PCW']\n return s", "def make_nap_msg( i_curr, i_prev, edge_colo...
[ "0.5740106", "0.57063603", "0.57063603", "0.5650157", "0.56107587", "0.5302084", "0.52934855", "0.5263636", "0.5195034", "0.514612", "0.51321644", "0.5094426", "0.5016395", "0.49842238", "0.49842238", "0.49794313", "0.49717322", "0.4947795", "0.49430627", "0.4932824", "0.4926...
0.6516424
0
Runs the cloud utils pack_volume function, which lists the worlds on the host machine, has the user input a world selection, and then makes a docker volume containing the selected world. Alongside the world, the volume is made with server configurations.
def main() -> None: world_dirs = volume_utils.get_world_dirs() world_names = volume_utils.get_world_names(world_dirs = world_dirs) world = volume_utils.pick_world(world_names = world_names) print(f'You picked {world_names[world]}.') try: volume_name = input("Enter a name for your w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def creating_container(self, service):\n self.sync_code(service=service)\n externals = [v.external for v in service.options['volumes']]\n for v in self.get_hotcode_volumes(service):\n if v.external not in externals:\n service.options['volumes'].append(v)", "def laun...
[ "0.5547234", "0.5482371", "0.5289359", "0.52610576", "0.5221508", "0.5193038", "0.5152255", "0.5151537", "0.50998217", "0.50875753", "0.5077645", "0.5041575", "0.5011111", "0.50072545", "0.49647653", "0.49151543", "0.49011397", "0.48867512", "0.48683152", "0.48476335", "0.484...
0.71073383
0
bdict(bucketdict)[i] only store the last timestamp that is '1', and the num of '1' before this timestamp must be euqal or larger that bdict[i](not for the last bdict[i]).
def updatebucket(bdict, tstamp, keys): bdict[1].append(tstamp) for key in bdict.keys(): if len(bdict[key]) > 2: bdict[key].pop(0) oldfirststamp = bdict[key].pop(0) # klist[-1] is the last bucket if key != keys[-1]: # merged by next bucket ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new(num_buckets=256):\n aMap=[]", "def refresh( self ):\n\n def get_bucket( line_spec,value ):\n if not self.has_column(value.column_name):\n self.add_column(Column(name=value.column_name))\n bc = self.get_column(value.column_name)\n for idx in range(...
[ "0.57958746", "0.57821333", "0.55566317", "0.55236286", "0.5492194", "0.54617804", "0.54568446", "0.53937525", "0.5346657", "0.530652", "0.52413344", "0.52392995", "0.5174249", "0.51641464", "0.5155626", "0.5133958", "0.5132584", "0.5112332", "0.51069945", "0.51045847", "0.50...
0.72667664
0
All orders that this user contributed to, but did not place.
def contributed_orders(self): return (o for o in self.orders if o.ordered_by_id != self.id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def retrieve_unfulfilled_orders(self, **kwargs):\n return self.client.execute(\"order/get-fulfill\", \"GET\", kwargs)", "def get_all_game_players_but_indicated(self, user):\n return GamePlayer.objects.filter(Q(game=self) & ~Q(player=user))", "def get_queryset(self):\n return Order._default...
[ "0.6386555", "0.63638306", "0.60716015", "0.60325575", "0.60048014", "0.5962795", "0.58482754", "0.5844818", "0.5802664", "0.5779463", "0.57714367", "0.57472354", "0.5718538", "0.5705566", "0.5655202", "0.56025845", "0.5564993", "0.5529049", "0.5440164", "0.5364259", "0.53600...
0.73325515
0
Encode a record to a string.
def encode(record: Tuple[MeasureInput, MeasureResult]) -> str: return dump_record_to_string(*record)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode_record(record):\n return json.dumps(record)", "def to_json(self, record: Mapping[str, Any]) -> str:\n return self.json_lib.dumps(record, cls=ObjectEncoder)", "def makePickle(self, record: logging.LogRecord) -> bytes:\n return (self.format(record)).encode(encoding='utf-8')", "d...
[ "0.7702181", "0.6797888", "0.66771245", "0.6537271", "0.65220493", "0.6502035", "0.64125824", "0.61282396", "0.60837555", "0.602709", "0.59840584", "0.5969835", "0.594648", "0.5921296", "0.58990383", "0.57272685", "0.57272685", "0.5722999", "0.5705387", "0.57023805", "0.56877...
0.7715268
0
Decode a string to a record.
def decode(record_str: str) -> Tuple[MeasureInput, MeasureResult]: return load_record_from_string(record_str)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decode(self, s):\n o = self._decoder.decode(s)\n return o", "def decode(self, s):", "def decode(self, s):", "def decode_record(record):\n return json.loads(record, object_hook=decode_dict)", "def fromString(cls, s):\n try:\n lines = s.splitlines()\n assert ...
[ "0.68713343", "0.67202455", "0.67202455", "0.6512523", "0.63975686", "0.635362", "0.635362", "0.6252385", "0.62205315", "0.6137095", "0.6049539", "0.6037617", "0.6012912", "0.6002029", "0.59803647", "0.59387136", "0.58842254", "0.5866594", "0.5866225", "0.58589697", "0.585075...
0.76197016
0
Sort the record (of any layout) to be a list and return the best N.
def to_list(self, nbest: int = -1) -> List[Tuple[MeasureInput, MeasureResult]]: nbest = nbest if nbest != -1 else len(self._data) return [item[2] for item in heapq.nsmallest(nbest, self._data)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_sort_fewer_than_n(self):\n e1 = Experience(rid=1, uid=3, experience=100)\n e2 = Experience(rid=1, uid=1, experience=89)\n e3 = Experience(rid=1, uid=12, experience=1343)\n db.session.add(e1)\n db.session.add(e2)\n db.session.add(e3)\n db.session.commit()\n ...
[ "0.56814164", "0.56708133", "0.5602207", "0.5550636", "0.5487639", "0.5477765", "0.54741186", "0.54652596", "0.5388867", "0.53854614", "0.5383121", "0.53707093", "0.53313", "0.5280553", "0.5260203", "0.5256546", "0.52284855", "0.5202061", "0.5180243", "0.5170646", "0.515265",...
0.5743611
0
This method takes the working tower name and returns a release version of the name. Both the working tower name and release version are returned from this method.
def getReleaseVersion(self, workingTowerName, infixStream): towerInfix = iccs_apex.whatInfixIsStream(workingTowerName) prefixStream, postfixStream = string.split(workingTowerName, towerInfix) releaseVersion, postVersion = string.split(postfixStream, "wrk") releaseTowerName = infixStream ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_release_brach_name(self) -> str:\n return f\"release/{self.major}.{self.minor}\"", "def getApplicationReleaseName(self) -> unicode:\n ...", "def get_version():\n return \"0.0.1 (prerelease prototype)\"", "def __getVersionArg(self, version):\n if version == \"WORKING\":\n ...
[ "0.6678114", "0.6349531", "0.6253977", "0.62137884", "0.61554945", "0.61178595", "0.6113834", "0.60309803", "0.59525645", "0.5941124", "0.5917594", "0.59051824", "0.58851683", "0.5864435", "0.58591944", "0.58335066", "0.5783497", "0.5779", "0.57563514", "0.5754915", "0.572410...
0.76189125
0
Finds files from the given list from a working tower that are duplicated in other working directories. The other directories searched will be based on the name of the directory that the existing files reside in. The name will be used as the new directory to search for the duplicate files. Returns a list of files from t...
def findDuplicateWorkingFiles(self, initialList, curInfix, newInfix): Duplicate_List = [] for fname in initialList: infixStream = iccs_apex.whatInfixIsStream(fname) if (infixStream == curInfix): prefixStream, postfixStream = string.split(fname, infixStream) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findDuplicateReleaseFiles(self, initialList, workingTowerName, newInfix):\n Release_Tower_Name = self.getReleaseVersion(workingTowerName, newInfix)\n Duplicate_List = []\n for fname in initialList:\n prefixStream, postfixStream = string.split(fname, workingTowerName)\n ...
[ "0.751455", "0.67218864", "0.570742", "0.55598646", "0.54881805", "0.54005015", "0.53594816", "0.530249", "0.52744627", "0.5267444", "0.5239972", "0.5181621", "0.5160613", "0.515691", "0.51512116", "0.51367897", "0.5113833", "0.50876385", "0.5085542", "0.5045927", "0.49799144...
0.78709465
0
Finds files from the given list from a working tower that are duplicated in any release directories. The other directories searched will be based on the release version of the directory that the existing files reside in. The name will be used as the new directory to search for the duplicate files. Returns a list of fil...
def findDuplicateReleaseFiles(self, initialList, workingTowerName, newInfix): Release_Tower_Name = self.getReleaseVersion(workingTowerName, newInfix) Duplicate_List = [] for fname in initialList: prefixStream, postfixStream = string.split(fname, workingTowerName) A_File_N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findDuplicateWorkingFiles(self, initialList, curInfix, newInfix):\n Duplicate_List = []\n for fname in initialList:\n infixStream = iccs_apex.whatInfixIsStream(fname)\n if (infixStream == curInfix):\n prefixStream, postfixStream = string.split(fname, infixStre...
[ "0.7766736", "0.64188343", "0.59281796", "0.5649016", "0.56264246", "0.54892033", "0.5479583", "0.54301286", "0.53530866", "0.53145486", "0.5243955", "0.5194575", "0.51934433", "0.5189119", "0.518356", "0.51585114", "0.5157627", "0.5130058", "0.51014805", "0.50948924", "0.506...
0.824156
0
This method takes apart the destination, based on the current stream, and returns a new destination stream based on the new stream.
def newDestinationStream(self, destination, curInfixStream, newInfixStream): prefixStream, postfixStream = string.split(destination, curInfixStream) return prefixStream + newInfixStream + postfixStream
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy_to(self, stream, bufsize=None):\n bufsize = bufsize or PRETZEL_BUFSIZE\n if isinstance(stream.write(b''), int):\n # destination stream is synchronous python stream\n try:\n while True:\n stream.write((yield self.read(bufsize)))\n ...
[ "0.58958346", "0.57020503", "0.56708217", "0.55291766", "0.5512258", "0.53257483", "0.5309086", "0.5289626", "0.52763677", "0.5268037", "0.5173476", "0.51201713", "0.51191854", "0.5109368", "0.5072269", "0.50711346", "0.50216234", "0.49981204", "0.4997477", "0.49605685", "0.4...
0.7215137
0
Given the cantus firmus, will return a function that takes a single Genome instance and returns a fitness score.
def make_fitness_function(cantus_firmus): def fitness_function(genome, debug=False): """ Given a candidate solution will return its fitness score assuming the cantus_firmus in this closure. Caches the fitness score in the genome. """ cp = genome.chromosome # ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fitness(self):\n pass", "def fitness(self,*val):\n if len(val): self._fitness = val[0]\n return self._fitness", "def fitness(self):\n # TO BE DECIDED\n return 1", "def merit(problem, eval_func):\n def fitness(indiv):\n quali = eval_func(phenotype(indiv))\n ...
[ "0.71085477", "0.7088748", "0.69688135", "0.66472286", "0.6637002", "0.6594957", "0.6561634", "0.65413815", "0.64378136", "0.6388083", "0.6318275", "0.6308335", "0.62417734", "0.6210266", "0.6184279", "0.61661905", "0.6148391", "0.6129344", "0.61290747", "0.6102061", "0.60952...
0.73612547
0
Returns a halt function for the given cantus firmus.
def make_halt_function(cantus_firmus): def halt(population, generation_count): """ Given a population of candidate solutions and generation count (the number of epochs the algorithm has run) will return a boolean to indicate if an acceptable solution has been found within the refere...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def silu(input):\n return FunctionLib.apply('Silu', input.device, [input])", "def fnight(var, wrapper, message):\n if var.PHASE != \"day\":\n wrapper.pm(messages[\"not_daytime\"])\n else:\n hurry_up(0, True)", "def siler_default():\n return siler_time_dependent_hazard(SILER_CONSTANTS)...
[ "0.5011919", "0.47677404", "0.4752362", "0.47160113", "0.46849632", "0.4675903", "0.46106285", "0.46034005", "0.46028528", "0.45651484", "0.4530724", "0.45136082", "0.45062792", "0.45043126", "0.44975713", "0.449022", "0.4464519", "0.44626388", "0.443931", "0.4438068", "0.441...
0.74795383
0
Method to test if user can add an answer
def test_user_can_add_answer(self): answer_details = {"description": "Type Ctrl+O to exit"} # Post a question first question_response = self.app.post( '/stackoverflowlite/api/v1/questions', data=json.dumps(self.question_details), content_type='application/jso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_func(self):\n answer = self.get_object()\n return True if self.request.user == answer.author or self.request.user.is_superuser else False", "def has_add_permission(self, request):\r\n return False", "def has_add_permission(self, request):\r\n return False", "def has_add_p...
[ "0.69792145", "0.6701171", "0.6701171", "0.6683779", "0.6683779", "0.66044486", "0.65980405", "0.6558188", "0.6556756", "0.65183216", "0.65183216", "0.63950753", "0.63825595", "0.6337381", "0.63340396", "0.6308064", "0.63031566", "0.62946886", "0.6281623", "0.623778", "0.6181...
0.7272463
0
Generator function taking in file path and io mode Yields upon file open and finally closes later
def file_helper(filePath, mode): f = None try: f = open(filePath, mode) yield f except Exception as e: print('File does not exist', e) finally: if f is not None: f.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def file_helper2(filePath, mode):\n f = None\n try:\n f = open(filePath, mode)\n yield f\n except Exception as e:\n print('File does not exist', e)\n finally:\n if f is not None:\n f.close()", "def open_file(self) -> Iterator[NamedIO]:\n with open(self.fi...
[ "0.7131682", "0.679508", "0.6728332", "0.67049253", "0.65156025", "0.6508898", "0.64692086", "0.6385206", "0.6355901", "0.6229973", "0.62061274", "0.62012833", "0.6195434", "0.61802775", "0.61764437", "0.6163608", "0.6163608", "0.6043943", "0.6006625", "0.598027", "0.5979418"...
0.692213
1
Generator function taking in file path and io mode Yields upon file open and finally closes later
def file_helper2(filePath, mode): f = None try: f = open(filePath, mode) yield f except Exception as e: print('File does not exist', e) finally: if f is not None: f.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def file_helper(filePath, mode):\n f = None\n try:\n f = open(filePath, mode)\n yield f\n except Exception as e:\n print('File does not exist', e)\n finally:\n if f is not None:\n f.close()", "def open_file(self) -> Iterator[NamedIO]:\n with open(self.fil...
[ "0.6921434", "0.67942816", "0.6727688", "0.6705272", "0.6514846", "0.6508966", "0.6467593", "0.6385717", "0.63558465", "0.6229776", "0.6205512", "0.620159", "0.619551", "0.61787295", "0.61761045", "0.61628443", "0.61628443", "0.60442024", "0.6007147", "0.5981029", "0.59792143...
0.71309286
0
Get list of spectra for given parameter list and base name.
def _get_spectrum(parlist, catdir): name = parlist[3] filename = name.split('[')[0] column = name.split('[')[1][:-1] filename = os.path.join(catdir, filename) sp = SourceSpectrum.from_file(filename, flux_col=column) totflux = sp.integrate() try: validate_totalflux(totflux) exc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_all_spectra(self):\n pass", "def get_snapshot_list(self, base, snappref=\"SPECTRA_\"):\n #print('Looking for spectra in', base)\n powerspectra = FluxPower(maxk=self.max_k)\n for snap in range(30):\n snapdir = os.path.join(base,snappref+str(snap).rjust(3,'0'))\n ...
[ "0.70337903", "0.6748008", "0.6547452", "0.6412692", "0.62961274", "0.61495095", "0.5945992", "0.5933074", "0.5743851", "0.5738307", "0.5712551", "0.5701117", "0.56282717", "0.56207204", "0.5576099", "0.5532797", "0.55142087", "0.5511111", "0.55032444", "0.549668", "0.54515",...
0.6810884
1
Extract spectrum from given catalog grid parameters. Interpolate if necessary. Grid parameters are only read once and then cached. Until the cache is cleared explicitly using
def grid_to_spec(gridname, t_eff, metallicity, log_g): if gridname == 'ck04models': catdir = 'crgridck04$' elif gridname == 'k93models': catdir = 'crgridk93$' elif gridname == 'phoenix': catdir = 'crgridphoenix$' else: raise synexceptions.SynphotError( '{0} is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_spectrum(parlist, catdir):\n name = parlist[3]\n\n filename = name.split('[')[0]\n column = name.split('[')[1][:-1]\n\n filename = os.path.join(catdir, filename)\n sp = SourceSpectrum.from_file(filename, flux_col=column)\n\n totflux = sp.integrate()\n try:\n validate_totalflux(...
[ "0.55378807", "0.51421744", "0.51289564", "0.5128361", "0.51243615", "0.51093256", "0.5103408", "0.50909406", "0.50679624", "0.5050151", "0.50255704", "0.5021277", "0.50170547", "0.50153846", "0.5008585", "0.499819", "0.4997659", "0.49976522", "0.49961174", "0.49885422", "0.4...
0.55077094
1
Wrapper function containing dictionary of all sklearn, xgboost, and light gbm models for regression dataset.
def regression_model_dict() -> dict: return { "LinearRegression": createModel("LinearRegression", "regression"), "Ridge": createModel("Ridge", "regression"), "Lasso": createModel("Lasso", "regression"), "ElasticNet": createModel("ElasticNet", "regression"), "KNeighborsRegress...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_models():\n param = {'C': 0.7678243129497218, 'penalty': 'l2'}\n model1 = LogisticRegression(**param)\n\n param = {'n_neighbors': 8}\n model2 = KNeighborsClassifier(**param)\n\n param = {'C': 1.7, 'kernel': 'linear', 'probability':True}\n model3 = SVC(**param)\n\n param = {'criterion':...
[ "0.64520407", "0.62558615", "0.62452215", "0.60718876", "0.59896207", "0.59810126", "0.5959077", "0.5849926", "0.5840341", "0.58299226", "0.5813875", "0.5776229", "0.5761426", "0.5689248", "0.56722873", "0.5658434", "0.5656464", "0.56543905", "0.5646335", "0.56408787", "0.564...
0.7455866
0
Wrapper function containing dictionary of all sklearn, xgboost, and light gbm models for binary dataset.
def binary_model_dict() -> dict: return { "LogisticRegression": createModel( "LogisticRegression", "binary", solver="lbfgs", max_iter=1000 ), "GaussianNB": createModel("GaussianNB", "binary"), "KNeighborsClassifier": createModel("KNeighborsClassifier", "binary"), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def multiclass_model_dict(num_class: int) -> dict:\n return {\n \"LogisticRegression\": createModel(\n \"LogisticRegression\",\n \"multiclass\",\n num_class=num_class,\n multi_class=\"multinomial\",\n solver=\"lbfgs\",\n max_iter=1000,\n ...
[ "0.63365984", "0.60022074", "0.6000278", "0.59822017", "0.5838351", "0.5776912", "0.5706946", "0.56865984", "0.5674432", "0.56702435", "0.5652477", "0.56345", "0.56028354", "0.55993134", "0.55464786", "0.5540625", "0.55316323", "0.5501566", "0.5487814", "0.548677", "0.5474982...
0.72145426
0
Wrapper function containing dictionary of all sklearn, xgboost, and light gbm models for multiclass dataset.
def multiclass_model_dict(num_class: int) -> dict: return { "LogisticRegression": createModel( "LogisticRegression", "multiclass", num_class=num_class, multi_class="multinomial", solver="lbfgs", max_iter=1000, ), "Gaussi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def classifiers():\n return [(\"LogisticRegression\", LogisticRegression(C=1.0,\n class_weight=None,\n dual=False,\n fit_intercept=True,\n ...
[ "0.635458", "0.6266681", "0.6240139", "0.62210935", "0.61049837", "0.60547906", "0.6037938", "0.5997833", "0.5968489", "0.5958985", "0.5954836", "0.5889591", "0.5883026", "0.5874551", "0.5851511", "0.5819523", "0.58098525", "0.57993436", "0.5776716", "0.57581204", "0.57520777...
0.73344684
0
Prints the license of the utility
def show_license(ctx, param, value): if not value or ctx.resilient_parsing: return click.echo(lic) ctx.exit()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_licence(namespace):\n print(dedent(GSEA.legal_disclaimer))", "def get_license():\n repo_fs()\n return LICENSE", "def list_licenses(licenses):\n #print(\"Available licenses:\\n\")\n for license in licenses:\n print(\"{0}: {name} {ver} ({url})\".format(license, **licenses[licen...
[ "0.7804992", "0.7020284", "0.6958774", "0.6844255", "0.6837377", "0.6587957", "0.6535743", "0.64930046", "0.6490922", "0.6488531", "0.63964254", "0.6344899", "0.629397", "0.6228398", "0.61702853", "0.6165465", "0.6148388", "0.6126961", "0.61218876", "0.6061122", "0.6010674", ...
0.76501125
1
Updates an appimage using appimageupdate tool
def update(appname, use_appimageupdate=True): z = Zap(appname) z.update(use_appimageupdate=use_appimageupdate)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_image(self, image):\n raise NotImplementedError()", "def updateImage(self, frame, image):\n frame.imgtk = image\n frame.configure(image=image)", "def update_image(self):\n self.image = Image.fromarray(self.img)", "def update(self, req, id):\n image_data = json.lo...
[ "0.70013076", "0.6487758", "0.6405333", "0.62361443", "0.61855114", "0.6112679", "0.60433024", "0.60408896", "0.60034174", "0.6000376", "0.5938366", "0.5913609", "0.59040564", "0.5881809", "0.58815795", "0.5873985", "0.58479035", "0.58468926", "0.58276826", "0.5824144", "0.57...
0.7869099
0
Upgrade all appimages using AppImageUpdate
def upgrade(): config = ConfigManager() apps = config['apps'] for i, app in progressbar(enumerate(apps), redirect_stdout=True): z = Zap(app) if i == 0: z.update(show_spinner=False) else: z.update(check_appimage_update=False, show_spinner=False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(appname, use_appimageupdate=True):\n z = Zap(appname)\n z.update(use_appimageupdate=use_appimageupdate)", "def set_images(self):\n try:\n for deployment in self.all_deployments():\n new_image = self.get_new_image(deployment[\"image\"])\n step = \"S...
[ "0.68493176", "0.6439682", "0.6297886", "0.6265891", "0.6159023", "0.5885539", "0.5881609", "0.58458865", "0.58019197", "0.5696808", "0.5660871", "0.56553113", "0.56136173", "0.5597991", "0.5597127", "0.55853", "0.5539331", "0.55123484", "0.55080974", "0.55008936", "0.5459600...
0.6760221
1
Get md5 of an appimage
def get_md5(appname): z = Zap(appname) z.get_md5()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getmd5(image: Image):\n return hashlib.md5(image.tobytes()).hexdigest()", "def get_md5(text):\n return hashlib.md5(text).hexdigest()", "def MD5(self) -> _n_0_t_3[_n_0_t_9]:", "def aws_md5(data):\n hasher = hashlib.new(\"md5\")\n if hasattr(data, \"read\"):\n data.seek(0)\n while...
[ "0.85847664", "0.7205257", "0.71472436", "0.7115869", "0.71097136", "0.70201474", "0.69846994", "0.69807214", "0.69724065", "0.69631207", "0.69542664", "0.6928214", "0.69204205", "0.68891865", "0.68774444", "0.6860342", "0.6828942", "0.68164825", "0.6782989", "0.67782027", "0...
0.78104025
1
Remove zap and optionally remove all the appimages installed with zap
def disintegrate(): click.confirm('Do you really want to uninstall?', abort=True) if click.confirm('Do you want to remove installed AppImages?'): cfgmgr = ConfigManager() if os.path.exists(cfgmgr['bin']): print(fc("{y}Removing bin for appimages{rst}")) shutil.rmtree(cfgmg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cleanup():\n if len(env.releases) > 3:\n directories = env.releases\n directories.reverse()\n del directories[:3]\n env.directories = ' '.join([ '%(releases_path)s/%(release)s' % { 'releases_path':env.releases_path, 'release':release } for release in directories ])\n run('...
[ "0.649497", "0.639342", "0.62652767", "0.6256264", "0.6123716", "0.6123161", "0.59932685", "0.5982028", "0.5953048", "0.59413075", "0.5936117", "0.5932911", "0.5929861", "0.5926552", "0.589938", "0.5842679", "0.58410555", "0.5834634", "0.5829072", "0.58103985", "0.5792882", ...
0.79076195
0
Execute a Zap installed app (optionally with sandboxing / firejail)
def x(appname, firejail=False): z = Zap(appname) if not z.is_installed: print("{} is not installed yet.".format(appname)) return path_to_appimage = z.appdata().get('path') Execute(path_to_appimage, use_firejail=firejail) print("Done!")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def launch_an_app(appname,ui):\r\n ui = ui\r\n time.sleep(WAIT)\r\n \"\"\"Clicking on Launcher button\"\"\"\r\n ui.doDefault_on_obj('Launcher', False, role='button') \r\n time.sleep(WAIT)\r\n ui.doDefault_on_obj(name='Expand to all apps', role='button')\r\n time.sleep(WAIT)\r\n \"\"\"Launch...
[ "0.64814395", "0.63713837", "0.59922576", "0.59356177", "0.5914519", "0.5822126", "0.5786735", "0.5709717", "0.5692302", "0.566522", "0.5623251", "0.56187797", "0.5611359", "0.5598985", "0.5596082", "0.5563166", "0.5560238", "0.5545457", "0.55415314", "0.55372864", "0.5526464...
0.7712475
0
Checks if the name is in DEFAULT_EXCLUDE_USER_OPTIONS.
def validate_name(self, value): if value in DEFAULT_EXCLUDE_USER: raise serializers.ValidationError( _("The name in the option can't be handle by the user.") ) return value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_valid_global_option(self, name: str) -> bool:\n allowed_option_names = self.default_options.keys() | PLATFORMS | {\"overrides\"}\n\n return name in allowed_option_names", "def __contains__(self, name):\n if name not in self.ALLOWED_EXCLUDES or name not in self.data.keys():\n ...
[ "0.6801968", "0.66416067", "0.64076656", "0.623059", "0.623059", "0.618031", "0.6140113", "0.61239594", "0.5883978", "0.58481866", "0.5738718", "0.57075673", "0.57075673", "0.5668471", "0.5656242", "0.56559557", "0.56559557", "0.5652531", "0.5596308", "0.55802417", "0.5573888...
0.74314976
0
Sets the cleanup_time of this WorkflowWorkflowInfoAllOf.
def cleanup_time(self, cleanup_time): self._cleanup_time = cleanup_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cleanup_job_period(self, cleanup_job_period: ConfigNodePropertyInteger):\n\n self._cleanup_job_period = cleanup_job_period", "def cleanup_metadata(self, cleanup_metadata):\n\n self._cleanup_metadata = cleanup_metadata", "def failed_workflow_cleanup_duration(self,\n ...
[ "0.53730375", "0.5346395", "0.51419604", "0.4835535", "0.47945374", "0.46887898", "0.46761322", "0.4619738", "0.460941", "0.4601207", "0.4570556", "0.45511967", "0.45434168", "0.45332173", "0.4524554", "0.4492504", "0.4492344", "0.44890246", "0.44838798", "0.44838798", "0.448...
0.7674537
0
Sets the failed_workflow_cleanup_duration of this WorkflowWorkflowInfoAllOf.
def failed_workflow_cleanup_duration(self, failed_workflow_cleanup_duration): self._failed_workflow_cleanup_duration = failed_workflow_cleanup_duration
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def success_workflow_cleanup_duration(self,\n success_workflow_cleanup_duration):\n\n self._success_workflow_cleanup_duration = success_workflow_cleanup_duration", "def cleanup_time(self, cleanup_time):\n\n self._cleanup_time = cleanup_time", "def scale_do...
[ "0.5842435", "0.49689716", "0.48840374", "0.48604962", "0.48249754", "0.48249754", "0.4797127", "0.47593778", "0.47578943", "0.4685092", "0.4660214", "0.4659288", "0.464683", "0.46294424", "0.45918068", "0.45773247", "0.45456582", "0.45343345", "0.45304742", "0.44977093", "0....
0.85652953
0
Sets the inst_id of this WorkflowWorkflowInfoAllOf.
def inst_id(self, inst_id): self._inst_id = inst_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setIdentity(self) -> None:\n ...", "def set_institutes(self):\n\n if develope_mode:\n print(help(self.set_institutes))\n\n for (dirpath, dirnames, filenames) in os.walk(\"../Finanzexplorer-Git-data/Institute\"):\n filenames = [x for x in filenames\n ...
[ "0.50950223", "0.5083494", "0.50829786", "0.5063622", "0.5051372", "0.5051372", "0.5051372", "0.5051372", "0.5051372", "0.4975925", "0.49579298", "0.48223904", "0.48047024", "0.47787094", "0.4698486", "0.46824294", "0.46573713", "0.46568137", "0.46409932", "0.4628301", "0.462...
0.7281215
0
Sets the meta_version of this WorkflowWorkflowInfoAllOf.
def meta_version(self, meta_version): self._meta_version = meta_version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_mm_meta(self):\n self.mm_meta = self.store.attrs.get('Summary')\n mm_version = self.mm_meta['MicroManagerVersion']\n\n if mm_version != 'pycromanager':\n if 'beta' in mm_version:\n if self.mm_meta['Positions'] > 1:\n self.stage_positions = ...
[ "0.56268865", "0.54759836", "0.54759836", "0.5197681", "0.5184533", "0.5162404", "0.5156108", "0.5156108", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", "0.5140692", ...
0.7282775
0
Sets the src of this WorkflowWorkflowInfoAllOf.
def src(self, src): self._src = src
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def src(self):\n\n return copy.copy(self._src)", "def src_name(self, name: str):\n self._src_name = name\n for p in self.all_spectra:\n p.src_name = name", "def _set_workflow_sources(self):\n self.workflow_sources = []\n\n for wfs in self.workflow.get_sources():\n ...
[ "0.59158653", "0.5683829", "0.56815207", "0.53359926", "0.53226715", "0.52766293", "0.5194725", "0.5161563", "0.51556885", "0.51222384", "0.51109296", "0.51070434", "0.510366", "0.5095895", "0.5090687", "0.5086706", "0.5005743", "0.49965265", "0.49892193", "0.49695322", "0.49...
0.653615
0
Sets the success_workflow_cleanup_duration of this WorkflowWorkflowInfoAllOf.
def success_workflow_cleanup_duration(self, success_workflow_cleanup_duration): self._success_workflow_cleanup_duration = success_workflow_cleanup_duration
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def failed_workflow_cleanup_duration(self,\n failed_workflow_cleanup_duration):\n\n self._failed_workflow_cleanup_duration = failed_workflow_cleanup_duration", "def success_retention_period(self) -> pulumi.Output[Optional[int]]:\n return pulumi.get(self, \"su...
[ "0.6195331", "0.5141385", "0.5139909", "0.46657354", "0.46411705", "0.46411705", "0.46364954", "0.4449436", "0.43824297", "0.43647543", "0.43647543", "0.43206546", "0.4311806", "0.42858744", "0.427781", "0.42298764", "0.41808632", "0.41712856", "0.41086656", "0.41024885", "0....
0.8581278
0
Sets the trace_id of this WorkflowWorkflowInfoAllOf.
def trace_id(self, trace_id): self._trace_id = trace_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trace_id_set(trace_id: tuple[str, str]) -> None:\n trace_id_cv.set(trace_id)", "def set_chain_id(self, chain_id):\n assert isinstance(chain_id, str)\n for atm in self.iter_alt_loc():\n atm.chain_id = chain_id", "def set_tracing(self, tracing: bool) -> None:\n self.tracing...
[ "0.6647646", "0.5277696", "0.524129", "0.50278354", "0.50236005", "0.5015718", "0.50114846", "0.49973083", "0.4996332", "0.49694407", "0.4947388", "0.49053472", "0.48801875", "0.48535317", "0.48416582", "0.48307297", "0.48233706", "0.48201856", "0.47572717", "0.47572717", "0....
0.7108141
1
Sets the wait_reason of this WorkflowWorkflowInfoAllOf.
def wait_reason(self, wait_reason): allowed_values = [ "None", "GatherTasks", "Duplicate", "RateLimit", "WaitTask" ] # noqa: E501 if self.local_vars_configuration.client_side_validation and wait_reason not in allowed_values: # noqa: E501 raise ValueError( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def waiting(self, waiting):\n\n self._waiting = waiting", "def set_implicit_wait(self, wait_time=-1):\n if wait_time == -1:\n wait_time = self.default_implicit_wait\n\n self.driver.implicitly_wait(wait_time)", "def set_wait_time(self, wait_time):\n\n self.wait_time = wait...
[ "0.55837774", "0.5069274", "0.5046881", "0.49103874", "0.48863736", "0.4863735", "0.48522547", "0.48169252", "0.4777144", "0.47490934", "0.46741733", "0.46679544", "0.46508232", "0.46407074", "0.46406347", "0.4620623", "0.45848504", "0.45727432", "0.45401928", "0.45117995", "...
0.69291866
0
Sets the workflow_ctx of this WorkflowWorkflowInfoAllOf.
def workflow_ctx(self, workflow_ctx): self._workflow_ctx = workflow_ctx
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def workflow_status(self, workflow_status):\n self._workflow_status = workflow_status", "def workflow_task_count(self, workflow_task_count):\n\n self._workflow_task_count = workflow_task_count", "def workflow_step(self, workflow_step):\n\n self._workflow_step = workflow_step", "def set_w...
[ "0.5474644", "0.51803344", "0.5013736", "0.496313", "0.48578194", "0.48017618", "0.4728411", "0.46884608", "0.46583995", "0.46210006", "0.45153522", "0.45058796", "0.44384438", "0.43878946", "0.4379599", "0.43673173", "0.43600634", "0.43507397", "0.43489426", "0.42691553", "0...
0.74237543
0
Sets the workflow_meta_type of this WorkflowWorkflowInfoAllOf.
def workflow_meta_type(self, workflow_meta_type): allowed_values = ["SystemDefined", "UserDefined", "Dynamic"] # noqa: E501 if self.local_vars_configuration.client_side_validation and workflow_meta_type not in allowed_values: # noqa: E501 raise ValueError( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_type(self, type_balle):\n self.type_balle = type_balle", "def meta(self, meta):\n if not isinstance(meta, GiftiMetaData):\n raise TypeError(\"Not a valid GiftiMetaData instance\")\n self._meta = meta", "def set_olap_type(self, column, olap_type):\n self[column][OL...
[ "0.49841064", "0.4907281", "0.4824843", "0.48142347", "0.48142347", "0.48142347", "0.48142347", "0.48142347", "0.47350627", "0.4677754", "0.4677754", "0.46724626", "0.46508554", "0.46230292", "0.46005636", "0.45840526", "0.45711994", "0.45569384", "0.45551628", "0.45551628", ...
0.7319362
0
Sets the workflow_task_count of this WorkflowWorkflowInfoAllOf.
def workflow_task_count(self, workflow_task_count): self._workflow_task_count = workflow_task_count
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_count(self, process_count):\n\n self._process_count = process_count", "def set_workflows(self, wf_list):\n self._data_dict[self.KEY_BI_WORKFLOWS] = wf_list", "def processor_count(self, processor_count):\n\n self._processor_count = processor_count", "def workflow_status(self, ...
[ "0.5321464", "0.53206366", "0.52921915", "0.5214196", "0.5126126", "0.5088125", "0.50156325", "0.50148696", "0.49930224", "0.49899358", "0.49779657", "0.4957459", "0.49497092", "0.4938707", "0.48402986", "0.48093107", "0.48084217", "0.4760027", "0.4760027", "0.4752337", "0.47...
0.8547748
0
Sets the _0_cluster_profile of this WorkflowWorkflowInfoAllOf.
def _0_cluster_profile(self, _0_cluster_profile): self.__0_cluster_profile = _0_cluster_profile
{ "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 cluster(self, cluster):\n if self.local_vars_configuration.client_side_validation and cluster is None: ...
[ "0.63366556", "0.61144567", "0.60876626", "0.60876626", "0.60876626", "0.60876626", "0.60876626", "0.60876626", "0.58532166", "0.5752686", "0.5736868", "0.5718896", "0.56276083", "0.55767685", "0.55264485", "0.54760766", "0.546411", "0.5433778", "0.5404417", "0.5398537", "0.5...
0.7580498
0
Sets the _1_profile of this WorkflowWorkflowInfoAllOf.
def _1_profile(self, _1_profile): self.__1_profile = _1_profile
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_profile(self, profile: str):\n self._profile = profile", "def setProfileJobs(self,profile=False):\n self.__profileJobs = profile", "def profiles(self, profiles):\n\n self._profiles = profiles", "def set_profile(self, profile='default'):\n\n # parameters used by various subclas...
[ "0.680168", "0.65046", "0.6026596", "0.5875791", "0.5775348", "0.5775348", "0.5772461", "0.5723791", "0.55600107", "0.55158335", "0.54887706", "0.5455724", "0.54403526", "0.54361755", "0.5430312", "0.5428939", "0.53763044", "0.5346567", "0.533291", "0.53113246", "0.52848625",...
0.71194124
0
Sets the organization of this WorkflowWorkflowInfoAllOf.
def organization(self, organization): self._organization = organization
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def organization(self, value):\n organization = self._tower.get_organization_by_name(value)\n if not organization:\n raise InvalidOrganization(value)\n self._update_values('organization', organization.id)", "def setOrganization(self, *args):\n return _libsbml.ModelCreator_s...
[ "0.64512193", "0.6413507", "0.6273569", "0.6273569", "0.59499544", "0.57473254", "0.5661312", "0.5651027", "0.5575408", "0.55587095", "0.5550213", "0.55254066", "0.55254066", "0.55254066", "0.54535234", "0.5386825", "0.5259958", "0.52533203", "0.5210195", "0.52054965", "0.520...
0.7105023
1
Sets the parent_task_info of this WorkflowWorkflowInfoAllOf.
def parent_task_info(self, parent_task_info): self._parent_task_info = parent_task_info
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_task_parent(self, parent: \"Task\"):\n self.parent_uid = parent.uid\n self.root_uid = parent.root_uid", "def set_parent(self, parent_node):\n self.set_parent = parent_node", "def set_parent(self, parent):\n self._parent = parent\n\n if self._parent is not None:\n ...
[ "0.7522712", "0.6605368", "0.6519573", "0.6457894", "0.6424181", "0.6424181", "0.63999015", "0.63809425", "0.63794684", "0.6348817", "0.6341405", "0.626491", "0.62202835", "0.62116146", "0.6198888", "0.6191123", "0.6191123", "0.6191123", "0.6191123", "0.618646", "0.61619973",...
0.8423264
0
Sets the pending_dynamic_workflow_info of this WorkflowWorkflowInfoAllOf.
def pending_dynamic_workflow_info(self, pending_dynamic_workflow_info): self._pending_dynamic_workflow_info = pending_dynamic_workflow_info
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_pending(self, db_states_meta: StatesMeta) -> None:\n assert db_states_meta.entity_id is not None\n entity_id: str = db_states_meta.entity_id\n self._pending[entity_id] = db_states_meta", "def pending(self):\n self.update({self.STATE: self.STATE_PENDING})", "def pending_model...
[ "0.5655331", "0.556539", "0.5156978", "0.5049149", "0.50450927", "0.48616907", "0.47637364", "0.4736715", "0.45007902", "0.44893616", "0.44884738", "0.4406935", "0.43280545", "0.42645776", "0.42455554", "0.4242363", "0.42406905", "0.42318487", "0.4227954", "0.41727415", "0.41...
0.8793151
0
Sets the task_infos of this WorkflowWorkflowInfoAllOf.
def task_infos(self, task_infos): self._task_infos = task_infos
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tasks(self, tasks):\n\n self._tasks = tasks", "def tasks(self, tasks: List[TaskStatusDefinition]):\n\n self._tasks = tasks", "def set_task_forecast(self):\n\n tasks = self._get_all_tasks()\n\n task_id = tasks[self.tasks_view.currentRow()].Id\n\n self.tasks_flow.set_status...
[ "0.6261662", "0.61786056", "0.5722874", "0.55976385", "0.55115396", "0.5491082", "0.5409962", "0.52687705", "0.5235948", "0.52353686", "0.5209907", "0.5204161", "0.52003485", "0.5154182", "0.5117426", "0.50564754", "0.50450665", "0.503352", "0.5016333", "0.49995926", "0.49960...
0.7686681
0
Sets the workflow_definition of this WorkflowWorkflowInfoAllOf.
def workflow_definition(self, workflow_definition): self._workflow_definition = workflow_definition
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_definition(self, definition):\n return self.client._perform_json(\n \"PUT\", \"/projects/%s/managedfolders/%s\" % (self.project_key, self.odb_id),\n body=definition)", "def set_workflows(self, wf_list):\n self._data_dict[self.KEY_BI_WORKFLOWS] = wf_list", "de...
[ "0.5582849", "0.55335873", "0.55088055", "0.5507433", "0.54760087", "0.544876", "0.53856725", "0.5365739", "0.5359558", "0.52552456", "0.5248125", "0.5242122", "0.5167791", "0.51634103", "0.50676537", "0.5054343", "0.49676758", "0.4950645", "0.49445036", "0.49166152", "0.4901...
0.7843452
0
This function is accessed by the generate_url_list() function. It iterates through Game Log pages, pulls stats, and writes to csv file.
def pull_game_stats_old(url, player_name, yearTemp, pos): try: readPage = ul.urlopen(url).read() soup = BeautifulSoup(readPage, "html.parser") file_path = "../CSV_data/" + pos + "Stats.csv" # pull Field names statTitle = soup.find("tr", {"class" : "player-table-key"}).findAl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_url_list(position, pgNum, pos):\n url = \"http://www.nfl.com/players/search?category=position&playerType=current&conference=ALL&d-447263-p=%s&filter=%s&conferenceAbbr=null\" % (pgNum, position)\n print url\n try:\n readPage = ul.urlopen(url).read()\n soup = BeautifulSoup(readPag...
[ "0.6883214", "0.6768791", "0.65730333", "0.6499542", "0.6299608", "0.627718", "0.6242847", "0.6208323", "0.61626315", "0.61193687", "0.61052215", "0.606559", "0.60545903", "0.60304725", "0.5986799", "0.5976302", "0.5937188", "0.5917879", "0.5888844", "0.58724046", "0.5861365"...
0.7133188
0
This __init__ method sets up the class instance to allow for quick calling to the adder(), subtracter(), multipler(), and divider() classes.
def __init__(self, adder, subtracter, multiplier, divider): self.adder = adder self.subtracter = subtracter self.multiplier = multiplier self.divider = divider self.stack = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self):\n self.adder = Adder()\n self.subtracter = Subtracter()\n self.multiplier = Multiplier()\n self.divider = Divider()\n\n self.calculator = Calculator(self.adder, self.subtracter,\n self.multiplier, self.divider)", "def __init_...
[ "0.69803673", "0.6694342", "0.66778284", "0.66255045", "0.6621647", "0.65836424", "0.65719515", "0.6549398", "0.6547945", "0.6537896", "0.65374297", "0.6494218", "0.64863324", "0.6476817", "0.647569", "0.6456634", "0.6438407", "0.64350086", "0.64326936", "0.6431987", "0.64197...
0.76269734
0
This method allows the user to enter a number onto the calculator stack
def enter_number(self, number): if not self.stack: self.stack.insert(0, number) else: self.stack.insert(1, number)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enter_number(self, number):\n if len(self.stack) > 0:\n self.stack.insert(len(self.stack), number)\n else:\n self.stack.insert(0, number)", "def enter_number(self, number):\n self.stack.insert(0, number)", "def enter_number(self, number):\n self.stack.inser...
[ "0.69679564", "0.6953123", "0.69391525", "0.649861", "0.63346183", "0.6196871", "0.61842835", "0.6117436", "0.6056486", "0.6003732", "0.5976268", "0.5975135", "0.5887156", "0.58779436", "0.58532894", "0.5826341", "0.5823946", "0.57731897", "0.57706934", "0.5758845", "0.574992...
0.69870055
0
This method subtracts the values within the calculator stack
def subtract(self): return self._do_calc(self.subtracter)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subtraction():\r\n error_handler()\r\n f1.delete(0, END)\r\n s1 = float(operand.get())\r\n s2 = float(operator.get())\r\n result = s1 - s2\r\n f1.insert(10, str(result))", "def subtract(self, value):\n return self.number - value", "def subtract_number(value_a, value_b):\n ...
[ "0.6627434", "0.6452786", "0.64220595", "0.6390345", "0.6200908", "0.617761", "0.6148585", "0.6126273", "0.6099521", "0.6099521", "0.60598236", "0.6037063", "0.6025614", "0.59597", "0.59513706", "0.5951242", "0.5951242", "0.5951242", "0.5950458", "0.5936589", "0.5907626", "...
0.7010112
0
Reading the edge list from the path and returning the networkx graph object.
def read_graph(path): edge_list = pd.read_csv(path).values.tolist() graph = nx.from_edgelist(edge_list) return graph
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_graph(path: str) -> nx.Graph:\n with open(path, 'r') as f:\n list_of_edges = [line.strip().split() for line in f.readlines()]\n g = nx.Graph()\n g.add_edges_from(list_of_edges)\n return g", "def read_graph():\n return nx.read_edgelist('edges.txt.gz', delimiter='\\t')", ...
[ "0.76030236", "0.73670787", "0.734266", "0.7242138", "0.7191024", "0.70343155", "0.6881077", "0.6750106", "0.67166126", "0.65193766", "0.64661616", "0.6461602", "0.64491636", "0.6375508", "0.63562286", "0.63349396", "0.63062185", "0.6229919", "0.62031543", "0.6201052", "0.618...
0.75086486
1
Creates a conventional partition
def createPartition(self, mp, mtype, fs, size, vg, nr): startSector = 0 endSector = 0 # primary partition: calculate the space according instructions below if mtype == 'Pri': # calculate the start sector startSector = self.__primaryStartPoint # calc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def partition_book(self):\n ...", "def _createOwnPartition(self, databaseCursor, uniqueItems):\n self.logger.debug(\"%s - in createOwnPartition for %s\",threading.currentThread().getName(),self.name)\n for x in uniqueItems:\n #self.logger.debug(\"DEBUG - item value is %s\",x)\n partitionCr...
[ "0.6893677", "0.67016846", "0.6695031", "0.6575909", "0.657445", "0.655427", "0.65362483", "0.65191144", "0.6395585", "0.6294046", "0.62567276", "0.623528", "0.62205505", "0.6152412", "0.6120236", "0.6094482", "0.60775256", "0.6063272", "0.6030192", "0.6001822", "0.5967656", ...
0.71552014
0
Creates a physical volume partition
def createPhysicalVolume(self, disk, size, partition): pv = {} pv['command'] = 'create:pv' # FIXME: partitioner module only accepts the single name of the disk to # create LVM partitions, but when it creates physical partitions, it # requires full paths. The right way is configu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createPartition(self, mp, mtype, fs, size, vg, nr):\n startSector = 0\n endSector = 0\n\n # primary partition: calculate the space according instructions below\n if mtype == 'Pri':\n\n # calculate the start sector\n startSector = self.__primaryStartPoint\n\n ...
[ "0.771997", "0.7443335", "0.7067991", "0.7023633", "0.67887145", "0.675923", "0.67149246", "0.6624353", "0.6574437", "0.64410794", "0.63635993", "0.6344143", "0.6319911", "0.6208544", "0.61522466", "0.60866386", "0.6065718", "0.60507584", "0.60498846", "0.60287297", "0.602024...
0.77962774
0
Sets the disk id.
def setDisk(self, disk): self.__disk = disk
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setDiskId(self, diskId):\n self.__diskId = diskId", "def disk_num(self, disk_num):\n\n self._disk_num = disk_num", "def disk(self, disk):\n self._context[\"disk\"] = disk", "def _setDisk(self, disk):\n log_method_call(self, self.name, old=getattr(self.disk, \"name\", None),\n ...
[ "0.855126", "0.7090983", "0.6793492", "0.647074", "0.6312028", "0.6186076", "0.6154758", "0.61147004", "0.6099951", "0.6090852", "0.5955262", "0.59471774", "0.5921482", "0.5911233", "0.5900415", "0.58833015", "0.58779275", "0.58755255", "0.5866125", "0.5866125", "0.5866125", ...
0.7199222
1
Sets the disk id.
def setDiskId(self, diskId): self.__diskId = diskId
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setDisk(self, disk):\n self.__disk = disk", "def disk_num(self, disk_num):\n\n self._disk_num = disk_num", "def disk(self, disk):\n self._context[\"disk\"] = disk", "def _setDisk(self, disk):\n log_method_call(self, self.name, old=getattr(self.disk, \"name\", None),\n ...
[ "0.7199222", "0.7090983", "0.6793492", "0.647074", "0.6312028", "0.6186076", "0.6154758", "0.61147004", "0.6099951", "0.6090852", "0.5955262", "0.59471774", "0.5921482", "0.5911233", "0.5900415", "0.58833015", "0.58779275", "0.58755255", "0.5866125", "0.5866125", "0.5866125",...
0.855126
0
Sets the disk size.
def setDiskSize(self, size): # remove 1Mb from total size for safety value = size - (1024 * 1024) self.__diskSize = value / 1024
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_disk_size(self, nDiskSize):\n\t\tcall_sdk_function('PrlVmDevHd_SetDiskSize', self.handle, nDiskSize)", "def disk_set(vm_hostname, size):\n with ExitStack() as es:\n vm = es.enter_context(_get_vm(vm_hostname))\n\n current_size_gib = vm.dataset_obj['disk_size_gib']\n if size.startsw...
[ "0.79598963", "0.7607656", "0.755599", "0.752439", "0.71204853", "0.7078101", "0.69748926", "0.69364357", "0.69364357", "0.69364357", "0.69364357", "0.69302416", "0.6902999", "0.67231524", "0.6700483", "0.6679146", "0.66065925", "0.6464425", "0.64457464", "0.64101964", "0.640...
0.88404536
0
Configures a flag to indicate if the system has multipath or not.
def setMultipathMode(self, mode): self.__hasMultipath = mode
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setServerPath(value):\n global serverPath\n if os.path.isfile(value):\n serverPath = os.path.normpath(value)\n else:\n serverPath = 'tsserver'", "def is_valid_multipath(device_node):\n multipath_cmd = \"multipath -c %s\" % device_node\n try:\n LOG.debug(\"running multipath...
[ "0.53146464", "0.51640016", "0.4995864", "0.49627665", "0.49627665", "0.49485165", "0.48977226", "0.47649083", "0.46852913", "0.46831366", "0.46549693", "0.46475962", "0.46463224", "0.46290565", "0.462872", "0.46057495", "0.45834583", "0.45821315", "0.45821315", "0.45759204", ...
0.7577303
0
Devuelvo la cadena con las primeras letras en mayuscula de cada palabra de la cadena
def primera_palabra_mayuscula(cadena): palabras = cadena.split(" ") frase_final = "" for palabra in palabras: # recorro la palabra separada frase_final += palabra.capitalize() + " " # agarro la palabra separado y la primera letra la pongo en mayuscula return frase_final
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def palabras_iniciales(cadena, letra):\n palabras = cadena.split(\" \")\n palabras_iniciales = \" \"\n for i in palabras:\n if i[0] == letra.lower() or i[0] == letra.upper(): # comparo la primera letra con la letra si es mayuscula o minuscula\n palabras_iniciales += i + \" \" # pongo l...
[ "0.65786046", "0.61169714", "0.596698", "0.58078814", "0.57844585", "0.5670716", "0.5637236", "0.5614197", "0.5539024", "0.55045134", "0.5490316", "0.54843956", "0.54771405", "0.54514474", "0.5430599", "0.5410758", "0.5386249", "0.5362743", "0.53588575", "0.5319435", "0.52814...
0.6510494
1
Devuelvo solo las palabras que tengan en la primera letra una letra preelegida
def palabras_iniciales(cadena, letra): palabras = cadena.split(" ") palabras_iniciales = " " for i in palabras: if i[0] == letra.lower() or i[0] == letra.upper(): # comparo la primera letra con la letra si es mayuscula o minuscula palabras_iniciales += i + " " # pongo las palabras acor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def corrigir_palavra(palavra):\r\n def diferentes(letra1, letra2):\r\n return letra1 + letra2 if not (letra1.upper() == letra2.upper() and letra1 != letra2) else ''\r\n\r\n def depurar(start):\r\n # Utiliza o slice a partir de start comparar adjacentes a cada 2 casas,devolve a string corrigida\...
[ "0.6314729", "0.6221264", "0.6170795", "0.59561485", "0.5914981", "0.5885762", "0.58359295", "0.58144504", "0.57930166", "0.5764599", "0.5730268", "0.56947607", "0.5636237", "0.5616975", "0.56075865", "0.55918145", "0.5566296", "0.554855", "0.5504475", "0.5502676", "0.5495621...
0.6883975
0
Constructs a FiniteStateMarkovModel entity. See tf.gather for shape conventions.
def __init__(self, transition_parameters = None, initial_dist_logits = None, batch_dims = 0, name = 'FiniteStateMarkovModel'): super().__init__(name=name) self._maybe_set_static_parameters( transition_parameters=transition_parameters, i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_model(n_dimensions, seed):\n with spa.SPA(seed=seed) as model:\n # Create the state holding element\n model.state = spa.State(dimensions=n_dimensions,\n feedback=1.0, feedback_synapse=0.01)\n\n # Create the state transitions\n actions = spa.Act...
[ "0.61582226", "0.5743764", "0.55372304", "0.54695594", "0.5467602", "0.53655535", "0.5364793", "0.53570086", "0.5355838", "0.5248177", "0.52112013", "0.52104205", "0.5190977", "0.5183897", "0.5157981", "0.5144771", "0.5141594", "0.5128713", "0.5102423", "0.5068482", "0.506217...
0.60769093
1
Constructs a LinearGaussianStateModel entity.
def __init__(self, transition_op_ctor, initial_dist_scale_ctor, transition_noise_scale_ctor = None, initial_dist_scale = None, transition_parameters = None, transition_noise_scale = None, name = 'LinearGaussianState...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def linearize(self, at_this_rv: randvars.Normal):\n\n g = self.non_linear_model.state_trans_fun\n dg = self.non_linear_model.jacob_state_trans_fun\n\n x0 = at_this_rv.mean\n\n def force_vector_function(t):\n return g(t, x0) - dg(t, x0) @ x0\n\n def dynamicsmatfun(t):\n...
[ "0.60173315", "0.586068", "0.57481647", "0.5734987", "0.56783867", "0.560434", "0.5567105", "0.55232114", "0.54899967", "0.54825956", "0.5463306", "0.5445745", "0.54207027", "0.5412358", "0.5387524", "0.53816247", "0.53816247", "0.5369552", "0.5368224", "0.53540725", "0.53440...
0.6650809
0
Constructs an RNNCEllStateModel Entity.
def __init__(self, rnn_cell, batch_size, input_size, num_outputs): super().__init__(name='RNNCellStateModel') self._rnn_cell = rnn_cell self._batch_size = batch_size self._input_size = input_size self._num_outputs = num_outputs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_model():\n\n class Net(nn.Cell):\n def construct(self, x, y):\n return x\n\n net = Net()\n model_simple = Model(net)\n\n return model_simple", "def build(cls, so_tree, raw):\n return cls(\n model=raw[\"model\"],\n model_rna_type=RnaType.from_s...
[ "0.58027196", "0.57651615", "0.56711274", "0.56444645", "0.5644432", "0.5636733", "0.5635811", "0.5621261", "0.5620296", "0.56172585", "0.56045455", "0.55785805", "0.5575579", "0.5572934", "0.5564626", "0.55467385", "0.55456495", "0.554362", "0.55390805", "0.5516796", "0.5504...
0.60039717
0
Split a list in N equalsized bits.
def split_list(original_list, n): if len(original_list) <= n: final_list = [original_list, ] else: final_list = [] bit_size = len(original_list) / n for i in range(n): final_list.append(original_list[i*bit_size:(i+1)*bit_size]) return final_list
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split(a, n):\n k, m = divmod(len(a), n)\n ret = [a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)]\n return ret", "def split(a, N):\n\n integ = int(len(a) / N)\n remain = int(len(a) % N)\n\n splitted = [a[i * integ + min(i, remain):(i + 1) * integ +\n min(i + 1, remai...
[ "0.7340593", "0.7336038", "0.72611856", "0.71933293", "0.7175806", "0.7143102", "0.69590926", "0.6910029", "0.6894742", "0.68638283", "0.6863745", "0.68260616", "0.6752519", "0.6709801", "0.67086756", "0.6705655", "0.67047435", "0.668916", "0.668916", "0.6689029", "0.66839653...
0.8065308
0
Get new order dictionary from the strategy group.
def get_new_orders(self): # note we only get orders from the strategies with UPDATED = # True, i.e. only those which got new pricing information this # tick. Among other reasons, this is because some strategies # (e.g. MMStrategy) need to be fed new prices in order to # clear t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _build_dict(self, new_order):\n\t\torder_dict = {}\n\t\tfor i, el in enumerate(new_order):\n\t\t\torder_dict[el] = i\n\t\treturn order_dict", "def get_order(self):\n\n destination = self.factory_map[self.order.location]\n move_behaviour = self.move(destination)\n self.add_after_behaviour...
[ "0.6065176", "0.6002015", "0.59197485", "0.5644007", "0.56428856", "0.5590742", "0.5557657", "0.547926", "0.54729134", "0.5410405", "0.53195214", "0.52723205", "0.52498895", "0.5231057", "0.5231057", "0.52150494", "0.5207946", "0.5205838", "0.51984596", "0.519566", "0.5182555...
0.67388815
0
Get cancel order dictionary from the strategy group.
def get_cancel_orders(self): return self.stratgroup.get_orders_to_cancel_if(UPDATED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _cancel_order_parameters(self, cancel_order_action):\n parameters = {\n 'order_id': cancel_order_action.order_id\n }\n return parameters", "async def handle_cancel_order_response(self, response: RequesterResponse\n ) -> HitbtcOrderMode...
[ "0.5943877", "0.569577", "0.55897105", "0.5491403", "0.51516587", "0.51498276", "0.50921655", "0.5021712", "0.49397945", "0.4905517", "0.48576888", "0.485048", "0.48245442", "0.48108977", "0.4794394", "0.4783665", "0.47545624", "0.47299522", "0.47177872", "0.471735", "0.46718...
0.66946936
0
Get update order dictionary from the strategy group.
def get_update_orders(self): return self.stratgroup.get_orders_to_update_if(UPDATED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_new_orders(self):\n\n # note we only get orders from the strategies with UPDATED =\n # True, i.e. only those which got new pricing information this\n # tick. Among other reasons, this is because some strategies\n # (e.g. MMStrategy) need to be fed new prices in order to\n ...
[ "0.63026476", "0.5960988", "0.5960988", "0.5435156", "0.53284967", "0.5307391", "0.53023976", "0.524619", "0.52026904", "0.52026904", "0.52026904", "0.51467294", "0.5143381", "0.5110807", "0.51087385", "0.5056388", "0.5048834", "0.5038446", "0.5027424", "0.49176958", "0.49111...
0.6966685
0
Use BDAQ/BF Apis to cancel, update, and make new orders
def make_orders(self): # orders to cancel from all of the strategies ocancel = self.get_cancel_orders() # orders to update from all of the strategies oupdate = self.get_update_orders() # new orders from all of the strategies onew = self.get_new_orders() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def handle_cancel_orders_response(self, response: RequesterResponse\n ) -> HitbtcOrders:", "def killQueueOrder(self):\n # CHECK ALL QUEUE ORDERS AND CANCEL ORDER IF GREATER THAN TWO HOURS OLD\n queue_orders = self.queue.find(\n {\"Trader\"...
[ "0.6309828", "0.62195855", "0.6211575", "0.6188513", "0.61294276", "0.61017555", "0.6096636", "0.6085782", "0.60667163", "0.6060706", "0.603151", "0.60068625", "0.59444344", "0.59250677", "0.59223384", "0.5862779", "0.58500874", "0.5820265", "0.5796385", "0.57660055", "0.5765...
0.6296714
1
Return strategy with given bdaqmid. If multiple strategies have this bdaqmid, return the strategy with the smallest UTICK value. If no strategy exists, return None.
def get_strategy_with_mid(bdaqmid): strats = [] for strat in self.stratgroup.strategies: if bdaqmid in strat.get_marketids()[const.BDAQID]: strats.append(strat) # sort according to utick attribute strats.sort(key = attrgetter(UTICK)) if strats: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_best_bid_ask(self, ticker):\n if symbol in self.symbol:\n bid = self.symbol[symbol][\"bid\"]\n ask = self.symbol[symbol][\"ask\"]\n return bid, ask\n else:\n print(\n \"Bid/ask values for ticker %s are not \"\n \"availa...
[ "0.5808258", "0.5677035", "0.5581995", "0.5476275", "0.5380642", "0.5369393", "0.52083516", "0.5049351", "0.5044679", "0.49947754", "0.49757078", "0.49455544", "0.492734", "0.4911775", "0.49110729", "0.49096447", "0.4902555", "0.48537594", "0.48449445", "0.48313186", "0.48284...
0.7886709
0
Get storage location for this S3 service.
def get_storage_location(self): return self.s3_bucket
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_s3_location(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"default_s3_location\")", "def default_s3_location(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"default_s3_location\")", "def default_s3_location(self) -> pulumi.Input[str]:\n return pulumi...
[ "0.7371423", "0.69910794", "0.6987746", "0.6937144", "0.6866469", "0.67450845", "0.67162067", "0.6645967", "0.66115385", "0.6583917", "0.65399504", "0.65077573", "0.64811045", "0.646269", "0.64598596", "0.6449051", "0.64325005", "0.63170296", "0.6312064", "0.630059", "0.62827...
0.9002589
0
Put an object in S3.
def put_object(self, key, data): self.s3client.put_object(Bucket=self.s3_bucket, Key=key, Body=data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_to_s3(bucket, key, body):\n client = boto3.client('s3')\n s3_log = client.put_object(Body=body, Bucket=bucket, Key=key)\n \n if debug:\n print('s3_log:', s3_log)", "def put_data_in_s3(data, filename):\n s3_client.put_object(Body=data, Bucket=CLIMATE_DATA_BUCKET, Key=filename)", "...
[ "0.76349837", "0.75328356", "0.74202895", "0.7416657", "0.72957176", "0.72875464", "0.72687876", "0.7262106", "0.7178017", "0.7102305", "0.708085", "0.7017768", "0.70021456", "0.70000184", "0.69774", "0.69737685", "0.6902857", "0.6864732", "0.6860684", "0.6820473", "0.6817604...
0.8322952
0