text
stringlengths
78
104k
score
float64
0
0.18
def __get_keys(self): """ Return the keys associated with this node by adding its key and then adding parent keys recursively. """ keys = list() tree_node = self while tree_node is not None and tree_node.key is not None: keys.insert(0, tree_node.key) tree_node = t...
0.008451
def _get_field_values(item, fldnames, rpt_fmt=None, itemid2name=None): """Return fieldnames and values of either a namedtuple or GOEnrichmentRecord.""" if hasattr(item, "_fldsdefprt"): # Is a GOEnrichmentRecord return item.get_field_values(fldnames, rpt_fmt, itemid2name) if hasattr(i...
0.012195
def get_policy_config(platform, filters=None, prepend=True, pillar_key='acl', pillarenv=None, saltenv=None, merge_pillar=True, only_lower_merge=False, ...
0.002194
def cond_pop(ol,index,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [{'data':0;'type':'number'},{'data':'x';'type':'str'},{'data':'y';'type':'str'},4] #cond_func_args is a array def cond_func(index,value,cond_func_args): ''' ...
0.01197
def device_add(self, mountpoint, *device): """ Add one or more devices to btrfs filesystem mounted under `mountpoint` :param mountpoint: mount point of the btrfs system :param devices: one ore more devices to add :return: """ if len(device) == 0: retu...
0.003922
def get_box_files(self, box_key): '''Gets to file infos in a single box. Args: box_key key for the file return (status code, list of file info dicts) ''' uri = '/'.join([self.api_uri, self.boxes_suffix, box_key, self.files_suffix ]) return self._req('get', uri)
0.059016
def get_by_index(self, i): """Look up a gene set by its index. Parameters ---------- i: int The index of the gene set. Returns ------- GeneSet The gene set. Raises ------ ValueError If the given index ...
0.003565
def set_contents_from_file(self, fp, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None, reduced_redundancy=False, query_args=None, encrypt_key=False, size=None): """ Store an object in S3 usi...
0.001349
def bedpe(args): """ %prog bedpe bedfile Convert to bedpe format. Use --span to write another bed file that contain the span of the read pairs. """ from jcvi.assembly.coverage import bed_to_bedpe p = OptionParser(bedpe.__doc__) p.add_option("--span", default=False, action="store_true",...
0.003956
def get_area_def(self, dsid): """Get area definition for message. If latlong grid then convert to valid eqc grid. """ msg = self._get_message(self._msg_datasets[dsid]) try: return self._area_def_from_msg(msg) except (RuntimeError, KeyError): rais...
0.005362
def jco_from_pestpp_runstorage(rnj_filename,pst_filename): """ read pars and obs from a pest++ serialized run storage file (e.g., .rnj) and return pyemu.Jco. This can then be passed to Jco.to_binary or Jco.to_coo, etc., to write jco file in a subsequent step to avoid memory resource issues associated with...
0.013523
def com_google_fonts_check_metadata_valid_copyright(font_metadata): """Copyright notices match canonical pattern in METADATA.pb""" import re string = font_metadata.copyright does_match = re.search(r'Copyright [0-9]{4} The .* Project Authors \([^\@]*\)', string) if does_match: yi...
0.013514
def findHTMLMeta(stream): """Look for a meta http-equiv tag with the YADIS header name. @param stream: Source of the html text @type stream: Object that implements a read() method that works like file.read @return: The URI from which to fetch the XRDS document @rtype: str @raises Meta...
0.000895
def paste(self, *args): """ Usage: paste([PSMRL], text) If a pattern is specified, the pattern is clicked first. Doesn't support text paths. ``text`` is pasted as is using the OS paste shortcut (Ctrl+V for Windows/Linux, Cmd+V for OS X). Note that `paste()` does NOT use special formatti...
0.00609
def extend_distribution_substation_overvoltage(network, critical_stations): """ Reinforce MV/LV substations due to voltage issues. A parallel standard transformer is installed. Parameters ---------- network : :class:`~.grid.network.Network` critical_stations : :obj:`dict` Dictionar...
0.000434
def unique_deps(deps): """Remove duplicities from deps list of the lists""" deps.sort() return list(k for k, _ in itertools.groupby(deps))
0.006667
def sim(adata, tmax_realization=None, as_heatmap=False, shuffle=False, show=None, save=None): """Plot results of simulation. Parameters ---------- as_heatmap : bool (default: False) Plot the timeseries as heatmap. tmax_realization : int or None (default: False) Number of obs...
0.003568
def add_server(self,address,port=default_port,password=None,speed=None,valid_times=None,invalid_times=None): ''' :address: remote address of server, or special string ``local`` to run the command locally :valid_times: times when this server is availabl...
0.014247
def _init_metadata(self): """stub""" self._learning_objective_id_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'learning_objective_id'), 'element_label': 'Learning ...
0.002461
def gvd(self, wavelength): ''' The group velocity dispersion (GVD) with respect to wavelength. Args: wavelength (float, list, None): The wavelength(s) the GVD will be evaluated at. Returns: float, list: The GVD at the target wavelength(s). ...
0.007075
def list_users(root=None): ''' .. versionadded:: 2018.3.0 Return a list of all shadow users root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.list_users ''' if root is not None: getspall = functools.partial(_getspall, root=root) ...
0.001988
def add_command_hooks(commands, srcdir='.'): """ Look through setup_package.py modules for functions with names like ``pre_<command_name>_hook`` and ``post_<command_name>_hook`` where ``<command_name>`` is the name of a ``setup.py`` command (e.g. build_ext). If either hook is present this adds a wr...
0.000596
def do_alarm_update(mc, args): '''Update the alarm state.''' fields = {} fields['alarm_id'] = args.id if args.state.upper() not in state_types: errmsg = ('Invalid state, not one of [' + ', '.join(state_types) + ']') print(errmsg) return field...
0.002985
def get_queues(self, service_desk_id, include_count=False, start=0, limit=50): """ Returns a page of queues defined inside a service desk, for a given service desk ID. The returned queues will include an issue count for each queue (represented in issueCount field) if the query param incl...
0.005792
def toxml(self): """ Exports this object into a LEMS XML object """ xmlstr = '<ConditionalDerivedVariable name="{0}"'.format(self.name) +\ (' dimension="{0}"'.format(self.dimension) if self.dimension else '') +\ (' exposure="{0}"'.format(self.exposure) if self.exposu...
0.011589
def __get_language_data(self, bundleId, languageId, fallback=False): """``GET /{serviceInstanceId}/v2/bundles/{bundleId}/{languageId}`` Gets the resource strings (key/value pairs) for the language. If ``fallback`` is ``True``, source language value is used if translated value is no...
0.002766
def soft_define_alias(self, name, cmd): """Define an alias, but don't raise on an AliasError.""" try: self.define_alias(name, cmd) except AliasError, e: error("Invalid alias: %s" % e)
0.008658
def rerun(client, run, job): """Re-run existing workflow or tool using CWL runner.""" from renku.models.provenance import ProcessRun activity = client.process_commmit() if not isinstance(activity, ProcessRun): click.secho('No tool was found.', fg='red', file=sys.stderr) return try:...
0.001271
def get_next_sibling(self): """ :returns: The next node's sibling, or None if it was the rightmost sibling. """ siblings = self.get_siblings() ids = [obj.pk for obj in siblings] if self.pk in ids: idx = ids.index(self.pk) i...
0.005168
def repo_exists(self, auth, username, repo_name): """ Returns whether a repository with name ``repo_name`` owned by the user with username ``username`` exists. :param auth.Authentication auth: authentication object :param str username: username of owner of repository :param str ...
0.005857
def get_html_tag_lang_params(index_page): """ Parse lang and xml:lang parameters in the ``<html>`` tag. See https://www.w3.org/International/questions/qa-html-language-declarations for details. Args: index_page (str): HTML content of the page you wisht to analyze. Returns: ...
0.001083
def _outputMessages(self, warnings, node): """ Map pycodestyle results to messages in pylint, then output them. @param warnings: it should be a list of tuple including line number and message id """ if not warnings: # No warnings were found return...
0.004902
def expand(self, model=None, ignoreFilter=False): """ Expands any shortcuts that were created for this query. Shortcuts provide the user access to joined methods using the '.' accessor to access individual columns for referenced tables. :param model | <orb.Model> |...
0.003809
def reset_title(self, title, notebook_identifier): """Triggered whenever a notebook tab is switched in the left bar. Resets the title of the un-docked window to the format 'upper_open_tab / lower_open_tab' :param title: The name of the newly selected tab :param notebook: string taking ...
0.005057
def backup_database(args): ''' Backup one database from CLI ''' username = args.get('<user>') password = args.get('<password>') database = args['<database>'] host = args.get('<host>') or '127.0.0.1' path = args.get('--path') or os.getcwd() s3 = args.get('--upload_s3') glacier = a...
0.000751
def check_length(value, length): """ Checks length of value @param value: value to check @type value: C{str} @param length: length checking for @type length: C{int} @return: None when check successful @raise ValueError: check failed """ _length = len(value) if _length != ...
0.004673
def submit(self, job): """ Submit job to the engine Args: job (pyccc.job.Job): Job to submit """ self._check_job(job) if job.workingdir is None: job.workingdir = self.default_wdir job.imageid = du.create_provisioned_image(self.client, job.image, ...
0.004249
def check_exclamations_ppm(text): """Make sure that the exclamation ppm is under 30.""" err = "leonard.exclamation.30ppm" msg = u"More than 30 ppm of exclamations. Keep them under control." regex = r"\w!" count = len(re.findall(regex, text)) num_words = len(text.split(" ")) ppm = (count*1...
0.00202
def replace(self, pattern, replacement_pattern, **kwargs): """ Replaces current given pattern occurence in the document with the replacement pattern. Usage:: >>> script_editor = Umbra.components_manager.get_interface("factory.script_editor") True >>> codeEdi...
0.006963
def unique_iterator(seq): """ Returns an iterator containing all non-duplicate elements in the input sequence. """ seen = set() for item in seq: if item not in seen: seen.add(item) yield item
0.004049
def pitch(times, frequencies, midi=False, unvoiced=False, ax=None, **kwargs): '''Visualize pitch contours Parameters ---------- times : np.ndarray, shape=(n,) Sample times of frequencies frequencies : np.ndarray, shape=(n,) frequencies (in Hz) of the pitch contours. Voicing...
0.00038
def convexhull(data, col, fill=True, point_size=4): """ Convex hull for a set of points :param data: points :param col: color :param fill: whether to fill the convexhull polygon or not :param point_size: size of the points on the convexhull. Points are not rendered if None """ from geop...
0.004598
def getDraftThingType(self, thingTypeId, parameters = None): """ Retrieves all existing draft thing types. It accepts accepts an optional query parameters (Dictionary) In case of failure it throws APIException """ draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.ho...
0.008463
def contains_duplicates(values: Iterable[Any]) -> bool: """ Does the iterable contain any duplicate values? """ for v in Counter(values).values(): if v > 1: return True return False
0.004525
def _serial_send(self, port, payload): ''' Send data to connected device. Parameters ---------- port : str Device name/port. payload : bytes Payload to send to device. ''' if port not in self.open_devices: # Not connect...
0.002695
def handleProfileChange(self): """ Emits that the current profile has changed. """ # restore the profile settings prof = self.currentProfile() vwidget = self.viewWidget() if vwidget: prof.restore(vwidget) if not self.signalsBlocked(...
0.010283
def send_calibrate_barometer(self): """Request barometer calibration.""" calibration_command = self.message_factory.command_long_encode( self._handler.target_system, 0, # target_system, target_component mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION, # command 0, #...
0.004184
def events(network, previous_state, current_state, next_state, nodes, mechanisms=False): """Find all events (mechanisms with actual causes and actual effects).""" actual_causes = _actual_causes(network, previous_state, current_state, nodes, mechanisms) actual_ef...
0.000896
def make_local_settings(argv=None): """Generate a local settings file. The most common usage is: make-local-settings <env> where env is replaced with and environment name such as stage or prod. For example: make-local-settings prod This will create a local settings file named lo...
0.002027
def parse_bookmark_node (node): """Parse one JSON node of Chromium Bookmarks.""" if node["type"] == "url": yield node["url"], node["name"] elif node["type"] == "folder": for child in node["children"]: for entry in parse_bookmark_node(child): yield entry
0.006472
def register_minter(self, name, minter): """Register a minter. :param name: Minter name. :param minter: The new minter. """ assert name not in self.minters self.minters[name] = minter
0.008621
def get_jids(): ''' Return all job data from all returners ''' ret = {} for returner_ in __opts__[CONFIG_KEY]: ret.update(_mminion().returners['{0}.get_jids'.format(returner_)]()) return ret
0.004484
def frequency_app(parser, cmd, args): # pragma: no cover """ perform frequency analysis on a value. """ parser.add_argument('value', help='the value to analyse, read from stdin if omitted', nargs='?') args = parser.parse_args(args) data = frequency(six.iterbytes(pwnypack.main.binary_value_or_s...
0.005405
def conflicting_pairs(left, right): """Yield all ``(object, property)`` pairs where the two definitions disagree.""" objects = left._objects & right._objects properties = left._properties & right._properties difference = left._pairs ^ right._pairs for o in objects: for p in properties: ...
0.005263
def _unwrap_one_layer(r, L, n): """For a set of points in a 2 dimensional periodic system, extend the set of points to tile the points at a given period. Parameters ---------- r: float array, shape (:, 2). Set of points. L: float array, shape (2,) System lengths. n: integer....
0.00226
def verify_response_time(self, expected_below): """ Verify that response time (time span between request-response) is reasonable. :param expected_below: integer :return: Nothing :raises: ValueError if timedelta > expected time """ if self.timedelta > expected_bel...
0.006438
def parse_hpo_diseases(hpo_lines): """Parse hpo disease phenotypes Args: hpo_lines(iterable(str)) Returns: diseases(dict): A dictionary with mim numbers as keys """ diseases = {} LOG.info("Parsing hpo diseases...") for index, line in enumerate(hp...
0.002928
def get_doc(self, tag_name): "Get documentation for the first tag matching the given name" for tag,func in self.tags: if tag.startswith(tag_name) and func.__doc__: return func.__doc__
0.013216
def put_http_connection(self, host, is_secure, conn): """ Adds a connection to the pool of connections that can be reused for the named host. """ with self.mutex: key = (host, is_secure) if key not in self.host_to_pool: self.host_to_pool[ke...
0.005128
async def restart_walk(self): """ Force a re-walk """ if not self._restartwalk: self._restartwalk = True await self.wait_for_send(FlowUpdaterNotification(self, FlowUpdaterNotification.STARTWALK))
0.011952
def get_html_values(self, pydict, recovery_name=True): """Convert naive get response data to human readable field name format. using html data format. """ new_dict = {"id": pydict["id"]} for field in self: if field.key in pydict: if recovery_n...
0.00611
def clean_security_hash(self): """Check the security hash.""" security_hash_dict = { 'content_type': self.data.get("content_type", ""), 'object_pk': self.data.get("object_pk", ""), 'timestamp': self.data.get("timestamp", ""), } expected_hash = self.gen...
0.003436
def insert_df(self, table_name, df): """Create a table and populate it with data from a dataframe.""" df.to_sql(table_name, con=self.own_connection)
0.012195
def register_predictor(cls, name): """Register method to keep list of predictors.""" def decorator(subclass): """Register as decorator function.""" cls._predictors[name.lower()] = subclass subclass.name = name.lower() return subclass return decorat...
0.006211
def join(self, glue=" "): """ Javascript's join implementation """ j = glue.join([str(x) for x in self.obj]) return self._wrap(j)
0.012422
def mac_set_relative_dylib_deps(libname): """ On Mac OS X set relative paths to dynamic library dependencies of `libname`. Relative paths allow to avoid using environment variable DYLD_LIBRARY_PATH. There are known some issues with DYLD_LIBRARY_PATH. Relative paths is more flexible mechanism. ...
0.00176
def get_logged_in_account(token_manager=None, app_url=defaults.APP_URL): """ get the account details for logged in account of the auth token_manager """ return get_logged_in_account(token_manager=token_manager, app_url=app_url)['id']
0.003236
def inspect_to_container_metadata(c_metadata_object, inspect_data, image_instance): """ process data from `docker container inspect` and update provided container metadata object :param c_metadata_object: instance of ContainerMetadata :param inspect_data: dict, metadata from `docker inspect` or `docker...
0.002846
def soft_kill(jid, state_id=None): ''' Set up a state run to die before executing the given state id, this instructs a running state to safely exit at a given state id. This needs to pass in the jid of the running state. If a state_id is not passed then the jid referenced will be safely exited a...
0.000978
def update_member_data(self, member, member_data): ''' Update the optional member data for a given member in the leaderboard. @param member [String] Member name. @param member_data [String] Optional member data. ''' self.update_member_data_in(self.leaderboard_name, membe...
0.00597
def set_in(self, que_in, num_senders): """Set the queue in input and the number of parallel tasks that send inputs""" for p in self.processes: p.set_in(que_in, num_senders)
0.015
def p12d_local(vertices, lame, mu): """Local stiffness matrix for P1 elements in 2d.""" assert(vertices.shape == (3, 2)) A = np.vstack((np.ones((1, 3)), vertices.T)) PhiGrad = inv(A)[:, 1:] # gradients of basis functions R = np.zeros((3, 6)) R[[[0], [2]], [0, 2, 4]] = PhiGrad.T R[[[2], [1]...
0.001931
def remove_terms(self, terms, ignore_absences=False): '''Non destructive term removal. Parameters ---------- terms : list list of terms to remove ignore_absences : bool, False by default if term does not appear, don't raise an error, just move on. ...
0.005396
def loggerLevel(self, logger='root'): """ Returns the logging level for the inputed logger. :param logger | <str> || <logging.Logger> """ if isinstance(logger, logging.Logger): logger = logger.name return self.handler().loggerLe...
0.012085
def getTypeWidth(self, dtype: "HdlType", do_eval=False) -> Tuple[int, str, bool]: """ :return: tuple (current value of width, string of value (can be ID or int), Flag which specifies if width of signal is locked or can be changed by parameter) """ rais...
0.007444
def getElementsByClassName(self, className, root='root', useIndex=True): ''' getElementsByClassName - Searches and returns all elements containing a given class name. @param className <str> - A one-word class name @param root <AdvancedTag/'root'> - Sea...
0.006393
def run(self, steps=1000): "Run the Environment for given number of time steps." for step in range(steps): if self.is_done(): return self.step()
0.016304
def dt_to_struct_time(dt): """ Convert a `datetime.date` or `datetime.datetime` to a `struct_time` representation *with zero values* for data fields that we cannot always rely on for ancient or far-future dates: tm_wday, tm_yday, tm_isdst NOTE: If it wasn't for the requirement that the extra fields...
0.0012
def reset(self, *args): """Resets any of the tokens for this Application. Note that you may have to reauthenticate afterwards. Usage: application.reset('api_token') application.reset('api_token', 'totp_secret') Args: *args (list of str): one or more of ...
0.003906
def recalculate_stock_values_into_base(self): """ Loads the exchange rates and recalculates stock holding values into base currency """ from .currency import CurrencyConverter conv = CurrencyConverter() cash = self.model.get_cash_asset_class() for stock in self.model.s...
0.004021
def wrap_spark_sql_udf(self, name, package_name=None, object_name=None, java_class_instance=None, doc=""): """Wraps a scala/java spark user defined function """ def _(*cols): jcontainer = self.get_java_container(package_name=package_name, object_name=object_name, java_class_instance=java_cla...
0.007776
def plot(*args, legend=None, title=None, x_axis_label="Time (s)", y_axis_label=None, grid_plot=False, grid_lines=None, grid_columns=None, hor_lines=None, hor_lines_leg=None, vert_lines=None, vert_lines_leg=None, apply_opensignals_style=True, show_plot=True, warn_print=False, get_fig_list=Fals...
0.005218
def interpolate_na(self, dim=None, method='linear', limit=None, use_coordinate=True, **kwargs): """Interpolate values according to different methods. Parameters ---------- dim : str Specifies the dimension along which to interpol...
0.001888
def stream(self): """The workhorse of cinje: transform input lines and emit output lines. After constructing an instance with a set of input lines iterate this property to generate the template. """ if 'init' not in self.flag: root = True self.prepare() else: root = False # Track which lin...
0.039242
def read(cls, source, *args, **kwargs): """Read data from a source into a `gwpy.timeseries` object. This method is just the internal worker for `TimeSeries.read`, and `TimeSeriesDict.read`, and isn't meant to be called directly. """ # if reading a cache, read it now and sieve if io_cache.is_cac...
0.001279
def set_locale(locale): ''' Sets the current system locale CLI Example: .. code-block:: bash salt '*' locale.set_locale 'en_US.UTF-8' ''' lc_ctl = salt.utils.systemd.booted(__context__) # localectl on SLE12 is installed but the integration is broken -- config is rewritten by YaST2...
0.001248
def create_group(self, data): """Create a Group.""" # http://teampasswordmanager.com/docs/api-groups/#create_group log.info('Create group with %s' % data) NewID = self.post('groups.json', data).get('id') log.info('Group has been created with ID %s' % NewID) return NewID
0.006289
def get_parameters(self): """returns a dictionary with the processor's stored parameters""" parameter_names = self.PARAMETERS.keys() # TODO: Unresolved reference for processor parameter_values = [getattr(processor, n) for n in parameter_names] return dict(zip(parameter_names, par...
0.00597
def sign(payload, key, headers=None, algorithm=ALGORITHMS.HS256): """Signs a claims set and returns a JWS string. Args: payload (str): A string to sign key (str or dict): The key to use for signing the claim set. Can be individual JWK or JWK set. headers (dict, optional): A ...
0.001527
def draw(self, ar, can, x_tick, x_label, y): """Draw a legend entry. X_TICK and X_LABEL are the X location \ (in points) of where the sample and label are drawn.""" rect_size = self.get_rect_size() line_len = self.get_line_len() nr_lines = len(self.label.split("\n")) te...
0.005348
def simulate(self, steps, time, collect_dynamic = False): """! @brief Performs static simulation of oscillatory network. @param[in] steps (uint): Number simulation steps. @param[in] time (double): Time of simulation. @param[in] collect_dynamic (bool): If True - ret...
0.020651
def _process_genes_kegg2ncbi(self, limit=None): """ This method maps the KEGG human gene IDs to the corresponding NCBI Gene IDs. Triples created: <kegg_gene_id> is a class <ncbi_gene_id> is a class <kegg_gene_id> equivalentClass <ncbi_gene_id> :param ...
0.001647
def merge_by_adding_new_alts(self, other, ref_seq): '''Adds other VcfRecord to this one, by adding new field(s) in the ALT column. Also adds REF nucleotides if they are needed. eg: ref: ACGT this var: pos=3, REF=T, ALT=A other var: pos=1, REF=C, ALT=T will change this var...
0.003043
def encode(cls, document, check_keys=False, codec_options=DEFAULT_CODEC_OPTIONS): """Encode a document to a new :class:`BSON` instance. A document can be any mapping type (like :class:`dict`). Raises :class:`TypeError` if `document` is not a mapping type, or contains key...
0.002593
def run(pcap): """ Runs all configured IDS instances against the supplied pcap. :param pcap: File path to pcap file to analyse :returns: Dict with details and results of run/s """ start = datetime.now() errors = [] status = STATUS_FAILED analyses = [] pool = ThreadPool(MAX_THREA...
0.007373
def fit(self, X, R): """Compute Hierarchical Topographical Factor Analysis Model [Manning2014-1][Manning2014-2] Parameters ---------- X : list of 2D arrays, element i has shape=[voxels_i, samples] Each element in the list contains the fMRI data of one subject. ...
0.001832
def process_post_form(self, success_message=None): """ As long as the form is set on the view this method will validate the form and save the submitted data. Only call this if you are posting data. The given success_message will be used with the djanog messages framework if the ...
0.003872
def date_map(doc, datemap_list, time_format=None): ''' For all the datetime fields in "datemap" find that key in doc and map the datetime object to a strftime string. This pprint and others will print out readable datetimes. ''' if datemap_list: for i in datemap_list:...
0.012739
def terms_updated(sender, **kwargs): """Called when terms and conditions is changed - to force cache clearing""" LOGGER.debug("T&C Updated Signal Handler") cache.delete('tandc.active_terms_ids') cache.delete('tandc.active_terms_list') if kwargs.get('instance').slug: cache.delete('tandc.activ...
0.002028
def _allocate_address(self, instance, network_ids): """ Allocates a floating/public ip address to the given instance. :param instance: instance to assign address to :param list network_id: List of IDs (as strings) of networks where to request allocation the floating IP. ...
0.002911