text
stringlengths
78
104k
score
float64
0
0.18
def parse_reply(self, data): """Deserializes and validates a response. Called by the client to reconstruct the serialized :py:class:`JSONRPCResponse`. :param bytes data: The data stream received by the transport layer containing the serialized request. :return: A reconstruc...
0.003796
def access_level_up_to(self, access_level): """ returns all items that have an access level equal or lower than the one specified """ # if access_level is number if isinstance(access_level, int): value = access_level # else if is string get the numeric value else: ...
0.006726
def show_worst_drawdown_periods(returns, top=5): """ Prints information about the worst drawdown periods. Prints peak dates, valley dates, recovery dates, and net drawdowns. Parameters ---------- returns : pd.Series Daily returns of the strategy, noncumulative. - See full ...
0.001425
def containsSettingsGroup(groupName, settings=None): """ Returns True if the settings contain a group with the name groupName. Works recursively when the groupName is a slash separated path. """ def _containsPath(path, settings): "Aux function for containsSettingsGroup. Does the actual recur...
0.002086
def rename_property(self, old, new): """Replace the name of a property by a new one.""" self._properties.replace(old, new) pairs = self._pairs pairs |= {(o, new) for o in self._objects if (o, old) in pairs and not pairs.remove((o, old))}
0.010676
def get_event_triggers(self): """ Returns dict of supported events. Key = Event Type List = Channels that have that event activated """ events = {} nvrflag = False event_xml = [] url = '%s/ISAPI/Event/triggers' % self.root_url try: ...
0.000542
def get_mx_records(domain): """ Gets an array of MXRecords associated to the domain specified. :param domain: :return: [MXRecord] """ DNS.DiscoverNameServers() request = DNS.Request() response = request.req(name=domain, qtype=DNS.Type.MX) mx_rec...
0.005445
def print_markdown(data, title=None): """Print data in GitHub-flavoured Markdown format for issues etc. data (dict or list of tuples): Label/value pairs. title (unicode or None): Title, will be rendered as headline 2. """ markdown = [] for key, value in data.items(): if isinstance(value...
0.001815
def showDecidePage(request, openid_request): """ Render a page to the user so a trust decision can be made. @type openid_request: openid.server.server.CheckIDRequest """ trust_root = openid_request.trust_root return_to = openid_request.return_to try: # Stringify because template's ...
0.002043
def _locate_files_to_delete(algorithm, rotated_files, next_rotation_id): """Looks for hanoi_rotator generated files that occupy the same slot that will be given to rotation_id. """ rotation_slot = algorithm.id_to_slot(next_rotation_id) for a_path, a_rotation_id in rotated_files: if rotation_...
0.002571
def hard_limit_remote(self, yidx, ridx, rtype='y', rmin=None, rmax=None, min_yset=0, max_yset=0): """Limit the output of yidx if t...
0.005604
def fft_bandpassfilter(data, fs, lowcut, highcut): """ http://www.swharden.com/blog/2009-01-21-signal-filtering-with-python/#comment-16801 """ fft = np.fft.fft(data) # n = len(data) # timestep = 1.0 / fs # freq = np.fft.fftfreq(n, d=timestep) bp = fft.copy() # Zero out fft coefficie...
0.001832
def show_release_file(root, request): """ Download a release file. Must be used with :func:`pyshop.helpers.download.renderer_factory` to download the release file. :return: download informations :rtype: dict """ settings = request.registry.settings whlify = asbool(settings.get('pysh...
0.000885
def simxSetObjectFloatParameter(clientID, objectHandle, parameterID, parameterValue, operationMode): ''' Please have a look at the function description/documentation in the V-REP user manual ''' return c_SetObjectFloatParameter(clientID, objectHandle, parameterID, parameterValue, operationMode)
0.012821
def getLocalIPaddress(): """visible to other machines on LAN""" try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('google.com', 0)) my_local_ip = s.getsockname()[0] # takes ~0.005s #from netifaces import interfaces, ifaddresses, AF_INET #full solution i...
0.009115
async def create_rev_reg(self, rr_id: str, rr_size: int = None) -> None: """ Create revocation registry artifacts and new tails file (with association to corresponding revocation registry identifier via symbolic link name) for input revocation registry identifier. Symbolic link presence ...
0.004132
def get_canonical_key_id(self, key_id): """ get_canonical_key_id is used by get_canonical_key, see the comment for that method for more explanation. Keyword arguments: key_id -- the key id (e.g. '12345') returns the canonical key id (e.g. '12') """ shard...
0.004878
def autoencoder_residual_discrete_big(): """Residual discrete autoencoder model, big version.""" hparams = autoencoder_residual_discrete() hparams.hidden_size = 128 hparams.max_hidden_size = 4096 hparams.bottleneck_noise = 0.1 hparams.residual_dropout = 0.4 return hparams
0.027972
def set_std(self, std): """Set the standard we'll be using (isupport CASEMAPPING).""" if not hasattr(self, '_std'): IMap.__init__(self) # translation based on std self._std = std.lower() # set casemapping maps self._set_transmaps() # create translat...
0.007246
def residmap(self, prefix='', **kwargs): """Generate 2-D spatial residual maps using the current ROI model and the convolution kernel defined with the `model` argument. Parameters ---------- prefix : str String that will be prefixed to the output residual map...
0.001558
def process_settings(pelicanobj): """Sets user specified MathJax settings (see README for more details)""" mathjax_settings = {} # NOTE TO FUTURE DEVELOPERS: Look at the README and what is happening in # this function if any additional changes to the mathjax settings need to # be incorporated. Als...
0.00364
def get_devicelist(home_hub_ip='192.168.1.254'): """Retrieve data from BT Home Hub 5 and return parsed result. """ url = 'http://{}/'.format(home_hub_ip) try: response = requests.get(url, timeout=5) except requests.exceptions.Timeout: _LOGGER.exception("Connection to the router tim...
0.001976
def get_pos(vcf_line): """ Very lightweight parsing of a vcf line to get position. Returns a dict containing: 'chrom': index of chromosome (int), indicates sort order 'pos': position on chromosome (int) """ if not vcf_line: return None vcf_dat...
0.003922
def add_peer_address(self, ext_bgp_peer_or_fw, rank=None): """ Add a peer address. Peer address types are ExternalBGPPeer or Engine. :raises ElementNotFound: If element specified does not exist """ if ext_bgp_peer_or_fw.typeof == 'external_bgp_peer': ...
0.007055
def deactivate_resource(cls, id): r""" Used to deactivate a node of type 'cls' in response to a DELETE request. deactivate_resource should only \ be invoked on a resource when the client specifies a DELETE request. :param id: The 'id' field of the node to update in the database. The id...
0.007261
def context(self): """ Create a context manager that ensures code runs within action's context. The action does NOT finish when the context is exited. """ parent = _ACTION_CONTEXT.set(self) try: yield self finally: _ACTION_CONTEXT.reset(pa...
0.009231
def sendNotification(snmpDispatcher, authData, transportTarget, notifyType, *varBinds, **options): """Creates a generator to send SNMP notification. When iterator gets advanced by :py:mod:`asyncio` main loop, SNMP TRAP or INFORM notification is send (:RFC:`1905#section-4.2.6`). The...
0.001337
def add_state(self, new_data, method='inc'): """Create new state and update related links and compressed state""" self.sfx.append(0) self.rsfx.append([]) self.trn.append([]) self.lrs.append(0) # Experiment with pointer-based self.f_array.add(new_data) se...
0.00203
def invoke(self, method, _this, **kwargs): """Invoke a method on the server. >>> client.invoke('CurrentTime', client.si) :param method: The method to invoke, as found in the SDK. :type method: str :param _this: The managed object reference against which to invoke \ the ...
0.003448
def index(): """Show all the posts, most recent first.""" posts = Post.query.order_by(Post.created.desc()).all() return render_template("blog/index.html", posts=posts)
0.005587
def loadmat(file_name, mdict=None, appendmat=True, variable_names=None, marshaller_collection=None, **keywords): """ Loads data to a MATLAB MAT file. Reads data from the specified variables (or all) in a MATLAB MAT file. There are many different formats of MAT files. This package ...
0.00042
def atlas_renderer(layout, coverage_layer, output_path, file_format): """Extract composition using atlas generation. :param layout: QGIS Print Layout object used for producing the report. :type layout: qgis.core.QgsPrintLayout :param coverage_layer: Coverage Layer used for atlas map. :type coverag...
0.000389
def _unsetLearningMode(self): """ Unsets the learning mode, to start inference. """ for column in self.L4Columns: column.setParameter("learn", 0, False) for column in self.L6Columns: column.setParameter("learn", 0, False) for column in self.L2Columns: column.setParameter("lea...
0.01171
def lastIndexOf(self, item): """ Return the position of the last occurrence of an item in an array, or -1 if the item is not included in the array. """ array = self.obj i = len(array) - 1 if not (self._clean.isList() or self._clean.isTuple()): return s...
0.004211
def freeze(caffe_def_path, caffemodel_path, inputs, output_file_path, output_node_names, graph_name='Graph', conversion_out_dir_path=None, checkpoint_out_path=None, use_padding_same=False): """Freeze and shrink the graph based on a Caffe model, the input tensors and the output node names.""" with caf...
0.010577
def visit_Call(self, node: AST, dfltChaining: bool = True) -> str: """Return `node`s representation as function call.""" args = node.args try: kwds = node.keywords except AttributeError: kwds = [] self.compact = True args_src = (self.visit(arg) for...
0.00367
def imap_batches_unordered(self, batches, chunksize=1): """ Augment batches from a generator in a way that does not guarantee to preserve order. Parameters ---------- batches : generator of imgaug.augmentables.batches.Batch The batches to augment, provided as a gener...
0.007117
def create(self, company, timezone, country): """Creates a client.""" body = { "CompanyName": company, "TimeZone": timezone, "Country": country} response = self._post("/clients.json", json.dumps(body)) self.client_id = json_to_py(response) ret...
0.005917
def rebuildGrid( self ): """ Rebuilds the ruler data. """ vruler = self.verticalRuler() hruler = self.horizontalRuler() rect = self._buildData['grid_rect'] # process the vertical ruler h_lines = [] h_alt = [...
0.019053
def search(name): ''' Search for matches in the ports tree. Globs are supported, and the category is optional CLI Examples: .. code-block:: bash salt '*' ports.search 'security/*' salt '*' ports.search 'security/n*' salt '*' ports.search nmap .. warning:: Tak...
0.001171
def get_features(model_description_features): """Get features from a list of dictionaries Parameters ---------- model_description_features : list of dictionaries Examples -------- >>> l = [{'StrokeCount': None}, \ {'ConstantPointCoordinates': \ [{'strokes': 4}, \...
0.001196
def get_jobs(self, id=None, params=None): """ `<>`_ :arg id: The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs """ return self.transport.perform_request( "GET", _make_path("_rollup", "job", id), params=params )
0.006369
def getInstalledConfig(installDir, configFile): """ Reads config from the installation directory of Plenum. :param installDir: installation directory of Plenum :param configFile: name of the configuration file :raises: FileNotFoundError :return: the configuration as a python object """ ...
0.001486
def do_start_alerts(self, _): """ Starts the alerter thread """ if self._alerter_thread.is_alive(): print("The alert thread is already started") else: self._stop_thread = False self._alerter_thread = threading.Thread(name='alerter', target=self._alerter_thread...
0.008174
def load_overrides(path=None): """ Load config overrides from the yml file at |path|, or from default paths. If a path is provided and it does not exist, raise an exception Default paths: ./mcore.yml, ./.mcore.yml, ./manticore.yml, ./.manticore.yml. """ if path is not None: names = [pa...
0.0047
def vm_detach(name, kwargs=None, call=None): ''' Detaches a disk from a virtual machine. .. versionadded:: 2016.3.0 name The name of the VM from which to detach the disk. disk_id The ID of the disk to detach. CLI Example: .. code-block:: bash salt-cloud -a vm_de...
0.000923
def Analyze(self, hashes): """Looks up hashes in Viper using the Viper HTTP API. Args: hashes (list[str]): hashes to look up. Returns: list[HashAnalysis]: hash analysis. Raises: RuntimeError: If no host has been set for Viper. """ hash_analyses = [] for digest in hashes:...
0.007968
def rs_find_errors(err_loc, nmess, generator=2): '''Find the roots (ie, where evaluation = zero) of error polynomial by bruteforce trial, this is a sort of Chien's search (but less efficient, Chien's search is a way to evaluate the polynomial such that each evaluation only takes constant time).''' # nmess = len...
0.005181
def get_url(client, name, version, wheel=False, hashed_format=False): """Retrieves list of package URLs using PyPI's XML-RPC. Chooses URL of prefered archive and md5_digest. """ try: release_urls = client.release_urls(name, version) release_data = client.release_data(name, version) e...
0.000461
def backfill(self, data, resolution, start, end=None): """ Backfills missing historical data :Optional: data : pd.DataFrame Minimum required bars for backfill attempt resolution : str Algo resolution start: datetime ...
0.001332
def run(self, event): ''' 这个方法是被 QA_ThreadEngine 处理队列时候调用的, QA_Task 中 do 方法调用 run (在其它线程中) 'QA_WORKER method 重载' :param event: 事件类型 QA_Event :return: ''' 'QA_WORKER method' if event.event_type is ACCOUNT_EVENT.SETTLE: print('account_settle') ...
0.00121
def on_build_finished(app, exception): """ Hooks into Sphinx's ``build-finished`` event. """ if not app.config["uqbar_book_use_cache"]: return logger.info("") for row in app.connection.execute("SELECT path, hits FROM cache ORDER BY path"): path, hits = row if not hits: ...
0.004386
def close(self): "Close the shelve object, which is needed for data consistency." if self.is_open: logger.info('closing shelve data') try: self.shelve.close() self._shelve.clear() except Exception: self.is_open = False
0.006289
def u_distance_stats_sqr(x, y, **kwargs): """ u_distance_stats_sqr(x, y, *, exponent=1) Computes the unbiased estimators for the squared distance covariance and squared distance correlation between two random vectors, and the individual squared distance variances. Parameters ---------- ...
0.000333
def get_stats_contributors(self): """ :calls: `GET /repos/:owner/:repo/stats/contributors <http://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts>`_ :rtype: None or list of :class:`github.StatsContributor.StatsContributor` """ ...
0.007184
def join(self, timeout=None): """Blocking wait for the execution to finish :param float timeout: Maximum time to wait or None for infinitely :return: True if the execution finished, False if no state machine was started or a timeout occurred :rtype: bool """ if self.__wa...
0.004348
def write(self, data): """ Write data to the file. If write buffering is on (``bufsize`` was specified and non-zero), some or all of the data may not actually be written yet. (Use `flush` or `close` to force buffered data to be written out.) :param data: ``str``/``byte...
0.001969
def console_map_string_to_font(s: str, fontCharX: int, fontCharY: int) -> None: """Remap a string of codes to a contiguous set of tiles. Args: s (AnyStr): A string of character codes to map to new values. The null character `'\\x00'` will prematurely end this fun...
0.001497
async def recv(self): """ Receives a packet of data through this connection mode. This method returns a coroutine. """ while self._connected: result = await self._recv_queue.get() if result: # None = sentinel value = keep trying return re...
0.005376
def p_union(self, p): '''union : UNION IDENTIFIER '{' field_seq '}' annotations''' p[0] = ast.Union( name=p[2], fields=p[4], annotations=p[6], lineno=p.lineno(2) )
0.01005
def get_short_url(self): """ Returns short version of topic url (without page number) """ return reverse('post_short_url', args=(self.forum.slug, self.slug, self.id))
0.016304
def pad_vocabulary(self, vocab, pad): """ Pads vocabulary to a multiple of 'pad' tokens. :param vocab: list with vocabulary :param pad: integer """ vocab_size = len(vocab) padded_vocab_size = (vocab_size + pad - 1) // pad * pad for i in range(0, padded_vo...
0.004415
def get_output(script, expanded): """Runs the script and obtains stdin/stderr. :type script: str :type expanded: str :rtype: str | None """ env = dict(os.environ) env.update(settings.env) is_slow = shlex.split(expanded) in settings.slow_commands with logs.debug_time(u'Call: {}; wi...
0.001287
def fast_kde(x, y, gridsize=(200,200), extents=None, nocorrelation=False, weights=None): """ Performs a gaussian kernel density estimate over a regular grid using a convolution of the gaussian kernel with a 2D histogram of the data. This function is typically several orders of magnitude faster than ...
0.007749
def load_glove_df(filepath, **kwargs): """ Load a GloVE-format text file into a dataframe >>> df = load_glove_df(os.path.join(BIGDATA_PATH, 'glove_test.txt')) >>> df.index[:3] Index(['the', ',', '.'], dtype='object', name=0) >>> df.iloc[0][:3] 1 0.41800 2 0.24968 3 -0.41242 ...
0.003781
def get_vnetwork_hosts_output_vnetwork_hosts_interface_name(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") get_vnetwork_hosts = ET.Element("get_vnetwork_hosts") config = get_vnetwork_hosts output = ET.SubElement(get_vnetwork_hosts, "output") ...
0.003311
def setHeight(self, personID, height): """setHeight(string, double) -> None Sets the height in m for this person. """ self._connection._sendDoubleCmd( tc.CMD_SET_PERSON_VARIABLE, tc.VAR_HEIGHT, personID, height)
0.007813
def write_checktime (self, url_data): """Write url_data.checktime.""" self.writeln(u"<tr><td>"+self.part("checktime")+u"</td><td>"+ (_("%.3f seconds") % url_data.checktime)+u"</td></tr>")
0.017857
def index(args): """ %prog index bedfile Compress and index bedfile using `tabix`. Use --fasta to give a FASTA file so that a bedgraph file can be generated and indexed. """ p = OptionParser(index.__doc__) p.add_option("--fasta", help="Generate bedgraph and index") p.add_option("--query...
0.000986
def view_500(request, url=None): """ it returns a 500 http response """ res = render_to_response("500.html", context_instance=RequestContext(request)) res.status_code = 500 return res
0.009662
def show_option(self, option, _global=False): """Return a list of options for the window. Parameters ---------- option : str option name _global : bool, optional use global option scope, same as ``-g`` Returns ------- str, int, or...
0.001684
def explode_azure_path(path): # type: (str) -> Tuple[str, str] """Explodes an azure path into a container or fileshare and the remaining virtual path :param str path: path to explode :rtype: tuple :return: container, vpath """ rpath = normalize_azure_path(path).split('/') container =...
0.002222
def get_async(self, **ctx_options): """Return a Future whose result is the entity for this Key. If no such entity exists, a Future is still returned, and the Future's eventual return result be None. """ from . import model, tasklets ctx = tasklets.get_context() cls = model.Model._kind_map.g...
0.006126
def bind_queues(self, bindings): """ Declare a set of bindings between queues and exchanges. Args: bindings (list of dict): A list of binding definitions. Each dictionary must contain the "queue" key whose value is the name of the queue to create the ...
0.006676
def _get_argument(self, argument_node): """ Returns a FritzActionArgument instance for the given argument_node. """ argument = FritzActionArgument() argument.name = argument_node.find(self.nodename('name')).text argument.direction = argument_node.find(self.nodename('direc...
0.005376
def _parse_plt_segment(self, fptr): """Parse the PLT segment. The packet headers are not parsed, i.e. they remain uninterpreted raw data buffers. Parameters ---------- fptr : file Open file object. Returns ------- PLTSegment ...
0.002012
def get_html(self) -> str: """Return complete report as a HTML string.""" data = self.getdoc() num_checks = 0 body_elements = [] # Order by section first... for section in data["sections"]: section_name = html.escape(section["key"][0]) section_sta...
0.003406
def check_version(self, timeout=2, strict=False, topics=[]): """Attempt to guess the broker version. Note: This is a blocking call. Returns: version tuple, i.e. (0, 10), (0, 9), (0, 8, 2), ... """ timeout_at = time.time() + timeout log.info('Probing node %s broker versi...
0.001859
def register_classes(self, classes): """ Register classes as plugins that are not subclassed from IPlugin. `classes` may be a single object or an iterable. """ classes = util.return_list(classes) for klass in classes: IPlugin.register(klass)
0.006472
def syllable_tokenize(text: str) -> List[str]: """ :param str text: input string to be tokenized :return: list of syllables """ if not text or not isinstance(text, str): return [] tokens = [] if text: words = word_tokenize(text) trie = dict_trie(dict_source=thai_syl...
0.002247
def sample_static_posterior(self, inputs, samples): """Sample the static latent posterior. Args: inputs: A batch of intermediate representations of image frames across all timesteps, of shape [..., batch_size, timesteps, hidden_size]. samples: Number of samples to draw from the late...
0.001439
def find_biclique_embedding(a, b, m, n=None, t=None, target_edges=None): """Find an embedding for a biclique in a Chimera graph. Given a target :term:`Chimera` graph size, and a biclique (a bipartite graph where every vertex in a set in connected to all vertices in the other set), attempts to find an embed...
0.005033
def move_in_8(library, session, space, offset, length, extended=False): """Moves an 8-bit block of data from the specified address space and offset to local memory. Corresponds to viMoveIn8* functions of the VISA library. :param library: the visa library wrapped by ctypes. :param session: Unique logic...
0.003626
def is_gvcf_file(in_file): """Check if an input file is raw gVCF """ to_check = 100 n = 0 with utils.open_gzipsafe(in_file) as in_handle: for line in in_handle: if not line.startswith("##"): if n > to_check: break n += 1 ...
0.001247
def write_events(stream, events): ''' Write a sequence of Event protos to file-like object `stream`. ''' for event in events: data = event.SerializeToString() len_field = struct.pack('<Q', len(data)) len_crc = struct.pack('<I', masked_crc(len_field)) data_crc = struct.pac...
0.002151
def sync_counts(**kwargs): """ Iterates over registered recipes and denormalizes ``Badge.users.count()`` into ``Badge.users_count`` field. """ badges = kwargs.get('badges') excluded = kwargs.get('exclude_badges') instances = registry.get_recipe_instances(badges=badges, excluded=excluded) ...
0.001481
def save(self, *args, **kwargs): """Override the default ``save`` method.""" if not self.status: self.status = self.DRAFT # Published pages should always have a publication date if self.publication_date is None and self.status == self.PUBLISHED: self.publication_d...
0.001976
def add_argument(self, *args, parser=None, autoenv=False, env=None, complete=None, **kwargs): """ Allow cleaner action supplementation. Autoenv will generate an environment variable to be usable as a defaults setter based on the command name and the dest property of the act...
0.003386
def _numToTwoByteString(value, numberOfDecimals=0, LsbFirst=False, signed=False): """Convert a numerical value to a two-byte string, possibly scaling it. Args: * value (float or int): The numerical value to be converted. * numberOfDecimals (int): Number of decimals, 0 or more, for scaling. ...
0.002996
def host_delete(hostids, **kwargs): ''' Delete hosts. .. versionadded:: 2016.3.0 :param hostids: Hosts (hostids) to delete. :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) :param _connection_password: Optional - zabbix password (can a...
0.003724
def _GetDisplayPath(self, path_spec, full_path, data_stream_name): """Retrieves a path to display. Args: path_spec (dfvfs.PathSpec): path specification of the file entry. full_path (str): full path of the file entry. data_stream_name (str): name of the data stream. Returns: str: pa...
0.006203
def get_forks(self, repository_name_or_id, collection_id, project=None, include_links=None): """GetForks. [Preview API] Retrieve all forks of a repository in the collection. :param str repository_name_or_id: The name or ID of the repository. :param str collection_id: Team project collect...
0.005941
def from_xml(cls, xml_bytes): """ Create an instance of this from XML bytes. @param xml_bytes: C{str} bytes of XML to parse @return: an instance of L{MultipartInitiationResponse} """ root = XML(xml_bytes) return cls(root.findtext('Bucket'), roo...
0.005208
def id(self, id): """ Sets the id of this Shift. UUID for this object :param id: The id of this Shift. :type: str """ if id is None: raise ValueError("Invalid value for `id`, must not be `None`") if len(id) > 255: raise ValueError...
0.007481
def full_path(self): """ Return a full path to a current session directory. A result is made by joining a start path with current session directory :return: str """ return self.normalize_path(self.directory_sep().join((self.start_path(), self.session_path())))
0.03321
def check(self, var): """Return True if the variable matches the specified type.""" return (isinstance(var, _int_type) and (self._lower_bound is None or var >= self._lower_bound) and (self._upper_bound is None or var <= self._upper_bound))
0.006969
def reverse( self, query, exactly_one=DEFAULT_SENTINEL, timeout=DEFAULT_SENTINEL, kind=None, ): """ Return an address by location point. :param query: The coordinates for which you wish to obtain the closest human-reada...
0.002258
def _validate(self, validator, data, key, position=None, includes=None): """ Run through a schema and a data structure, validating along the way. Ignores fields that are in the data structure, but not in the schema. Returns an array of errors. """ errors = [] ...
0.002188
def starter(comm_q, *args, **kwargs): """Start the interchange process The executor is expected to call this function. The args, kwargs match that of the Interchange.__init__ """ # logger = multiprocessing.get_logger() ic = Interchange(*args, **kwargs) comm_q.put(ic.worker_port) ic.start() ...
0.005319
def get_cert_profile_kwargs(name=None): """Get kwargs suitable for get_cert X509 keyword arguments from the given profile.""" if name is None: name = ca_settings.CA_DEFAULT_PROFILE profile = deepcopy(ca_settings.CA_PROFILES[name]) kwargs = { 'cn_in_san': profile['cn_in_san'], '...
0.002121