text
stringlengths
78
104k
score
float64
0
0.18
def is_parent_of(self, parent, child): """Return whether ``child`` is a branch descended from ``parent`` at any remove. """ if parent == 'trunk': return True if child == 'trunk': return False if child not in self._branches: raise Value...
0.003344
def multizone_member_added(self, member_uuid): """Handle added audio group member.""" casts = self._casts if member_uuid not in casts: casts[member_uuid] = {'listeners': [], 'groups': set()} casts[member_uuid]['groups'].add(self._group_uuid) ...
0.004545
def is_packet_type(cls): """Check if class is one the packet types.""" from .packet_types import EddystoneUIDFrame, EddystoneURLFrame, \ EddystoneEncryptedTLMFrame, EddystoneTLMFrame, \ EddystoneEIDFrame, IBeaconAdvertisement, \ ...
0.012987
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest relative neighbor distance-based method with O'Keeffe parameters. Args: structure (Structure): input ...
0.002962
def find(self, path, all=False): """ Looks for files in the app directories. """ matches = [] for app in self.apps: app_location = self.storages[app].location if app_location not in searched_locations: searched_locations.append(app_location...
0.003899
def client(self): """Get an elasticsearch client """ if not hasattr(self, "_client"): self._client = connections.get_connection("default") return self._client
0.009901
def delete(self, path, data=None, headers=None, params=None): """ Deletes resources at given paths. :rtype: dict :return: Empty dictionary to have consistent interface. Some of Atlassian REST resources don't return any content. """ self.request('DELETE', path=path...
0.008242
def vcsNodeState_nodeRbridgeid(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") vcsNodeState = ET.SubElement(config, "vcsNodeState", xmlns="urn:brocade.com:mgmt:brocade-vcs") nodeRbridgeid = ET.SubElement(vcsNodeState, "nodeRbridgeid") nodeRbridge...
0.006696
def newarray(self, length, value=0): """Initialise empty row""" if self.bitdepth > 8: return array('H', [value] * length) else: return bytearray([value] * length)
0.009524
def create_vault(self, *args, **kwargs): """Pass through to provider VaultAdminSession.create_vault""" # Implemented from kitosid template for - # osid.resource.BinAdminSession.create_bin return Vault( self._provider_manager, self._get_provider_session('vault_admi...
0.007246
def set_entry(key, value): """ Set a configuration entry :param key: key name :param value: value for this key :raises KeyError: if key is not str """ if type(key) != str: raise KeyError('key must be str') _config[key] = value
0.003745
def get_tables(self, db_name, pattern): """ Parameters: - db_name - pattern """ self.send_get_tables(db_name, pattern) return self.recv_get_tables()
0.005618
def toBCD (n): """Converts the number n into Binary Coded Decimal.""" bcd = 0 bits = 0 while True: n, r = divmod(n, 10) bcd |= (r << bits) if n is 0: break bits += 4 return bcd
0.020325
def notify(self, data): """Notify this channel of inbound data""" string_channels = { ChannelIdentifiers.de_registrations, ChannelIdentifiers.registrations_expired } if data['channel'] in string_channels: message = {'device_id': data["value"], 'channe...
0.004132
def process_composite(self, response): """ Process a composite response. composites do not have inter item separators as they appear joined. We need to respect the universal options too. """ composite = response["composite"] # if the composite is of not Composite...
0.001065
def set_welcome_message(self): """Create and insert welcome message.""" string = html_header() string += welcome_message().to_html() string += html_footer() self.welcome_message.setHtml(string)
0.008584
def send(message, **kwargs): """Send a SocketIO message. This function sends a simple SocketIO message to one or more connected clients. The message can be a string or a JSON blob. This is a simpler version of ``emit()``, which should be preferred. This is a function that can only be called from a ...
0.000394
def validate_stream(stream): """ Check that the stream name is well-formed. """ if not STREAM_REGEX.match(stream) or len(stream) > MAX_STREAM_LENGTH: raise InvalidStreamName(stream)
0.015544
def __vDecodeDIGICAMConfigure(self, mCommand_Long): if mCommand_Long.param1 != 0: print ("Exposure Mode = %d" % mCommand_Long.param1) if mCommand_Long.param1 == self.ProgramAuto: self.__vCmdSetCamExposureMode(["Program Auto"]) elif mC...
0.008958
def inputConnections(self, cls=None): """ Returns a list of input connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..] """ scene = self...
0.0131
def file_input(parser, body): """file_input: (NEWLINE | stmt)* ENDMARKER""" body = reduce(list.__add__, body, []) loc = None if body != []: loc = body[0].loc return ast.Module(body=body, loc=loc)
0.008097
def to_red(self, on: bool=False): """ Change the LED to red (on or off) :param on: True or False :return: None """ self._on = on if on: self._load_new(led_red_on) if self._toggle_on_click: self._canvas.bind('<Button-1>', la...
0.007797
def reactions_add(self, *, name: str, **kwargs) -> SlackResponse: """Adds a reaction to an item. Args: name (str): Reaction (emoji) name. e.g. 'thumbsup' channel (str): Channel where the message to add reaction to was posted. e.g. 'C1234567890' timest...
0.007859
def action_webimport(hrlinetop=False): """ select from the available online directories for import """ DIR_OPTIONS = {1: "http://lov.okfn.org", 2: "http://prefix.cc/popular/"} selection = None while True: if hrlinetop: printDebug("----------") text = "Please select whi...
0.003172
def fixed_padding(inputs, kernel_size, data_format): """Pads the input along the spatial dimensions independently of input size. Args: inputs: A tensor of size [batch, channels, height_in, width_in] or [batch, height_in, width_in, channels] depending on data_format. kernel_size: The kernel to be used...
0.007641
def output(self, _filename): """ _filename is not used Args: _filename(string) """ txt = '' for c in self.contracts: txt += "\nContract %s\n"%c.name table = PrettyTable(['Variable', 'Dependencies']) for v in c.s...
0.004499
def draw_qubit_graph(G, layout, linear_biases={}, quadratic_biases={}, nodelist=None, edgelist=None, cmap=None, edge_cmap=None, vmin=None, vmax=None, edge_vmin=None, edge_vmax=None, **kwargs): """Draws graph G according to layout. If `linear_biases...
0.001787
def p_expression_unot(self, p): 'expression : NOT expression %prec UNOT' p[0] = Unot(p[2], lineno=p.lineno(1)) p.set_lineno(0, p.lineno(1))
0.01227
def update_readme(self, content): """Update the readme descriptive metadata.""" logger.debug("Updating readme") key = self.get_readme_key() # Back up old README content. backup_content = self.get_readme_content() backup_key = key + "-{}".format( timestamp(dat...
0.003945
def enable_autocenter(self, option): """Set ``autocenter`` behavior. Parameters ---------- option : {'on', 'override', 'once', 'off'} Option for auto-center behavior. A list of acceptable options can also be obtained by :meth:`get_autocenter_options`. Ra...
0.00299
def positions_to_contigs(positions): """Flattens and converts a positions array to a contigs array, if applicable. """ if isinstance(positions, np.ndarray): flattened_positions = positions.flatten() else: try: flattened_positions = np.array( [pos for contig i...
0.002315
def cancelled(self): """Return whether this future was successfully cancelled.""" return self._state == self.S_EXCEPTION and isinstance(self._result, Cancelled)
0.017045
async def get_all_leases(self): """ Return the lease info for all partitions. A typical implementation could just call get_lease_async() on all partitions. :return: A list of lease info. :rtype: list[~azure.eventprocessorhost.lease.Lease] """ lease_futures = [] ...
0.007366
def verify_unsigned_tx(unsigned_tx, outputs, inputs=None, sweep_funds=False, change_address=None, coin_symbol='btc'): ''' Takes an unsigned transaction and what was used to build it (in create_unsigned_tx) and verifies that tosign_tx matches what is being signed and what was reque...
0.003247
def read(self, n): """ return at most n array items, move the cursor. """ while len(self.pool) < n: self.cur = self.files.next() self.pool = numpy.append(self.pool, self.fetch(self.cur), axis=0) rt = self.pool[:n] if n == len(self.poo...
0.009217
def _EccZmaxRperiRap(self,*args,**kwargs): """ NAME: _EccZmaxRperiRap PURPOSE: evaluate the eccentricity, maximum height above the plane, peri- and apocenter for an isochrone potential INPUT: Either: a) R,vR,vT,z,vz[,phi]: 1...
0.022718
def runPermutations(args): """ The main function of the RunPermutations utility. This utility will automatically generate and run multiple prediction framework experiments that are permutations of a base experiment via the Grok engine. For example, if you have an experiment that you want to test with 3 possib...
0.005468
def get_raw(self): """ Get the reconstructed code as bytearray :rtype: bytearray """ code_raw = self.code.get_raw() self.insns_size = (len(code_raw) // 2) + (len(code_raw) % 2) buff = bytearray() buff += pack("<H", self.registers_size) + \ ...
0.009627
def Start(self): """Issue a request to list the directory.""" self.CallClient( server_stubs.PlistQuery, request=self.args.request, next_state="Receive")
0.005435
def _split(rule): """Splits a rule whose len(rhs) > 2 into shorter rules.""" rule_str = str(rule.lhs) + '__' + '_'.join(str(x) for x in rule.rhs) rule_name = '__SP_%s' % (rule_str) + '_%d' yield Rule(rule.lhs, [rule.rhs[0], NT(rule_name % 1)], weight=rule.weight, alias=rule.alias) for i in xrange(1,...
0.007477
def set_boot_script(self, filename): """ :: POST /:login/machines/:id/metadata :param filename: file path to the script to be uploaded and executed at boot on the machine :type filename: :py:class:`basestring` Replace the existin...
0.009868
def dump_type(self, obj): """Dump the text name of the relation.""" if not isinstance(obj.relation_type, RelationType): return resolve_relation_type_config(obj.relation_type).name else: return obj.relation_type.name
0.007605
def astensor(array: TensorLike) -> BKTensor: """Convert to product tensor""" tensor = tf.convert_to_tensor(array, dtype=CTYPE) if DEVICE == 'gpu': tensor = tensor.gpu() # pragma: no cover # size = np.prod(np.array(tensor.get_shape().as_list())) N = int(math.log2(size(tensor))) tensor =...
0.002725
def remove_links(text): """ Helper function to remove the links from the input text Args: text (str): A string Returns: str: the same text, but with any substring that matches the regex for a link removed and replaced with a space Example: >>> from tweet_parser.get...
0.005096
def _set(self, key, value, identity='image'): """ Serializing, prefix wrapper for _set_raw """ if identity == 'image': s = serialize_image_file(value) else: s = serialize(value) self._set_raw(add_prefix(key, identity), s)
0.006826
def fcoe_get_login_input_fcoe_login_vfid(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") fcoe_get_login = ET.Element("fcoe_get_login") config = fcoe_get_login input = ET.SubElement(fcoe_get_login, "input") fcoe_login_vfid = ET.SubElement(...
0.004024
def applied_scroll_offsets(self): """ Return a :class:`.ScrollOffsets` instance that indicates the actual offset. This can be less than or equal to what's configured. E.g, when the cursor is completely at the top, the top offset will be zero rather than what's configured. ...
0.004845
def get(self, key, default=None): """ Retrieve the given configuration option. Configuration options that can be queried this way are those that are specified without prefix in the paste.ini file, or which are specified in the '[turnstile]' section of the configuration f...
0.004065
def template_response(self, template_name, headers={}, **values): """ Constructs a response, allowing custom template name and content_type """ response = make_response( self.render_template(template_name, **values)) for field, value in headers.items(): r...
0.005291
def print_dependencies(_run): """Print the detected source-files and dependencies.""" print('Dependencies:') for dep in _run.experiment_info['dependencies']: pack, _, version = dep.partition('==') print(' {:<20} == {}'.format(pack, version)) print('\nSources:') for source, digest i...
0.00134
def _prepare_conn(self, conn): """ Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket` and establish the tunnel if proxy is used. """ if isinstance(conn, VerifiedHTTPSConnection): conn.set_cert(key_file=self.key_file, cert_fi...
0.002327
def _validate_value_types(self, **kwargs): """Raises a TypeError for non-string values. The only legal non-string value if we allow valueless options is None, so we need to check if the value is a string if: - we do not allow valueless options, or - we allow valueless op...
0.001031
def _make_intersection(edge_info, all_edge_nodes): """Convert a description of edges into a curved polygon. .. note:: This is a helper used only by :meth:`.Surface.intersect`. Args: edge_info (Tuple[Tuple[int, float, float], ...]): Information describing each edge in the curved...
0.000858
def list_versions(self, project): """ Lists all deployed versions of a specific project. First class, maps to Scrapyd's list versions endpoint. """ url = self._build_url(constants.LIST_VERSIONS_ENDPOINT) params = {'project': project} json = self.client.get(url, pa...
0.005181
def xmlChromatogramFromCi(index, ci, compression='zlib'): """ #TODO: docstring :param index: #TODO: docstring :param ci: #TODO: docstring :param compression: #TODO: docstring :returns: #TODO: docstring """ arrayLength = [array.size for array in viewvalues(ci.arrays)] if len(set(arrayLen...
0.001706
def isPointInsidePolygon(x, y, vertices_x, vertices_y): """Check if a given point is inside a polygon. Parameters vertices_x[] and vertices_y[] define the polygon. The number of array elements is equal to number of vertices of the polygon. This function works for convex and concave polygons. Param...
0.00103
async def async_execute(self, command: Command, password: str = '', timeout: int = EXECUTE_TIMEOUT_SECS) -> Response: """ Execute a command and return response. command: the command instance to be executed password: if specified, will be used to execute ...
0.005848
def mark_deactivated(self,request,queryset): """An admin action for marking several cages as inactive. This action sets the selected cages as Active=False and Death=today. This admin action also shows as the output the number of mice sacrificed.""" rows_updated = queryset.update(Activ...
0.020443
def copy_topology_image(source, target): """ Copy any images of the topology to the converted topology :param str source: Source topology directory :param str target: Target Directory """ files = glob.glob(os.path.join(source, '*.png')) for file in files: shutil.copy(file, target)
0.003135
def show_error_dialog(self, message, details=None): """ Convenience method for showing an error dialog. """ dlg = Gtk.MessageDialog(type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK, message_format=message) if details is not None: ...
0.010127
def _apply_common_rules(self, part, maxlength): """This method contains the rules that must be applied to both the domain and the local part of the e-mail address. """ part = part.strip() if self.fix: part = part.strip('.') if not part: ...
0.011407
def predict(self, peptides, allele_encoding=None, batch_size=4096): """ Predict affinities. If peptides are specified as EncodableSequences, then the predictions will be cached for this predictor as long as the EncodableSequences object remains in memory. The cache is keyed in t...
0.005451
def get_help(command): """ Get the Cmd help function from the click command :param command: The click Command object :return: the help_* method for Cmd :rtype: function """ assert isinstance(command, click.Command) def help_(self): # pylint: disable=unused-argument extra = {} ...
0.002865
def response_change(self, request, obj): """ Overrides the default to be able to forward to the directory listing instead of the default change_list_view """ r = super(FolderAdmin, self).response_change(request, obj) # Code borrowed from django ModelAdmin to determine cha...
0.001835
def register_layer(self, layer): """ Register one connected layer. :type layer: NeuralLayer """ if self.fixed: raise Exception("After a block is fixed, no more layers can be registered.") self.layers.append(layer)
0.010989
def shutdown_host(kwargs=None, call=None): ''' Shut down the specified host system in this VMware environment .. note:: If the host system is not in maintenance mode, it will not be shut down. If you want to shut down the host system regardless of whether it is in maintenance mode, ...
0.003915
def mean_values(self): """ the mean value vector while respecting log transform Returns ------- mean_values : pandas.Series """ if not self.istransformed: return self.pst.parameter_data.parval1.copy() else: # vals = (self.pst.parameter_da...
0.003373
def parseExtensionArgs(self, args, strict=False): """Parse the unqualified simple registration request parameters and add them to this object. This method is essentially the inverse of C{L{getExtensionArgs}}. This method restores the serialized simple registration request fields...
0.001233
def updateSchema(self, schemaId, schemaDefinition): """ Update a schema. Throws APIException on failure. """ req = ApiClient.oneSchemaUrl % (self.host, "/draft", schemaId) body = {"schemaDefinition": schemaDefinition} resp = requests.put(req, auth=self.credentials, header...
0.009274
def get_dataset_samples(self, dataset_name, owner=None): """ Get the list of samples of a specific remote dataset. :param dataset_name: the dataset name :param owner: (optional) who owns the dataset. If it is not specified, the current user is used. For public dataset use 'public...
0.00391
def unbind(self, binding): """ Unbind the instance Args: binding (AtlasServiceBinding.Binding): Existing or New binding """ username = self.backend.config.generate_binding_username(binding) try: self.backend.atlas.DatabaseUsers.d...
0.008876
def parse(self): """ Returns a cleaned lxml ElementTree :returns: Whether the cleaned HTML has matches or not :rtype: bool """ # Create the element tree self.tree = self._build_tree(self.html_contents) # Get explicits elements to keep and discard ...
0.002119
def time_pad(x, filter_size, dilations): """Pad left across time and pad valid across the spatial components. Also concats a binary feature that indicates if a feature is padded or not. Args: x: 5-D Tensor, (NTHWC) filter_size: list of ints dilations: list of ints, dilations - 1 specifies the number...
0.017257
def publish_proto_metadata_update(self): """ Publish protobuf model in ipfs and update existing metadata file """ metadata = load_mpe_service_metadata(self.args.metadata_file) ipfs_hash_base58 = utils_ipfs.publish_proto_in_ipfs(self._get_ipfs_client(), self.args.protodir) metadata.set_si...
0.009501
def read_chd_header(chd_file): """ read the .chd header file created when Vision Research software saves the images in a file format other than .cine """ with open(chd_file, "rb") as f: header = { "cinefileheader": cine.CINEFILEHEADER(), "bitmapinfoheader": cine.BITMAPIN...
0.003824
def decompressBWTPoolProcess(tup): ''' Individual process for decompression ''' (inputDir, outputDir, startIndex, endIndex) = tup if startIndex == endIndex: return True #load the thing we'll be extracting from msbwt = MultiStringBWT.CompressedMSBWT() msbwt.loadMsbwt(inp...
0.015595
def main(): """ need to add http://sphinx-doc.org/ """ parser = argparse.ArgumentParser() sub_parser = parser.add_subparsers() lint_parser = sub_parser.add_parser('lint') lint_parser.set_defaults(func=lint) unit_test_parser = sub_parser.add_parser('unit-test') unit_test_parser.set_...
0.001704
def get_protection(self): """ :calls: `GET /repos/:owner/:repo/branches/:branch/protection <https://developer.github.com/v3/repos/branches>`_ """ headers, data = self._requester.requestJsonAndCheck( "GET", self.protection_url, headers={'Accept': Consts...
0.008403
def transcode(self, source, destinations, **kwargs): """ Changes the compression characteristics of an audio and/or video stream. Allows you to change the resolution of a source stream, change the bitrate of a stream, change a VP8 or MPEG2 stream into H.264 and much more. Allow u...
0.000539
def clear(self): ''' Clear plugin manager state. Registered mimetype functions will be disposed after calling this method. ''' self._mimetype_functions = list(self._default_mimetype_functions) super(MimetypePluginManager, self).clear()
0.006849
def upload_from_string( self, data, content_type="text/plain", client=None, predefined_acl=None ): """Upload contents of this blob from the provided string. .. note:: The effect of uploading to an existing blob depends on the "versioning" and "lifecycle" policies defin...
0.001693
def import_laid_out_tensor(mesh, laid_out_tensor, shape, name=None): """Import a laid_out_tensor. For expert users. The input must be laid out appropriately given the eventual MeshImpl, and layout. Args: mesh: a Mesh laid_out_tensor: a LaidOutTensor shape: a mtf.Shape name: an optional strin...
0.006383
def _CopyField(field, number=None): """Copies a (potentially) owned ProtoRPC field instance into a new copy. Args: field: A ProtoRPC message field to be copied. number: An integer for the field to override the number of the field. Defaults to None. Raises: TypeError: If the field is not an i...
0.010327
def metadata_lint(old, new, locations): """Run the linter over the new metadata, comparing to the old.""" # ensure we don't modify the metadata old = old.copy() new = new.copy() # remove version info old.pop('$version', None) new.pop('$version', None) for old_group_name in old: ...
0.00108
def register_postcmd_hook(self, func: Callable[[plugin.PostcommandData], plugin.PostcommandData]) -> None: """Register a hook to be called after the command function.""" self._validate_prepostcmd_hook(func, plugin.PostcommandData) self._postcmd_hooks.append(func)
0.010453
def temporary_eject_device(self, name, controller_port, device, temporary_eject): """Sets the behavior for guest-triggered medium eject. In some situations it is desirable that such ejects update the VM configuration, and in others the eject should keep the VM configuration. The device must ...
0.006821
def start(self): """Start the app for the start subcommand.""" # First see if the cluster is already running try: pid = self.get_pid_from_file() except PIDFileError: pass else: if self.check_pid(pid): self.log.critical( ...
0.003181
def ReadClientCrashInfoHistory(self, client_id): """Reads the full crash history for a particular client.""" history = self.crash_history.get(client_id) if not history: return [] res = [] for ts in sorted(history, reverse=True): client_data = rdf_client.ClientCrash.FromSerializedString(h...
0.012225
def wnsumd(window): """ Summarize the contents of a double precision window. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnsumd_c.html :param window: Window to be summarized. :type window: spiceypy.utils.support_types.SpiceCell :return: Total measure of intervals in wi...
0.002035
def _raw_predict(self, Xnew, full_cov=False, kern=None): """ For making predictions, does not account for normalization or likelihood full_cov is a boolean which defines whether the full covariance matrix of the prediction is computed. If full_cov is False (default), only the di...
0.010091
def to_s(self): """ this method is used to print the output of the executable in a readable/ tokenized format. sample usage: >>> from boa.compiler import Compiler >>> module = Compiler.load('./boa/tests/src/LambdaTest.py').default >>> module.write() >>> print(mod...
0.001919
def _parse_raw_data(self): """ Parses the incoming data and determines if it is valid. Valid data gets placed into self._messages :return: None """ if self._START_OF_FRAME in self._raw and self._END_OF_FRAME in self._raw: while self._raw[0] != self._START_OF...
0.00268
def deploy_local(self, dotfiles, target_root=None): """Deploy dotfiles to a local path.""" if target_root is None: target_root = self.args.path for source_path, target_path in dotfiles.items(): source_path = path.join(self.source, source_path) target_path = p...
0.00132
def _variant_checkpoints(samples): """Check sample configuration to identify required steps in analysis. """ checkpoints = {} checkpoints["vc"] = any([dd.get_variantcaller(d) or d.get("vrn_file") for d in samples]) checkpoints["sv"] = any([dd.get_svcaller(d) for d in samples]) checkpoints["joint...
0.005286
def potential_from_grid(self, grid): """ Calculate the potential at a given set of arc-second gridded coordinates. Parameters ---------- grid : grids.RegularGrid The grid of (y,x) arc-second coordinates the deflection angles are computed on. """ pote...
0.009058
def as_bool(self, key): """ Accepts a key as input. The corresponding value must be a string or the objects (``True`` or 1) or (``False`` or 0). We allow 0 and 1 to retain compatibility with Python 2.2. If the string is one of ``True``, ``On``, ``Yes``, or ``1`` it returns ...
0.003695
def sample(dataset, target, tolerance=None, pass_cell_arrays=True, pass_point_arrays=True): """Resample scalar data from a passed mesh onto this mesh using :class:`vtk.vtkResampleWithDataSet`. Parameters ---------- dataset: vtki.Common The source ...
0.006456
def create_context_plot(ra, dec, name="Your object"): """Creates a K2FootprintPlot showing a given position in context with respect to the campaigns.""" plot = K2FootprintPlot() plot.plot_galactic() plot.plot_ecliptic() for c in range(0, 20): plot.plot_campaign_outline(c, facecolor="#666...
0.001495
def can_create_log_entry_with_record_types(self, log_entry_record_types): """Tests if this user can create a single ``LogEntry`` using the desired record types. While ``LoggingManager.getLogEntryRecordTypes()`` can be used to examine which records are supported, this method tests which ...
0.002972
def template_substitute(text, **kwargs): """ Replace placeholders in text by using the data mapping. Other placeholders that is not represented by data is left untouched. :param text: Text to search and replace placeholders. :param data: Data mapping/dict for placeholder key and values. :re...
0.001706