Recursively compute intersection of data. For dictionaries, items
        for specific keys will be reduced to unique items. For lists, items
        will be reduced to unique items. This method is meant to be analogous
        to set.intersection for composite objects.

        Args:
            other (composite): Other composite object to intersect with.
            recursive (bool): Whether or not to perform the operation recursively,
                for all nested composite objects.


Recursively compute union of data. For dictionaries, items
        for specific keys will be combined into a list, depending on the
        status of the overwrite= parameter. For lists, items will be appended
        and reduced to unique items. This method is meant to be analogous
        to set.union for composite objects.

        Args:
            other (composite): Other composite object to union with.
            recursive (bool): Whether or not to perform the operation recursively,
                for all nested composite objects.
            overwrite (bool): Whether or not to overwrite entries with the same
                key in a nested dictionary.


Append to object, if object is list.


Extend list from object, if object is list.


Write composite object to file handle in JSON format.

        Args:
            fh (file): File handle to write to.
            pretty (bool): Sort keys and indent in output.


Prune leaves of filetree according to specified
        regular expression.

        Args:
            regex (str): Regular expression to use in pruning tree.


Returns the value this reference is pointing to. This method uses 'ctx' to resolve the reference and return
        the value this reference references.
        If the call was already made, it returns a cached result.
        It also makes sure there's no cyclic reference, and if so raises CyclicReferenceError.


delete - Delete all objects in this list.

			@return <int> - Number of objects deleted


Get settings from config file.


Create event in calendar with sms reminder.


Processing notification call main function.


Return the extension of fpath.

    Parameters
    ----------
    fpath: string
    File name or path

    check_if_exists: bool

    Returns
    -------
    str
    The extension of the file name or path


Remove the files in workdir that have the given extension.

    Parameters
    ----------
    workdir:
        Folder path from where to clean the files.

    extension: str
        File extension without the dot, e.g., 'txt'


Convert a CSV file in `csv_filepath` into a JSON file in `json_filepath`.

    Parameters
    ----------
    csv_filepath: str
        Path to the input CSV file.

    json_filepath: str
        Path to the output JSON file. Will be overwritten if exists.

    fieldnames: List[str]
        Names of the fields in the CSV file.

    ignore_first_line: bool


Renders as a str


Returns the elements HTML start tag


Returns a repr of an object and falls back to a minimal representation of type and ID if the call to repr raised
    an error.

    :param obj: object to safe repr
    :returns: repr string or '(type<id> repr error)' string
    :rtype: str


Match a genome VCF to variants in the ClinVar VCF file

    Acts as a generator, yielding tuples of:
    (ClinVarVCFLine, ClinVarAllele, zygosity)

    'zygosity' is a string and corresponds to the genome's zygosity for that
    ClinVarAllele. It can be either: 'Het' (heterozygous), 'Hom' (homozygous),
    or 'Hem' (hemizygous, e.g. X chromosome in XY individuals).


If next tag is link with same href, combine them.


See if span tag has bold style and wrap with strong tag.


Reject attributes not defined in ATTR_WHITELIST.


get unicode string without any other content transformation.
        and clean extra spaces


Extract "real" URL from Google redirected url by getting `q`
        querystring parameter.


Return Allele data as dict object.


Create list of Alleles from VCF line data


Dict representation of parsed VCF data


Convert data to json string representation.

        Returns:
          json representation as string.


_toStorage - Convert the value to a string representation for storage.

			@param value - The value of the item to convert
			@return A string value suitable for storing.


Returns absolute paths of files that match the regex within folder_path and
    all its children folders.

    Note: The regex matching is done using the match function
    of the re module.

    Parameters
    ----------
    folder_path: string

    regex: string

    Returns
    -------
    A list of strings.


Yields one string, concatenation of argument strings


Yields one boolean, whether the first string contains the second


Yields one number


Yields the result of applying an expression to each item in the input sequence.

    * seq: input sequence
    * expr: expression to be converted to string, then dynamically evaluated for each item on the sequence to produce the result


Replace known special characters to SVG code.

    Parameters
    ----------
    svg_content: str

    Returns
    -------
    corrected_svg: str
        Corrected SVG content


Merge all the PDF files in `pdf_filepaths` in a new PDF file `out_filepath`.

    Parameters
    ----------
    pdf_filepaths: list of str
        Paths to PDF files.

    out_filepath: str
        Path to the result PDF file.

    Returns
    -------
    path: str
        The output file path.


Navigate an open ftplib.FTP to appropriate directory for ClinVar VCF files.

    Args:
        ftp:   (type: ftplib.FTP) an open connection to ftp.ncbi.nlm.nih.gov
        build: (type: string) genome build, either 'b37' or 'b38'


Return ClinVarAllele data as dict object.


Parse frequency data in ClinVar VCF


Parse alleles for ClinVar VCF, overrides parent method.


Returns back a class decorator that enables registering Blox to this factory


make some basic checks on the inputs to make sure they are valid


make some basic checks on the function to make sure it is valid


internal recursion routine called by the run method that generates
        all input combinations


setDefaultRedisConnectionParams - Sets the default parameters used when connecting to Redis.

		  This should be the args to redis.Redis in dict (kwargs) form.

		  @param connectionParams <dict> - A dict of connection parameters.
		    Common keys are:

		       host <str> - hostname/ip of Redis server (default '127.0.0.1')
		       port <int> - Port number			(default 6379)
		       db  <int>  - Redis DB number		(default 0)

		   Omitting any of those keys will ensure the default value listed is used.

		  This connection info will be used by default for all connections to Redis, unless explicitly set otherwise.
		  The common way to override is to define REDIS_CONNECTION_PARAMS on a model, or use AltConnectedModel = MyModel.connectAlt( PARAMS )

		  Any omitted fields in these connection overrides will inherit the value from the global default.

		  For example, if your global default connection params define host = 'example.com', port=15000, and db=0,
		    and then one of your models has

		       REDIS_CONNECTION_PARAMS = { 'db' : 1 }

		    as an attribute, then that model's connection will inherit host='example.com" and port=15000 but override db and use db=1

		    NOTE: Calling this function will clear the connection_pool attribute of all stored managed connections, disconnect all managed connections,
		      and close-out the connection pool.
		     It may not be safe to call this function while other threads are potentially hitting Redis (not that it would make sense anyway...)

		     @see clearRedisPools   for more info


getRedisPool - Returns and possibly also creates a Redis connection pool
			based on the REDIS_CONNECTION_PARAMS passed in.

			The goal of this method is to keep a small connection pool rolling
			to each unique Redis instance, otherwise during network issues etc
			python-redis will leak connections and in short-order can exhaust
			all the ports on a system. There's probably also some minor
			performance gain in sharing Pools.

			Will modify "params", if "host" and/or "port" are missing, will fill
			them in with defaults, and prior to return will set "connection_pool"
			on params, which will allow immediate return on the next call,
			and allow access to the pool directly from the model object.

			@param params <dict> - REDIS_CONNECTION_PARAMS - kwargs to redis.Redis

			@return redis.ConnectionPool corrosponding to this unique server.


pprint - Pretty-print a dict representation of this object.

			@param stream <file/None> - Either a stream to output, or None to default to sys.stdout


hasUnsavedChanges - Check if any unsaved changes are present in this model, or if it has never been saved.

			@param cascadeObjects <bool> default False, if True will check if any foreign linked objects themselves have unsaved changes (recursively).
				Otherwise, will just check if the pk has changed.

			@return <bool> - True if any fields have changed since last fetch, or if never saved. Otherwise, False


save - Save this object.

			Will perform an "insert" if this object had not been saved before,
			  otherwise will update JUST the fields changed on THIS INSTANCE of the model.

			  i.e. If you have two processes fetch the same object and change different fields, they will not overwrite
			  eachother, but only save the ones each process changed.

			If you want to save multiple objects of type MyModel in a single transaction,
			and you have those objects in a list, myObjs, you can do the following:

				MyModel.saver.save(myObjs)

			@param cascadeSave <bool> Default True - If True, any Foreign models linked as attributes that have been altered
			   or created will be saved with this object. If False, only this object (and the reference to an already-saved foreign model) will be saved.

			@see #IndexedRedisSave.save

			@return <list> - Single element list, id of saved object (if successful)


hasSameValues - Check if this and another model have the same fields and values.

			This does NOT include id, so the models can have the same values but be different objects in the database.

			@param other <IndexedRedisModel> - Another model

			@param cascadeObject <bool> default True - If True, foreign link values with changes will be considered a difference.
				Otherwise, only the immediate values are checked.

			@return <bool> - True if all fields have the same value, otherwise False


saveToExternal - Saves this object to a different Redis than that specified by REDIS_CONNECTION_PARAMS on this model.

			@param redisCon <dict/redis.Redis> - Either a dict of connection params, a la REDIS_CONNECTION_PARAMS, or an existing Redis connection.
				If you are doing a lot of bulk copies, it is recommended that you create a Redis connection and pass it in rather than establish a new
				connection with each call.

			@note - You will generate a new primary key relative to the external Redis environment. If you need to reference a "shared" primary key, it is better
					to use an indexed field than the internal pk.


reload - Reload this object from the database, overriding any local changes and merging in any updates.

		    @param cascadeObjects <bool> Default True. If True, foreign-linked objects will be reloaded if their values have changed
		      since last save/fetch. If False, only if the pk changed will the foreign linked objects be reloaded.

                    @raises KeyError - if this object has not been saved (no primary key)

                    @return - Dict with the keys that were updated. Key is field name that was updated,
		       and value is tuple of (old value, new value).

		    NOTE: Currently, this will cause a fetch of all Foreign Link objects, one level


copyModel - Copy this model, and return that copy.

			  The copied model will have all the same data, but will have a fresh instance of the FIELDS array and all members,
			    and the INDEXED_FIELDS array.

			  This is useful for converting, like changing field types or whatever, where you can load from one model and save into the other.

			@return <IndexedRedisModel> - A copy class of this model class with a unique name.


connectAlt - Create a class of this model which will use an alternate connection than the one specified by REDIS_CONNECTION_PARAMS on this model.

			@param redisConnectionParams <dict> - Dictionary of arguments to redis.Redis, same as REDIS_CONNECTION_PARAMS.

			@return - A class that can be used in all the same ways as the existing IndexedRedisModel, but that connects to a different instance.

			  The fields and key will be the same here, but the connection will be different. use #copyModel if you want an independent class for the model


_get_new_connection - Get a new connection
			internal


_get_connection - Maybe get a new connection, or reuse if passed in.
				Will share a connection with a model
			internal


_rem_id_from_index - Removes an id from an index
			internal


_peekNextID - Look at, but don't increment the primary key for this model.
				Internal.

			@return int - next pk


Internal for handling filters; the guts of .filter and .filterInline


count - gets the number of records matching the filter criteria

			Example:
				theCount = Model.objects.filter(field1='value').count()


exists - Tests whether a record holding the given primary key exists.

			@param pk - Primary key (see getPk method)

			Example usage: Waiting for an object to be deleted without fetching the object or running a filter.

			This is a very cheap operation.

			@return <bool> - True if object with given pk exists, otherwise False


all - Get the underlying objects which match the filter criteria.

			Example:   objs = Model.objects.filter(field1='value', field2='value2').all()

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@return - Objects of the Model instance associated with this query.


allOnlyFields - Get the objects which match the filter criteria, only fetching given fields.

			@param fields - List of fields to fetch

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@return - Partial objects with only the given fields fetched


allOnlyIndexedFields - Get the objects which match the filter criteria, only fetching indexed fields.

			@return - Partial objects with only the indexed fields fetched


Random - Returns a random record in current filterset.

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@return - Instance of Model object, or None if no items math current filters


delete - Deletes all entries matching the filter criteria


get - Get a single value with the internal primary key.

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@param pk - internal primary key (can be found via .getPk() on an item)


getOnlyFields - Gets only certain fields from a paticular primary key. For working on entire filter set, see allOnlyFields

			@param pk <int> - Primary Key

			@param fields list<str> - List of fields

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			return - Partial objects with only fields applied


deleteByPk - Delete object associated with given primary key


deleteMultiple - Delete multiple objects

			@param objs - List of objects

			@return - Number of objects deleted


deleteMultipleByPks - Delete multiple objects given their primary keys

			@param pks - List of primary keys

			@return - Number of objects deleted


create an input file using jinja2 by filling a template
    with the values from the option variable passed in.


Returns a blox template from an html string


Returns a blox template from a file stream object


Returns a blox template from a valid file path


Cast an arbitrary object or sequence to a string type


Cast an arbitrary sequence to a boolean type


Accumulate all dictionary and named arguments as
    keyword argument dictionary. This is generally useful for
    functions that try to automatically resolve inputs.

    Examples:
        >>> @keywords
        >>> def test(*args, **kwargs):
        >>>     return kwargs
        >>>
        >>> print test({'one': 1}, two=2)
        {'one': 1, 'two': 2}


Modify the encoding entry in the XML file.

    Parameters
    ----------
    filepath: str
        Path to the file to be modified.

    src_enc: str
        Encoding that is written in the file

    dst_enc: str
        Encoding to be set in the file.


getCompressMod - Return the module used for compression on this field

			@return <module> - The module for compression


Save `text` in a qrcode svg image file.

    Parameters
    ----------
    text: str
        The string to be codified in the QR image.

    out_filepath: str
        Path to the output file

    color: str
        A RGB color expressed in 6 hexadecimal values.

    box_size: scalar
        Size of the QR code boxes.


Set the gromacs input data using the supplied input options, run
    gromacs and extract and return the required outputs.


Call CLI command with arguments and returns its return value.

    Parameters
    ----------
    cmd_name: str
        Command name or full path to the binary file.

    arg_strings: str
        Argument strings list.

    Returns
    -------
    return_value
        Command return value.


toBytes - Convert a value to bytes using the encoding specified on this field

			@param value <str> - The field to convert to bytes

			@return <bytes> - The object encoded using the codec specified on this field.

			NOTE: This method may go away.


Call PDFLatex to convert TeX files to PDF.

    Parameters
    ----------
    tex_file: str
        Path to the input LateX file.

    output_file: str
        Path to the output PDF file.
        If None, will use the same output directory as the tex_file.

    output_format: str
        Output file format. Choices: 'pdf' or 'dvi'. Default: 'pdf'

    Returns
    -------
    return_value
        PDFLatex command call return value.


Like functools.partial but instead of using the new kwargs, keeps the old ones.


Create an OrderedDict

    :param hierarchy: a dictionary
    :param level: single key
    :return: deeper dictionary


Returns a transformed Geometry.

    Arguments:
    geom -- any coercible Geometry value or Envelope
    to_sref -- SpatialReference or EPSG ID as int


Expands this envelope by the given Envelope or tuple.

        Arguments:
        other -- Envelope, two-tuple, or four-tuple


Returns the intersection of this and another Envelope.


Creates a table from arrays Z, N and M

        Example:
        ________

        >>> Z = [82, 82, 83]
        >>> N = [126, 127, 130]
        >>> M = [-21.34, -18.0, -14.45]
        >>> Table.from_ZNM(Z, N, M, name='Custom Table')
        Z   N
        82  126   -21.34
            127   -18.00
        83  130   -14.45
        Name: Custom Table, dtype: float64


Selects nuclei according to a condition on Z,N or M

        Parameters
        ----------
        condition : function,
            Can have one of the signatures f(M), f(Z,N) or f(Z, N, M)
            must return a boolean value
        name: string, optional name for the resulting Table

        Example:
        --------
        Select all nuclei with A > 160:

        >>> A_gt_160 = lambda Z,N: Z + N > 160
        >>> Table('AME2003').select(A_gt_160)


Return a selection of the Table at positions given by ``nuclei``

        Parameters
        ----------
        nuclei: list of tuples
            A list where each element is tuple of the form (Z,N)

        Example
        -------
        Return binding energies at magic nuclei:

        >>> magic_nuclei = [(20,28), (50,50), (50,82), (82,126)]
        >>> Table('AME2012').binding_energy.at(magic_nuclei)
        Z   N
        20  28      416.014215
        50  50      825.325172
            82     1102.876416
        82  126    1636.486450


Select nuclei which also belong to ``table``

        Parameters
        ----------
        table: Table, Table object

        Example:
        ----------
        Table('AME2003').intersection(Table('AME1995'))


Select nuclei not in table

        Parameters
        ----------
        table: Table, Table object from where nuclei should be removed

        Example:
        ----------
        Find the new nuclei in AME2003 with Z,N >= 8:

        >>> Table('AME2003').not_in(Table('AME1995'))[8:,8:].count
        389


Selects odd-even nuclei from the table


Selects even-even nuclei from the table


Calculate error difference

        Parameters
        ----------
        relative_to : string,
            a valid mass table name.

        Example:
        ----------
        >>> Table('DUZU').error(relative_to='AME2003')


Calculate root mean squared error

        Parameters
        ----------
        relative_to : string,
            a valid mass table name.

        Example:
        ----------
        >>> template = '{0:10}|{1:^6.2f}|{2:^6.2f}|{3:^6.2f}'
        >>> print 'Model      ', 'AME95 ', 'AME03 ', 'AME12 '  #  Table header
        ... for name in Table.names:
        ...     print template.format(name, Table(name).rmse(relative_to='AME1995'),
        ...                             Table(name).rmse(relative_to='AME2003'),
        ...                             Table(name).rmse(relative_to='AME2012'))
        Model       AME95  AME03  AME12
        AME2003   | 0.13 | 0.00 | 0.13
        AME2003all| 0.42 | 0.40 | 0.71
        AME2012   | 0.16 | 0.13 | 0.00
        AME2012all| 0.43 | 0.43 | 0.69
        AME1995   | 0.00 | 0.13 | 0.16
        AME1995all| 0.00 | 0.17 | 0.21
        DUZU      | 0.52 | 0.52 | 0.76
        FRDM95    | 0.79 | 0.78 | 0.95
        KTUY05    | 0.78 | 0.77 | 1.03
        ETFSI12   | 0.84 | 0.84 | 1.04
        HFB14     | 0.84 | 0.83 | 1.02


Return 2 neutron separation energy


Return 1 neutron separation energy


Return 2 proton separation energy


Return 1 proton separation energy


Helper function for derived quantities


Create a numpy.ndarray with all observed fields and
    computed teff and luminosity values.


Return the numpy array with rounded teff and luminosity columns.


Given a cluster create a Bokeh plot figure using the
    cluster's image.


Returns rounded teff and luminosity lists.


Given a cluster create a Bokeh plot figure creating an
    H-R diagram.


Given a numpy array calculate what the ranges of the H-R
    diagram should be.


Given a numpy array create a Bokeh plot figure creating an
    H-R diagram.


Filter the cluster data catalog into the filtered_data
        catalog, which is what is shown in the H-R diagram.

        Filter on the values of the sliders, as well as the lasso
        selection in the skyviewer.


This functions gives the user a way to change the data that is given as input.


Performs a bruteforce for the given users, password, domain on the given host.


Computes the key from the salt and the master password.


Initialize a database.

        :param database_path: The absolute path to the database to initialize.


Modify an existing domain.

        :param domain_name: The name of the domain to modify.
        :param new_salt: Whether to generate a new salt for the domain.
        :param username: If given, change domain username to this value.
        :returns: The modified :class:`Domain <pwm.core.Domain>` object.


Create a new domain entry in the database.

        :param username: The username to associate with this domain.
        :param alphabet: A character set restriction to impose on keys generated for this domain.
        :param length: The length of the generated key, in case of restrictions on the site.


Set the access and modified times of the file specified by path.


Strip \\?\ prefix in init phase


Return the path always without the \\?\ prefix.


Print the given line to stdout


Extract messages from Handlebars templates.

    It returns an iterator yielding tuples in the following form ``(lineno,
    funcname, message, comments)``.

    TODO: Things to improve:
    --- Return comments


Strips labels.


Remove namespace in the passed document in place.


Returns a GDAL virtual filesystem prefixed path.

    Arguments:
    path -- file path as str


Check to see if this URI is retrievable by this Retriever implementation

        :param uri: the URI of the resource to be retrieved
        :type uri: str
        :return: True if it can be, False if not
        :rtype: bool


Subscribes `callable` to listen to events of `name` type. The
    parameters passed to `callable` are dependent on the specific
    event being triggered.


Configures this engine based on the options array passed into
    `argv`. If `argv` is ``None``, then ``sys.argv`` is used instead.
    During configuration, the command line options are merged with
    previously stored values. Then the logging subsystem and the
    database model are initialized, and all storable settings are
    serialized to configurations files.


Handle provided columns and if necessary, convert columns to a list for
        internal strage.

        :columns: A sequence of columns for the table. Can be list, comma
            -delimited string, or IntEnum.


Execute a DML query

        :sql_string:    An SQL string template
        :*args:         Arguments to be passed for query parameters.
        :commit:        Whether or not to commit the transaction after the query
        :returns:       Psycopg2 result


Execute a SELECT statement

        :sql_string:    An SQL string template
        :columns:       A list of columns to be returned by the query
        :*args:         Arguments to be passed for query parameters.
        :returns:       Psycopg2 result


Retreive a single record from the table.  Lots of reasons this might be
        best implemented in the model

        :pk:            The primary key ID for the record
        :returns:       List of single result


Creates the final payload based on the x86 and x64 meterpreters.


Combines the files 1 and 2 into 3.


Starts the exploiting phase, you should run setup before running this function.
            if auto is set, this function will fire the exploit to all systems. Otherwise a curses interface is shown.


Exploits a single ip, exploit is based on the given operating system.


Create server instance with an optional WebSocket handler

    For pure WebSocket server ``app`` may be ``None`` but an attempt to access
    any path other than ``ws_path`` will cause server error.

    :param host: hostname or IP
    :type host: str
    :param port: server port
    :type port: int
    :param app: WSGI application
    :param server_class: WSGI server class, defaults to AsyncWsgiServer
    :param handler_class: WSGI handler class, defaults to AsyncWsgiHandler
    :param ws_handler_class: WebSocket hanlder class, defaults to ``None``
    :param ws_path: WebSocket path on the server, defaults to '/ws'
    :type ws_path: str, optional
    :return: initialized server instance


Poll active sockets once

        This method can be used to allow aborting server polling loop
        on some condition.

        :param timeout: polling timeout


Start serving HTTP requests

        This method blocks the current thread.

        :param poll_interval: polling timeout
        :return:


write triples to file.


Prints an overview of the tags of the hosts.


Starts the loop to provide the data from jackal.


Creates a search query based on the section of the config file.


Creates the workers based on the given configfile to provide named pipes in the directory.


Loads the config and handles the workers.


Replace isocode by its language equivalent

    :param isocode: Three character long language code
    :param lang: Lang in which to return the language name
    :return: Full Text Language Name


Take a string of form %citation_type|passage% and format it for human

    :param string: String of formation %citation_type|passage%
    :param lang: Language to translate to
    :return: Human Readable string

    .. note :: To Do : Use i18n tools and provide real i18n


Connect to a service to see if it is a http or https server.


Imports the given nmap result.


Start an nmap process with the given args on the given ips.


Scans the given hosts with nmap.


Scans available smb services in the database for smb signing and ms17-010.


Rename endpoint function name to avoid conflict when namespacing is set to true

    :param fn_name: Name of the route function
    :param instance: Instance bound to the function
    :return: Name of the new namespaced function name


Retrieve the best matching locale using request headers

        .. note:: Probably one of the thing to enhance quickly.

        :rtype: str


Retrieve and transform a list of references.

        Returns the inventory collection object with its metadata and a callback function taking a level parameter \
        and returning a list of strings.

        :param objectId: Collection Identifier
        :type objectId: str
        :param subreference: Subreference from which to retrieve children
        :type subreference: str
        :param collection: Collection object bearing metadata
        :type collection: Collection
        :param export_collection: Return collection metadata
        :type export_collection: bool
        :return: Returns either the list of references, or the text collection object with its references as tuple
        :rtype: (Collection, [str]) or [str]


Retrieve the passage identified by the parameters

        :param objectId: Collection Identifier
        :type objectId: str
        :param subreference: Subreference of the passage
        :type subreference: str
        :return: An object bearing metadata and its text
        :rtype: InteractiveTextualNode


Generates a SEO friendly string for given collection

        :param collection: Collection object to generate string for
        :param parent: Current collection parent
        :return: SEO/URL Friendly string


Build an ancestor or descendant dict view based on selected information

        :param member: Current Member to build for
        :param collection: Collection from which we retrieved it
        :param lang: Language to express data in
        :return:


Build member list for given collection

        :param collection: Collection to build dict view of for its members
        :param lang: Language to express data in
        :return: List of basic objects


Build parents list for given collection

        :param collection: Collection to build dict view of for its members
        :param lang: Language to express data in
        :return: List of basic objects


Retrieve the top collections of the inventory

        :param lang: Lang in which to express main data
        :type lang: str
        :return: Collections information and template
        :rtype: {str: Any}


Text exemplar references browsing route function

        :param objectId: Collection identifier
        :type objectId: str
        :param lang: Lang in which to express main data
        :type lang: str
        :return: Template and required information about text with its references


Provides a redirect to the first passage of given objectId

        :param objectId: Collection identifier
        :type objectId: str
        :return: Redirection to the first passage of given text


Retrieve the text of the passage

        :param objectId: Collection identifier
        :type objectId: str
        :param lang: Lang in which to express main data
        :type lang: str
        :param subreference: Reference identifier
        :type subreference: str
        :return: Template, collections metadata and Markup object representing the text
        :rtype: {str: Any}


Merge and register assets, both as routes and dictionary

        :return: None


Create blueprint and register rules

        :return: Blueprint of the current nemo app
        :rtype: flask.Blueprint


Create a view

        :param name: Name of the route function to use for the view.
        :type name: str
        :return: Route function which makes use of Nemo context (such as menu informations)
        :rtype: function


Retrieve main parent collections of a repository

        :param lang: Language to retrieve information in
        :return: Sorted collections representations


This function is built to provide cache keys for templates

        :param endpoint: Current endpoint
        :param kwargs: Keyword Arguments
        :return: tuple of i18n dependant cache key and i18n ignoring cache key
        :rtype: tuple(str)


Render a route template and adds information to this route.

        :param template: Template name.
        :type template: str
        :param kwargs: dictionary of named arguments used to be passed to the template
        :type kwargs: dict
        :return: Http Response with rendered template
        :rtype: flask.Response


Register the app using Blueprint

        :return: Nemo blueprint
        :rtype: flask.Blueprint


Register plugins in Nemo instance

        - Clear routes first if asked by one plugin
        - Clear assets if asked by one plugin and replace by the last plugin registered static_folder
        - Register each plugin
            - Append plugin routes to registered routes
            - Append plugin filters to registered filters
            - Append templates directory to given namespaces
            - Append assets (CSS, JS, statics) to given resources
            - Append render view (if exists) to Nemo.render stack


Handle a list of references depending on the text identifier using the chunker dictionary.

        :param text: Text object from which comes the references
        :type text: MyCapytains.resources.texts.api.Text
        :param reffs: List of references to transform
        :type reffs: References
        :return: Transformed list of references
        :rtype: [str]


Obtains the data from the pipe and appends the given tag.


Returns the EPSG ID as int if it exists.


Creates the section value if it does not exists and sets the value.
            Use write_config to actually set the value.


This function tries to retrieve the value from the configfile
            otherwise will return a default.


Returns the configuration directory


Write the current config to disk to store them.


Track the specified remote branch if it is not already tracked.


Checkout, update and branch from the specified branch.


write_targets will write the contents of ips and ldap_strings to the targets_file.


Starts the ntlmrelayx.py and responder processes.
            Assumes you have these programs in your path.


Function that gets called on each event from pyinotify.


Watches directory for changes


Terminate the processes.


This function waits for the relay and responding processes to exit.
            Captures KeyboardInterrupt to shutdown these processes.


Make breadcrumbs for a route

        :param kwargs: dictionary of named arguments used to construct the view
        :type kwargs: dict
        :return: List of dict items the view can use to construct the link.
        :rtype: {str: list({ "link": str, "title", str, "args", dict})}


This function obtains hosts from core and starts a nessus scan on these hosts.
        The nessus tag is appended to the host tags.


Creates a scan with the given host ips
            Returns the scan id of the created object.


Bases the comparison of the datastores on URI alone.


Route to retrieve annotations by target

        :param target_urn: The CTS URN for which to retrieve annotations
        :type target_urn: str
        :return: a JSON string containing count and list of resources
        :rtype: {str: Any}


Main entry point for the CLI.


Initialize loggers.


Returns the label for a given Enum key


Returns the verbose name for a given enum value


Update the content of a single file.


Tries to perform a zone transfer.


Resolves the list of domains and returns the ips.


Parses the list of ips, turns these into ranges based on the netmask given.
        Set include_public to True to include public IP adresses.


Uses the command line arguments to fill the search function and call it.


Uses the command line arguments to fill the count function and call it.


Returns a generator that maps the input of the pipe to an elasticsearch object.
            Will call id_to_object if it cannot serialize the data from json.


Resolves an ip adres to a range object, creating it if it doesn't exists.


Argparser option with search functionality specific for ranges.


Resolves the given id to a user object, if it doesn't exists it will be created.


Returns a list that maps the input of the pipe to an elasticsearch object.
            Will call id_to_object if it cannot serialize the data from json.


Consumes an ET protocol tree and converts it to state.Command commands


Returns a dictionary of enabled GDAL Driver metadata keyed by the
    'ShortName' attribute.


Returns the gdal.Driver for a path or None based on the file extension.

    Arguments:
    path -- file path as str with a GDAL supported file extension


Converts an OGR polygon to a 2D NumPy array.

    Arguments:
    geom -- OGR Geometry
    size -- array size in pixels as a tuple of (width, height)
    affine -- AffineTransform


Returns a Raster instance.

    Arguments:
    path -- local or remote path as str or file-like object
    Keyword args:
    mode -- gdal constant representing access mode


Returns an in-memory raster initialized from a pixel buffer.

    Arguments:
    data -- byte buffer of raw pixel data
    size -- two or three-tuple of (xsize, ysize, bandcount)
    bandtype -- band data type


Returns a copied Raster instance.

        Arguments:
        source -- the source Raster instance or filepath as str
        dest -- destination filepath as str


Returns a dict of driver specific raster creation options.

        See GDAL format docs at http://www.gdal.org/formats_list.html


Returns a new Raster instance.

        gdal.Driver.Create() does not support all formats.

        Arguments:
        path -- file object or path as str
        size -- two or three-tuple of (xsize, ysize, bandcount)
        bandtype -- GDAL pixel data type


Sets the affine transformation.

        Intercepts the gdal.Dataset call to ensure use as a property setter.

        Arguments:
        affine -- AffineTransform or six-tuple of geotransformation values


Returns an NDArray, optionally subset by spatial envelope.

        Keyword args:
        envelope -- coordinate extent tuple or Envelope


Returns the underlying ImageDriver instance.


Returns a MaskedArray using nodata values.

        Keyword args:
        geometry -- any geometry, envelope, or coordinate extent tuple


Returns raster data bytes for partial or full extent.

        Overrides gdal.Dataset.ReadRaster() with the full raster size by
        default.


Returns a new instance resampled to provided size.

        Arguments:
        size -- tuple of x,y image dimensions


Save this instance to the path and format provided.

        Arguments:
        to -- output path as str, file, or MemFileIO instance
        Keyword args:
        driver -- GDAL driver name as string or ImageDriver


Sets the spatial reference.

        Intercepts the gdal.Dataset call to ensure use as a property setter.

        Arguments:
        sref -- SpatialReference or any format supported by the constructor


Returns a new reprojected instance.

        Arguments:
        to_sref -- spatial reference as a proj4 or wkt string, or a
        SpatialReference
        Keyword args:
        dest -- filepath as str
        interpolation -- GDAL interpolation type


retrieves a named charset or treats the input as a custom alphabet and use that


gets a chunk from the input data, converts it to a number and
        encodes that number


partition the data into chunks and retrieve the chunk at the given index


Initializes the indices


Cache result of function call.


Parse the entry into a computer object.


Parse the file and extract the computers, import the computers that resolve into jackal.


Parses a single entry from the domaindump


Make an autocomplete API request

    This can be used to find cities and/or hurricanes by name

    :param string query: city
    :param string country: restrict search to a specific country. Must be a two letter country code
    :param boolean hurricanes: whether to search for hurricanes or not
    :param boolean cities: whether to search for cities or not
    :param integer timeout: timeout of the api request
    :returns: result of the autocomplete API request
    :rtype: dict


Make an API request

    :param string key: API key to use
    :param list features: features to request. It must be a subset of :data:`FEATURES`
    :param string query: query to send
    :param integer timeout: timeout of the request
    :returns: result of the API request
    :rtype: dict


Try to convert a string to unicode using different encodings


Handle HTTP GET requests on an authentication endpoint.

    Authentication flow begins when ``params`` has a ``login`` key with a value
    of ``start``. For instance, ``/auth/twitter?login=start``.

    :param str provider: An provider to obtain a user ID from.
    :param str request_url: The authentication endpoint/callback.
    :param dict params: GET parameters from the query string.
    :param str token_secret: An app secret to encode/decode JSON web tokens.
    :param str token_cookie: The current JSON web token, if available.
    :return: A dict containing any of the following possible keys:

        ``status``: an HTTP status code the server should sent

        ``redirect``: where the client should be directed to continue the flow

        ``set_token_cookie``: contains a JSON web token and should be stored by
        the client and passed in the next call.

        ``provider_user_id``: the user ID from the login provider

        ``provider_user_name``: the user name from the login provider


Method to call to get a serializable object for json.dump or jsonify based on the target

        :return: dict


index all triples into indexes and return their mappings


Transform triple index into a 1-D numpy array.


Packs a list of triple indexes into a 2D numpy array.


Uses a union find to find segment.


Returns the model properties as a dict


Create a usable data structure for serializing.


Catch exceptions with a prompt for post-mortem analyzis


Clearer data printing


Connects to the remote master and continuously receives calls, executes
    them, then returns a response until interrupted.


Runs a pool of workers which connect to a remote HighFive master and begin
    executing calls.


Logs an operation done on an entity, possibly with other arguments


Logs a new state of an entity


Logs an update done on an entity


Logs an error


Add message to queue and start processing the queue.


Create the message to turn light on.


Create the message to turn switch on.


Scale brightness from 0..255 to 1..32.


Create the message to turn light or switch off.


If the queue is not empty, process the queue.


Send msg to LightwaveRF hub.


Generates a wrapped adapter for the given object

    Parameters
    ----------
    obj : list, buffer, array, or file

    Raises
    ------
    ValueError
        If presented with an object that cannot be adapted

    Returns
    -------
    CMPH capable adapter


Sets the nature of this YearlyFinancials.
        Nature of the balancesheet

        :param nature: The nature of this YearlyFinancials.
        :type: str


Decorator that provides a dictionary cursor to the calling function

    Adds the cursor as the second argument to the calling functions

    Requires that the function being decorated is an instance of a class or object
    that yields a cursor from a get_cursor(cursor_type=CursorType.DICT) coroutine or provides such an object
    as the first argument in its signature

    Yields:
        A client-side dictionary cursor


Decorator that provides a cursor to the calling function

    Adds the cursor as the second argument to the calling functions

    Requires that the function being decorated is an instance of a class or object
    that yields a cursor from a get_cursor() coroutine or provides such an object
    as the first argument in its signature

    Yields:
        A client-side cursor


Decorator that provides a namedtuple cursor to the calling function

    Adds the cursor as the second argument to the calling functions

    Requires that the function being decorated is an instance of a class or object
    that yields a cursor from a get_cursor(cursor_type=CursorType.NAMEDTUPLE) coroutine or provides such an object
    as the first argument in its signature

    Yields:
        A client-side namedtuple cursor


gives the number of records in the table

        Args:
            table: a string indicating the name of the table

        Returns:
            an integer indicating the number of records in the table


Creates an insert statement with only chosen fields

        Args:
            table: a string indicating the name of the table
            values: a dict of fields and values to be inserted

        Returns:
            A 'Record' object with table columns as properties


Creates an update query with only chosen fields
        Supports only a single field where clause

        Args:
            table: a string indicating the name of the table
            values: a dict of fields and values to be inserted
            where_keys: list of dictionary
            example of where keys: [{'name':('>', 'cip'),'url':('=', 'cip.com'},{'type':{'<=', 'manufacturer'}}]
            where_clause will look like ((name>%s and url=%s) or (type <= %s))
            items within each dictionary get 'AND'-ed and dictionaries themselves get 'OR'-ed

        Returns:
            an integer indicating count of rows deleted


Creates a delete query with where keys
        Supports multiple where clause with and or or both

        Args:
            table: a string indicating the name of the table
            where_keys: list of dictionary
            example of where keys: [{'name':('>', 'cip'),'url':('=', 'cip.com'},{'type':{'<=', 'manufacturer'}}]
            where_clause will look like ((name>%s and url=%s) or (type <= %s))
            items within each dictionary get 'AND'-ed and dictionaries themselves get 'OR'-ed

        Returns:
            an integer indicating count of rows deleted


Creates a select query for selective columns with where keys
        Supports multiple where claus with and or or both

        Args:
            table: a string indicating the name of the table
            order_by: a string indicating column name to order the results on
            columns: list of columns to select from
            where_keys: list of dictionary
            limit: the limit on the number of results
            offset: offset on the results

            example of where keys: [{'name':('>', 'cip'),'url':('=', 'cip.com'},{'type':{'<=', 'manufacturer'}}]
            where_clause will look like ((name>%s and url=%s) or (type <= %s))
            items within each dictionary get 'AND'-ed and across dictionaries get 'OR'-ed

        Returns:
            A list of 'Record' object with table columns as properties


Run a raw sql query

        Args:
            query : query string to execute
            values : tuple of values to be used with the query

        Returns:
            result of query as list of named tuple


Update values of configuration section with dict.

        Args:
            sct_dict (dict): dict indexed with option names. Undefined
                options are discarded.
            conf_arg (bool): if True, only options that can be set in a config
                file are updated.


Restore default values of options in this section.


Set the list of config files.

        Args:
            config_files (pathlike): path of config files, given in the order
                of reading.


Iterator over sections, option names, and option values.

        This iterator is also implemented at the section level. The two loops
        produce the same output::

            for sct, opt, val in conf.opt_vals_():
                print(sct, opt, val)

            for sct in conf.sections_():
                for opt, val in conf[sct].opt_vals_():
                    print(sct, opt, val)

        Yields:
            tuples with sections, option names, and option values.


Iterator over sections, option names, and option metadata.

        This iterator is also implemented at the section level. The two loops
        produce the same output::

            for sct, opt, meta in conf.defaults_():
                print(sct, opt, meta.default)

            for sct in conf.sections_():
                for opt, meta in conf[sct].defaults_():
                    print(sct, opt, meta.default)

        Yields:
            tuples with sections, option names, and :class:`Conf` instances
            holding option metadata.


Create config file.

        Create config file in :attr:`config_files_[index]`.

        Parameters:
            index(int): index of config file.
            update (bool): if set to True and :attr:`config_files_` already
                exists, its content is read and all the options it sets are
                kept in the produced config file.


Read config files and set config values accordingly.

        Returns:
            (dict, list, list): respectively content of files, list of
            missing/empty files and list of files for which a parsing error
            arised.


List of cli strings for a given option.


List of config sections used by a command.

        Args:
            cmd (str): command name, set to ``None`` or ``''`` for the bare
                command.

        Returns:
            list of str: list of configuration sections used by that command.


Build command line argument parser.

        Returns:
            :class:`argparse.ArgumentParser`: the command line argument parser.
            You probably won't need to use it directly. To parse command line
            arguments and update the :class:`ConfigurationManager` instance
            accordingly, use the :meth:`parse_args` method.


Write zsh _arguments compdef for a given command.

        Args:
            zcf (file): zsh compdef file.
            cmd (str): command name, set to None or '' for bare command.
            grouping (bool): group options (zsh>=5.4).
            add_help (bool): add an help option.


Write zsh compdef script.

        Args:
            path (path-like): desired path of the compdef script.
            cmd (str): command name that should be completed.
            cmds (str): extra command names that should be completed.
            sourceable (bool): if True, the generated file will contain an
                explicit call to ``compdef``, which means it can be sourced
                to activate CLI completion.


Build a list of all options for a given command.

        Args:
            cmd (str): command name, set to None or '' for bare command.
            add_help (bool): add an help option.

        Returns:
            list of str: list of CLI options strings.


Write bash complete script.

        Args:
            path (path-like): desired path of the complete script.
            cmd (str): command name that should be completed.
            cmds (str): extra command names that should be completed.


Starts a new HighFive master at the given host and port, and returns it.


Called when a remote worker connection has been found. Finishes setting
        up the protocol object.


Called when a complete line is found from the remote worker. Decodes
        a response object from the line, then passes it to the worker object.


Called when the connection to the remote worker is broken. Closes the
        worker.


Called when a job has been found for the worker to run. Sends the job's
        RPC to the remote worker.


Closes the worker. No more jobs will be handled by the worker, and any
        running job is immediately returned to the job manager.


Runs a job set which consists of the jobs in an iterable job list.


Called when a state change has occurred. Waiters are notified that a
        change has occurred.


Adds a new result.


If there is still a job in the job iterator, loads it and increments
        the active job count.


Adds the result of a completed job to the result list, then decrements
        the active job count. If the job set is already complete, the result is
        simply discarded instead.


Cancels the job set. The job set is immediately finished, and all
        queued jobs are discarded.


Waits until the job set is finished. Returns immediately if the job set
        is already finished.


Distributes jobs from the active job set to any waiting get_job
        callbacks.


Adds a job set to the manager's queue. If there is no job set running,
        it is activated immediately. A new job set handle is returned.


Returns a job to its source job set to be run again later.


Called when a job set has been completed or cancelled. If the job set
        was active, the next incomplete job set is loaded from the job set
        queue and is activated.


Closes the job manager. No more jobs will be assigned, no more job sets
        will be added, and any queued or active job sets will be cancelled.


This method is used to append content of the `text`
    argument to the `out` argument.

    Depending on how many lines in the text, a
    padding can be added to all lines except the first
    one.

    Concatenation result is appended to the `out` argument.


Returns true if the regex matches the object, or a string in the object
    if it is some sort of container.

    :param regex: A regex.
    :type regex: ``regex``
    :param obj: An arbitrary object.
    :type object: ``object``

    :rtype: ``bool``


Lists all available instances.

    :param latest: If true, ignores the cache and grabs the latest list.
    :type latest: ``bool``
    :param filters: Filters to apply to results. A result will only be shown
                    if it includes all text in all filters.
    :type filters: [``str``]
    :param exclude: The opposite of filters. Results will be rejected if they
                    include any of these strings.
    :type exclude: [``str``]
    :param limit: Maximum number of entries to show (default no maximum).
    :type limit: ``int`` or ``NoneType``

    :return: A list of host entries.
    :rtype: ``list`` of :py:class:`HostEntry`


Use the environment to get the current region


Prints the public dns name of `name`, if it exists.

    :param name: The instance name.
    :type name: ``str``


Deserialize a HostEntry from a dictionary.

        This is more or less the same as calling
        HostEntry(**entry_dict), but is clearer if something is
        missing.

        :param entry_dict: A dictionary in the format outputted by to_dict().
        :type entry_dict: ``dict``

        :return: A HostEntry object.
        :rtype: ``cls``


Sorts a list of entries by the given attribute.


Returns a representation of the host as a single line, with columns
        joined by ``sep``.

        :param additional_columns: Columns to show in addition to defaults.
        :type additional_columns: ``list`` of ``str``
        :param only_show: A specific list of columns to show.
        :type only_show: ``NoneType`` or ``list`` of ``str``
        :param sep: The column separator to use.
        :type sep: ``str``

        :rtype: ``str``


Returns whether the instance matches the given filter text.

        :param _filter: A regex filter. If it starts with `<identifier>:`, then
                        the part before the colon will be used as an attribute
                        and the part after will be applied to that attribute.
        :type _filter: ``basestring``

        :return: True if the entry matches the filter.
        :rtype: ``bool``


Returns the best name to display for this host. Uses the instance
        name if available; else just the public IP.

        :rtype: ``str``


Helper function to traverse an element tree rooted at element, yielding nodes matching the query.


Given a simplified XPath query string, returns an array of normalized query parts.


Inserts a new element as a child of this element, before the specified index or sibling.

        :param before: An :class:`XmlElement` or a numeric index to insert the new node before
        :param name: The tag name to add
        :param attrs: Attributes for the new tag
        :param data: CDATA for the new tag
        :returns: The newly-created element
        :rtype: :class:`XmlElement`


A generator yielding children of this node.

        :param name: If specified, only consider elements with this tag name
        :param reverse: If ``True``, children will be yielded in reverse declaration order


Returns a canonical path to this element, relative to the root node.

        :param include_root: If ``True``, include the root node in the path. Defaults to ``False``.


Recursively find any descendants of this node with the given tag name. If a tag name is omitted, this will
        yield every descendant node.

        :param name: If specified, only consider elements with this tag name
        :returns: A generator yielding descendants of this node


Returns the next sibling of this node.

        :param name: If specified, only consider elements with this tag name
        :rtype: :class:`XmlElement`


Parses the HTML table into a list of dictionaries, each of which
        represents a single observation.


Calculates cache key based on `args` and `kwargs`.
    `args` and `kwargs` must be instances of hashable types.


Cache result of function execution into the django cache backend.
    Calculate cache key based on `prefix`, `args` and `kwargs` of the function.
    For using like object method set `method=True`.


Wrapper around Django's ORM `get` functionality.
    Wrap anything that raises ObjectDoesNotExist exception
    and provide the default value if necessary.
    `default` by default is None. `default` can be any callable,
    if it is callable it will be called when ObjectDoesNotExist
    exception will be raised.


Return only the part of the row which should be printed.


Attach the event time, as unix epoch


Configure and return a new logger for hivy modules


Implement celery workers using json and redis


Return status report


Define a configuration section handling config file.

    Returns:
        dict of ConfOpt: it defines the 'create', 'update', 'edit' and 'editor'
        configuration options.


Set options from a list of section.option=value string.

    Args:
        conf (:class:`~loam.manager.ConfigurationManager`): the conf to update.
        optstrs (list of str): the list of 'section.option=value' formatted
            string.


Implement the behavior of a subcmd using config_conf_section

    Args:
        conf (:class:`~loam.manager.ConfigurationManager`): it should contain a
            section created with :func:`config_conf_section` function.
        config (str): name of the configuration section created with
            :func:`config_conf_section` function.


Create completion files for bash and zsh.

    Args:
        climan (:class:`~loam.cli.CLIManager`): CLI manager.
        path (path-like): directory in which the config files should be
            created. It is created if it doesn't exist.
        cmd (str): command name that should be completed.
        cmds (str): extra command names that should be completed.
        zsh_sourceable (bool): if True, the generated file will contain an
            explicit call to ``compdef``, which means it can be sourced
            to activate CLI completion.


Writes a single observation to the output file.

        If the ``observation_data`` parameter is a dictionary, it is
        converted to a list to keep a consisted field order (as described
        in format specification). Otherwise it is assumed that the data
        is a raw record ready to be written to file.

        :param observation_data: a single observation as a dictionary or list


Takes a dictionary of observation data and converts it to a list
        of fields according to AAVSO visual format specification.

        :param cls: current class
        :param observation_data: a single observation as a dictionary


Renders a list of columns.

    :param columns: A list of columns, where each column is a list of strings.
    :type columns: [[``str``]]
    :param write_borders: Whether to write the top and bottom borders.
    :type write_borders: ``bool``
    :param column_colors: A list of coloring functions, one for each column.
                          Optional.
    :type column_colors: [``str`` -> ``str``] or ``NoneType``

    :return: The rendered columns.
    :rtype: ``str``


Renders a table. A table is a list of rows, each of which is a list
    of arbitrary objects. The `.str` method will be called on each element
    of the row. Jagged tables are ok; in this case, each row will be expanded
    to the maximum row length.

    :param table: A list of rows, as described above.
    :type table: [[``object``]]
    :param write_borders: Whether there should be a border on the top and
                          bottom. Defaults to ``True``.
    :type write_borders: ``bool``
    :param column_colors: An optional list of coloring *functions* to be
                          applied to each cell in each column. If provided,
                          the list's length must be equal to the maximum
                          number of columns. ``None`` can be mixed in to this
                          list so that a selection of columns can be colored.
    :type column_colors: [``str`` -> ``str``] or ``NoneType``

    :return: The rendered table.
    :rtype: ``str``


Prepare the rows so they're all strings, and all the same length.

    :param table: A 2D grid of anything.
    :type table: [[``object``]]

    :return: A table of strings, where every row is the same length.
    :rtype: [[``str``]]


Returns a function that colors a string with a number from 0 to 255.


Hashes a string and returns a number between ``min`` and ``max``.


Returns a random color between min and max.


Reads stdin, exits with a message if interrupted, EOF, or a quit message.

    :return: The entered input. Converts to an integer if possible.
    :rtype: ``str`` or ``int``


Verify http header token authentification


Flask decorator protecting ressources using token scheme


Utility for logbook information injection


Runs multiple commands, optionally in parallel. Each command should be
    a dictionary with a 'command' key and optionally 'description' and
    'write_stdin' keys.


Return the net work days according to RH's calendar.


Queries bash to find the path to a commmand on the system.


Uses hostname and other info to construct an SSH command.


Performs an SCP command where the remote_path is the source and the
    local_path is a format string, formatted individually for each host
    being copied from so as to create one or more distinct paths on the
    local system.

    :param entries: A list of entries.
    :type entries: ``list`` of :py:class:`HostEntry`
    :param remote_path: The source path on the remote machine(s).
    :type remote_path: ``str``
    :param local_path: A format string for the path on the local machine.
    :type local_path: ``str``
    :param profile: The profile, holding username/idfile info, etc.
    :type profile: :py:class:`Profile`


Runs the given command over SSH in parallel on all hosts in `entries`.

    :param entries: The host entries the hostnames from.
    :type entries: ``list`` of :py:class:`HostEntry`
    :param username: To use a specific username.
    :type username: ``str`` or ``NoneType``
    :param idfile: The SSH identity file to use, or none.
    :type idfile: ``str`` or ``NoneType``
    :param command: The command to run.
    :type command: ``str``
    :param parallel: If true, commands will be run in parallel.
    :type parallel: ``bool``


SSH into to a host.

    :param entry: The host entry to pull the hostname from.
    :type entry: :py:class:`HostEntry`
    :param username: To use a specific username.
    :type username: ``str`` or ``NoneType``
    :param idfile: The SSH identity file to use, if supplying a username.
    :type idfile: ``str`` or ``NoneType``
    :param tunnel: Host to tunnel SSH command through.
    :type tunnel: ``str`` or ``NoneType``

    :return: An exit status code.
    :rtype: ``int``


Takes arguments parsed from argparse and returns a profile.


Get the name of the view function used to prevent having to set the tag
    manually for every endpoint


Extract, transform, and load metadata from Lander-based projects.

    Parameters
    ----------
    session : `aiohttp.ClientSession`
        Your application's aiohttp client session.
        See http://aiohttp.readthedocs.io/en/stable/client.html.
    github_api_token : `str`
        A GitHub personal API token. See the `GitHub personal access token
        guide`_.
    ltd_product_data : `dict`
        Contents of ``metadata.yaml``, obtained via `download_metadata_yaml`.
        Data for this technote from the LTD Keeper API
        (``GET /products/<slug>``). Usually obtained via
        `lsstprojectmeta.ltd.get_ltd_product`.
    mongo_collection : `motor.motor_asyncio.AsyncIOMotorCollection`, optional
        MongoDB collection. This should be the common MongoDB collection for
        LSST projectmeta JSON-LD records. If provided, ths JSON-LD is upserted
        into the MongoDB collection.

    Returns
    -------
    metadata : `dict`
        JSON-LD-formatted dictionary.

    Raises
    ------
    NotLanderPageError
        Raised when the LTD product cannot be interpreted as a Lander page
        because the ``/metadata.jsonld`` file is absent. This implies that
        the LTD product *could* be of a different format.

    .. `GitHub personal access token guide`: https://ls.st/41d


Relate this package component to the supplied part.


Return a list of parts related to this one via reltype.


Load relationships from source XML.


Add a part to the package.

		It will also add a content-type - by default an override.  If
		override is False then it will add a content-type for the extension
		if one isn't already present.


Load a part into this package based on its relationship type


Get the correct content type for a given name


given an element, parse out the proper ContentType


Converts a Open511 JSON document to XML.

    lang: the appropriate language code

    Takes a dict deserialized from JSON, returns an lxml Element.

    Accepts only the full root-level JSON object from an Open511 response.


Converts a Open511 JSON fragment to XML.

    Takes a dict deserialized from JSON, returns an lxml Element.

    This won't provide a conforming document if you pass in a full JSON document;
    it's for translating little fragments, and is mostly used internally.


Given a dict deserialized from a GeoJSON object, returns an lxml Element
    of the corresponding GML geometry.


Transform a GEOS or OGR geometry object into an lxml Element
    for the GML geometry.


Builds a final copy of the token using the given secret key.

        :param secret_key(string): The secret key that corresponds to this builder's access key.


Finds the maximum radius and npnp in the force field.

        Returns
        -------
        (max_rad, max_npnp): (float, float)
            Maximum radius and npnp distance in the loaded force field.


Makes a dictionary containing PyAtomData for the force field.

        Returns
        -------
        ff_params_struct_dict: dict
            Dictionary containing PyAtomData structs for the force field
            parameters for each atom in the force field.


Convert an Open511 document between formats.
    input_doc - either an lxml open511 Element or a deserialized JSON dict
    output_format - short string name of a valid output format, as listed above


Get the document content in the specified markup format.

        Parameters
        ----------
        format : `str`, optional
            Output format (such as ``'html5'`` or ``'plain'``).
        mathjax : `bool`, optional
            Allow pandoc to use MathJax math markup.
        smart : `True`, optional
            Allow pandoc to create "smart" unicode punctuation.
        extra_args : `list`, optional
            Additional command line flags to pass to Pandoc. See
            `lsstprojectmeta.pandoc.convert.convert_text`.

        Returns
        -------
        output_text : `str`
            Converted content.


Get the document abstract in the specified markup format.

        Parameters
        ----------
        format : `str`, optional
            Output format (such as ``'html5'`` or ``'plain'``).
        deparagraph : `bool`, optional
            Remove the paragraph tags from single paragraph content.
        mathjax : `bool`, optional
            Allow pandoc to use MathJax math markup.
        smart : `True`, optional
            Allow pandoc to create "smart" unicode punctuation.
        extra_args : `list`, optional
            Additional command line flags to pass to Pandoc. See
            `lsstprojectmeta.pandoc.convert.convert_text`.

        Returns
        -------
        output_text : `str`
            Converted content or `None` if the title is not available in
            the document.


Get the document authors in the specified markup format.

        Parameters
        ----------
        format : `str`, optional
            Output format (such as ``'html5'`` or ``'plain'``).
        deparagraph : `bool`, optional
            Remove the paragraph tags from single paragraph content.
        mathjax : `bool`, optional
            Allow pandoc to use MathJax math markup.
        smart : `True`, optional
            Allow pandoc to create "smart" unicode punctuation.
        extra_args : `list`, optional
            Additional command line flags to pass to Pandoc. See
            `lsstprojectmeta.pandoc.convert.convert_text`.

        Returns
        -------
        output_text : `list` of `str`
            Sequence of author names in the specified output markup format.


Parse the title from TeX source.

        Sets these attributes:

        - ``_title``
        - ``_short_title``


r"""Parse the author from TeX source.

        Sets the ``_authors`` attribute.

        Goal is to parse::

           \author{
           A.~Author,
           B.~Author,
           and
           C.~Author}

        Into::

           ['A. Author', 'B. Author', 'C. Author']


r"""Load the BibTeX bibliography referenced by the document.

        This method triggered by the `bib_db` attribute and populates the
        `_bib_db` private attribute.

        The ``\bibliography`` command is parsed to identify the bibliographies
        referenced by the document.


r"""Parse the ``\date`` command, falling back to getting the
        most recent Git commit date and the current datetime.

        Result is available from the `revision_datetime` attribute.


Create a JSON-LD representation of this LSST LaTeX document.

        Parameters
        ----------
        url : `str`, optional
            URL where this document is published to the web. Prefer
            the LSST the Docs URL if possible.
            Example: ``'https://ldm-151.lsst.io'``.
        code_url : `str`, optional
            Path the the document's repository, typically on GitHub.
            Example: ``'https://github.com/lsst/LDM-151'``.
        ci_url : `str`, optional
            Path to the continuous integration service dashboard for this
            document's repository.
            Example: ``'https://travis-ci.org/lsst/LDM-151'``.
        readme_url : `str`, optional
            URL to the document repository's README file. Example:
            ``https://raw.githubusercontent.com/lsst/LDM-151/master/README.rst``.
        license_id : `str`, optional
            License identifier, if known. The identifier should be from the
            listing at https://spdx.org/licenses/. Example: ``CC-BY-4.0``.

        Returns
        -------
        jsonld : `dict`
            JSON-LD-formatted dictionary.


Returns True if database server is running, False otherwise.


Saves the state of a database to a file.

        Parameters
        ----------
        name: str
            the database to be backed up.
        filename: str
            path to a file where database backup will be written.


Loads state of a backup file to a database.

        Note
        ----
        If database name does not exist, it will be created.

        Parameters
        ----------
        name: str
            the database to which backup will be restored.
        filename: str
            path to a file contain a postgres database backup.


Connects the database client shell to the database.

        Parameters
        ----------
        expect_module: str
            the database to which backup will be restored.


Say something in the afternoon


Return a zipped package as a readable stream


Return a generator yielding each of the segments who's names
		match name.


Copy objects from one directory in a bucket to another directory in
    the same bucket.

    Object metadata is preserved while copying, with the following exceptions:

    - If a new surrogate key is provided it will replace the original one.
    - If ``cache_control`` and ``surrogate_control`` values are provided they
      will replace the old one.

    Parameters
    ----------
    bucket_name : `str`
        Name of an S3 bucket.
    src_path : `str`
        Source directory in the S3 bucket. The ``src_path`` should ideally end
        in a trailing `'/'`. E.g. `'dir/dir2/'`.
    dest_path : `str`
        Destination directory in the S3 bucket. The ``dest_path`` should
        ideally end in a trailing `'/'`. E.g. `'dir/dir2/'`. The destination
        path cannot contain the source path.
    aws_access_key_id : `str`
        The access key for your AWS account. Also set
        ``aws_secret_access_key``.
    aws_secret_access_key : `str`
        The secret key for your AWS account.
    aws_profile : `str`, optional
        Name of AWS profile in :file:`~/.aws/credentials`. Use this instead
        of ``aws_access_key_id`` and ``aws_secret_access_key`` for file-based
        credentials.
    surrogate_key : `str`, optional
        The surrogate key to insert in the header of all objects in the
        ``x-amz-meta-surrogate-key`` field. This key is used to purge
        builds from the Fastly CDN when Editions change.
        If `None` then no header will be set.
        If the object already has a ``x-amz-meta-surrogate-key`` header then
        it will be replaced.
    cache_control : `str`, optional
        This sets (and overrides) the ``Cache-Control`` header on the copied
        files. The ``Cache-Control`` header specifically dictates how content
        is cached by the browser (if ``surrogate_control`` is also set).
    surrogate_control : `str`, optional
        This sets (and overrides) the ``x-amz-meta-surrogate-control`` header
        on the copied files. The ``Surrogate-Control``
        or ``x-amz-meta-surrogate-control`` header is used in priority by
        Fastly to givern it's caching. This caching policy is *not* passed
        to the browser.
    create_directory_redirect_object : `bool`, optional
        Create a directory redirect object for the root directory. The
        directory redirect object is an empty S3 object named after the
        directory (without a trailing slash) that contains a
        ``x-amz-meta-dir-redirect=true`` HTTP header. LSST the Docs' Fastly
        VCL is configured to redirect requests for a directory path to the
        directory's ``index.html`` (known as *courtesy redirects*).

    Raises
    ------
    ltdconveyor.s3.S3Error
        Thrown by any unexpected faults from the S3 API.
    RuntimeError
        Thrown when the source and destination directories are the same.


Command line entrypoint to reduce technote metadata.


Run a pipeline to process extract, transform, and load metadata for
    multiple LSST the Docs-hosted projects

    Parameters
    ----------
    session : `aiohttp.ClientSession`
        Your application's aiohttp client session.
        See http://aiohttp.readthedocs.io/en/stable/client.html.
    product_urls : `list` of `str`
        List of LSST the Docs product URLs.
    github_api_token : `str`
        A GitHub personal API token. See the `GitHub personal access token
        guide`_.
    mongo_collection : `motor.motor_asyncio.AsyncIOMotorCollection`, optional
        MongoDB collection. This should be the common MongoDB collection for
        LSST projectmeta JSON-LD records.


Allows a decorator to be called with or without keyword arguments.


Upload a directory of files to S3.

    This function places the contents of the Sphinx HTML build directory
    into the ``/path_prefix/`` directory of an *existing* S3 bucket.
    Existing files on S3 are overwritten; files that no longer exist in the
    ``source_dir`` are deleted from S3.

    Parameters
    ----------
    bucket_name : `str`
        Name of the S3 bucket where documentation is uploaded.
    path_prefix : `str`
        The root directory in the bucket where documentation is stored.
    source_dir : `str`
        Path of the Sphinx HTML build directory on the local file system.
        The contents of this directory are uploaded into the ``/path_prefix/``
        directory of the S3 bucket.
    upload_dir_redirect_objects : `bool`, optional
        A feature flag to enable uploading objects to S3 for every directory.
        These objects contain ``x-amz-meta-dir-redirect=true`` HTTP headers
        that tell Fastly to issue a 301 redirect from the directory object to
        the `index.html`` in that directory.
    surrogate_key : `str`, optional
        The surrogate key to insert in the header of all objects
        in the ``x-amz-meta-surrogate-key`` field. This key is used to purge
        builds from the Fastly CDN when Editions change.
        If `None` then no header will be set.
    cache_control : `str`, optional
        This sets the ``Cache-Control`` header on the uploaded
        files. The ``Cache-Control`` header specifically dictates how content
        is cached by the browser (if ``surrogate_control`` is also set).
    surrogate_control : `str`, optional
        This sets the ``x-amz-meta-surrogate-control`` header
        on the uploaded files. The ``Surrogate-Control``
        or ``x-amz-meta-surrogate-control`` header is used in priority by
        Fastly to givern it's caching. This caching policy is *not* passed
        to the browser.
    acl : `str`, optional
        The pre-canned AWS access control list to apply to this upload.
        Can be ``'public-read'``, which allow files to be downloaded
        over HTTP by the public. See
        https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
        for an overview of S3's pre-canned ACL lists. Note that ACL settings
        are not validated locally. Default is `None`, meaning that no ACL
        is applied to an individual object. In this case, use ACLs applied
        to the bucket itself.
    aws_access_key_id : `str`, optional
        The access key for your AWS account. Also set
        ``aws_secret_access_key``.
    aws_secret_access_key : `str`, optional
        The secret key for your AWS account.
    aws_profile : `str`, optional
        Name of AWS profile in :file:`~/.aws/credentials`. Use this instead
        of ``aws_access_key_id`` and ``aws_secret_access_key`` for file-based
        credentials.

    Notes
    -----
    ``cache_control`` and  ``surrogate_control`` can be used together.
    ``surrogate_control`` takes priority in setting Fastly's POP caching,
    while ``cache_control`` then sets the browser's caching. For example:

    - ``cache_control='no-cache'``
    - ``surrogate_control='max-age=31536000'``

    together will ensure that the browser always does an ETAG server query,
    but that Fastly will cache the content for one year (or until purged).
    This configuration is good for files that are frequently changed in place.

    For immutable uploads simply using ``cache_control`` is more efficient
    since it allows the browser to also locally cache content.

    .. seelso:

       - `Fastly: Cache control tutorial
         <https://docs.fastly.com/guides/tutorials/cache-control-tutorial>`_.
       - `Google: HTTP caching <http://ls.st/39v>`_.


Upload a file to the S3 bucket.

    This function uses the mimetypes module to guess and then set the
    Content-Type and Encoding-Type headers.

    Parameters
    ----------
    local_path : `str`
        Full path to a file on the local file system.
    bucket_path : `str`
        Destination path (also known as the key name) of the file in the
        S3 bucket.
    bucket : boto3 Bucket instance
        S3 bucket.
    metadata : `dict`, optional
        Header metadata values. These keys will appear in headers as
        ``x-amz-meta-*``.
    acl : `str`, optional
        A pre-canned access control list. See
        https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
        Default is `None`, mean that no ACL is applied to the object.
    cache_control : `str`, optional
        The cache-control header value. For example, ``'max-age=31536000'``.


Upload an arbitrary object to an S3 bucket.

    Parameters
    ----------
    bucket_path : `str`
        Destination path (also known as the key name) of the file in the
        S3 bucket.
    content : `str` or `bytes`, optional
        Object content.
    bucket : boto3 Bucket instance
        S3 bucket.
    metadata : `dict`, optional
        Header metadata values. These keys will appear in headers as
        ``x-amz-meta-*``.
    acl : `str`, optional
        A pre-canned access control list. See
        https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
        Default is `None`, meaning that no ACL is applied to the object.
    cache_control : `str`, optional
        The cache-control header value. For example, ``'max-age=31536000'``.
    content_type : `str`, optional
        The object's content type (such as ``text/html``). If left unset,
        no MIME type is passed to boto3 (which defaults to
        ``binary/octet-stream``).


List all file-type object names that exist at the root of this
        bucket directory.

        Parameters
        ----------
        dirname : `str`
            Directory name in the bucket relative to ``bucket_root/``.

        Returns
        -------
        filenames : `list`
            List of file names (`str`), relative to ``bucket_root/``, that
            exist at the root of ``dirname``.


List all names of directories that exist at the root of this
        bucket directory.

        Note that *directories* don't exist in S3; rather directories are
        inferred from path names.

        Parameters
        ----------
        dirname : `str`
            Directory name in the bucket relative to ``bucket_root``.

        Returns
        -------
        dirnames : `list`
            List of directory names (`str`), relative to ``bucket_root/``,
            that exist at the root of ``dirname``.


Delete a file from the bucket.

        Parameters
        ----------
        filename : `str`
            Name of the file, relative to ``bucket_root/``.


Ensure a token is in the Click context object or authenticate and obtain
    the token from LTD Keeper.

    Parameters
    ----------
    ctx : `click.Context`
        The Click context. ``ctx.obj`` must be a `dict` that contains keys:
        ``keeper_hostname``, ``username``, ``password``, ``token``. This
        context object is prepared by the main Click group,
        `ltdconveyor.cli.main.main`.


Create a GitHub token for an integration installation.

    Parameters
    ----------
    installation_id : `int`
        Installation ID. This is available in the URL of the integration's
        **installation** ID.
    integration_jwt : `bytes`
        The integration's JSON Web Token (JWT). You can create this with
        `create_jwt`.

    Returns
    -------
    token_obj : `dict`
        GitHub token object. Includes the fields:

        - ``token``: the token string itself.
        - ``expires_at``: date time string when the token expires.

    Example
    -------
    The typical workflow for authenticating to an integration installation is:

    .. code-block:: python

       from dochubadapter.github import auth
       jwt = auth.create_jwt(integration_id, private_key_path)
       token_obj = auth.get_installation_token(installation_id, jwt)
       print(token_obj['token'])

    Notes
    -----
    See
    https://developer.github.com/early-access/integrations/authentication/#as-an-installation
    for more information


Create a JSON Web Token to authenticate a GitHub Integration or
    installation.

    Parameters
    ----------
    integration_id : `int`
        Integration ID. This is available from the GitHub integration's
        homepage.
    private_key_path : `str`
        Path to the integration's private key (a ``.pem`` file).

    Returns
    -------
    jwt : `bytes`
        JSON Web Token that is good for 9 minutes.

    Notes
    -----
    The JWT is encoded with the RS256 algorithm. It includes a payload with
    fields:

    - ``'iat'``: The current time, as an `int` timestamp.
    - ``'exp'``: Expiration time, as an `int timestamp. The expiration
      time is set of 9 minutes in the future (maximum allowance is 10 minutes).
    - ``'iss'``: The integration ID (`int`).

    For more information, see
    https://developer.github.com/early-access/integrations/authentication/.


r"""Get all macro definitions from TeX source, supporting multiple
    declaration patterns.

    Parameters
    ----------
    tex_source : `str`
        TeX source content.

    Returns
    -------
    macros : `dict`
        Keys are macro names (including leading ``\``) and values are the
        content (as `str`) of the macros.

    Notes
    -----
    This function uses the following function to scrape macros of different
    types:

    - `get_def_macros`
    - `get_newcommand_macros`

    This macro scraping has the following caveats:

    - Macro definition (including content) must all occur on one line.
    - Macros with arguments are not supported.


r"""Get all ``\def`` macro definition from TeX source.

    Parameters
    ----------
    tex_source : `str`
        TeX source content.

    Returns
    -------
    macros : `dict`
        Keys are macro names (including leading ``\``) and values are the
        content (as `str`) of the macros.

    Notes
    -----
    ``\def`` macros with arguments are not supported.


r"""Get all ``\newcommand`` macro definition from TeX source.

    Parameters
    ----------
    tex_source : `str`
        TeX source content.

    Returns
    -------
    macros : `dict`
        Keys are macro names (including leading ``\``) and values are the
        content (as `str`) of the macros.

    Notes
    -----
    ``\newcommand`` macros with arguments are not supported.


Makes a naive datetime.datetime in a given time zone aware.


Makes an aware datetime.datetime naive in a given time zone.


Converts a datetime to the timezone of this Schedule.


Returns an iterator of Period tuples for every day this event is in effect, between range_start
        and range_end.


Returns an iterator of Period tuples for continuous stretches of time during
        which this event is in effect, between range_start and range_end.


A set of integers representing the weekdays the schedule recurs on,
        with Monday = 0 and Sunday = 6.


Speak loudly! FIVE! Use upper case!


Get content of lsst-texmf bibliographies.

    BibTeX content is downloaded from GitHub (``master`` branch of
    https://github.com/lsst/lsst-texmf or retrieved from an in-memory cache.

    Parameters
    ----------
    bibtex_filenames : sequence of `str`, optional
        List of lsst-texmf BibTeX files to retrieve. These can be the filenames
        of lsst-bibtex files (for example, ``['lsst.bib', 'lsst-dm.bib']``)
        or names without an extension (``['lsst', 'lsst-dm']``). The default
        (recommended) is to get *all* lsst-texmf bibliographies:

        .. code-block:: python

           ['lsst', 'lsst-dm', 'refs', 'books', 'refs_ads']

    Returns
    -------
    bibtex : `dict`
        Dictionary with keys that are bibtex file names (such as ``'lsst'``,
        ``'lsst-dm'``). Values are the corresponding bibtex file content
        (`str`).


Make a pybtex BibliographyData instance from standard lsst-texmf
    bibliography files and user-supplied bibtex content.

    Parameters
    ----------
    lsst_bib_names : sequence of `str`, optional
        Names of lsst-texmf BibTeX files to include. For example:

        .. code-block:: python

           ['lsst', 'lsst-dm', 'refs', 'books', 'refs_ads']

        Default is `None`, which includes all lsst-texmf bibtex files.

    bibtex : `str`
        BibTeX source content not included in lsst-texmf. This can be content
        from a import ``local.bib`` file.

    Returns
    -------
    bibliography : `pybtex.database.BibliographyData`
        A pybtex bibliography database that includes all given sources:
        lsst-texmf bibliographies and ``bibtex``.


Get a usable URL from a pybtex entry.

    Parameters
    ----------
    entry : `pybtex.database.Entry`
        A pybtex bibliography entry.

    Returns
    -------
    url : `str`
        Best available URL from the ``entry``.

    Raises
    ------
    NoEntryUrlError
        Raised when no URL can be made from the bibliography entry.

    Notes
    -----
    The order of priority is:

    1. ``url`` field
    2. ``ls.st`` URL from the handle for ``@docushare`` entries.
    3. ``adsurl``
    4. DOI


Get and format author-year text from a pybtex entry to emulate
    natbib citations.

    Parameters
    ----------
    entry : `pybtex.database.Entry`
        A pybtex bibliography entry.
    parens : `bool`, optional
        Whether to add parentheses around the year. Default is `False`.

    Returns
    -------
    authoryear : `str`
        The author-year citation text.


Extract, transform, and load Sphinx-based technote metadata.

    Parameters
    ----------
    session : `aiohttp.ClientSession`
        Your application's aiohttp client session.
        See http://aiohttp.readthedocs.io/en/stable/client.html.
    github_api_token : `str`
        A GitHub personal API token. See the `GitHub personal access token
        guide`_.
    ltd_product_data : `dict`
        Contents of ``metadata.yaml``, obtained via `download_metadata_yaml`.
        Data for this technote from the LTD Keeper API
        (``GET /products/<slug>``). Usually obtained via
        `lsstprojectmeta.ltd.get_ltd_product`.
    mongo_collection : `motor.motor_asyncio.AsyncIOMotorCollection`, optional
        MongoDB collection. This should be the common MongoDB collection for
        LSST projectmeta JSON-LD records. If provided, ths JSON-LD is upserted
        into the MongoDB collection.

    Returns
    -------
    metadata : `dict`
        JSON-LD-formatted dictionary.

    Raises
    ------
    NotSphinxTechnoteError
        Raised when the LTD product cannot be interpreted as a Sphinx-based
        technote project because it's missing a metadata.yaml file in its
        GitHub repository. This implies that the LTD product *could* be of a
        different format.

    .. `GitHub personal access token guide`: https://ls.st/41d


Return the timezone. If none is set use system timezone


Convert any timestamp into a datetime and save as _time


Return a dict that represents the DayOneEntry


Create and return full file path for DayOne entry


Delete all objects in the S3 bucket named ``bucket_name`` that are
    found in the ``root_path`` directory.

    Parameters
    ----------
    bucket_name : `str`
        Name of an S3 bucket.
    root_path : `str`
        Directory in the S3 bucket that will be deleted.
    aws_access_key_id : `str`
        The access key for your AWS account. Also set
        ``aws_secret_access_key``.
    aws_secret_access_key : `str`
        The secret key for your AWS account.
    aws_profile : `str`, optional
        Name of AWS profile in :file:`~/.aws/credentials`. Use this instead
        of ``aws_access_key_id`` and ``aws_secret_access_key`` for file-based
        credentials.

    Raises
    ------
    ltdconveyor.s3.S3Error
        Thrown by any unexpected faults from the S3 API.


Get project's home URL based on settings.PROJECT_HOME_NAMESPACE.

    Returns None if PROJECT_HOME_NAMESPACE is not defined in settings.


A template tag to return the project's home URL and label
    formatted as a Bootstrap 4 breadcrumb.

    PROJECT_HOME_NAMESPACE must be defined in settings, for example:
        PROJECT_HOME_NAMESPACE = 'project_name:index_view'

    Usage Example:
        {% load project_home_tags %}

          {% project_home_breadcrumb_bs4 %}    {# <--- #}

List of Objects

Object Detail

    This gets converted into:

Home
    {# <--- #}

List of Objects

Object Detail

    By default, the link's text is 'Home'. A project-wide label can be
    defined with PROJECT_HOME_LABEL in settings. Both the default and
    the project-wide label can be overridden by passing a string to
    the template tag.

    For example:
        {% project_home_breadcrumb_bs4 'Custom Label' %}


The entry point for a yaz script

    This will almost always be called from a python script in
    the following manner:

        if __name__ == "__main__":
            yaz.main()

    This function will perform the following steps:

    1. It will load any additional python code from
       the yaz_extension python module located in the
       ~/.yaz directory when LOAD_YAZ_EXTENSION is True
       and the yaz_extension module exists

    2. It collects all yaz tasks and plugins.  When WHITE_LIST
       is a non-empty list, only the tasks and plugins located
       therein will be considered

    3. It will parse arguments from ARGV, or the command line
       when ARGV is not given, resulting in a yaz task or a parser
       help message.

    4. When a suitable task is found, this task is executed.  In
       case of a task which is part of a plugin, i.e. class, then
       this plugin is initialized, possibly resulting in other
       plugins to also be initialized if there are marked as
       `@yaz.dependency`.


Returns a tree of Task instances

    The tree is comprised of dictionaries containing strings for
    keys and either dictionaries or Task instances for values.

    When WHITE_LIST is given, only the tasks and plugins in this
    list will become part of the task tree.  The WHITE_LIST may
    contain either strings, corresponding to the task of plugin
    __qualname__, or, preferable, the WHITE_LIST contains
    links to the task function or plugin class instead.


Declare a function or method to be a Yaz task

    @yaz.task
    def talk(message: str = "Hello World!"):
        return message

    Or... group multiple tasks together

    class Tools(yaz.Plugin):
        @yaz.task
        def say(self, message: str = "Hello World!"):
            return message

        @yaz.task(option__choices=["A", "B", "C"])
        def choose(self, option: str = "A"):
            return option


Returns a list of parameters


Returns an instance of a fully initialized plugin class

    Every plugin class is kept in a plugin cache, effectively making
    every plugin into a singleton object.

    When a plugin has a yaz.dependency decorator, it will be called
    as well, before the instance is returned.


Given an lxml Element of a GML geometry, returns a dict in GeoJSON format.


Returns a masked array with anything outside of values masked.
    The minv and maxv parameters take precendence over any dict values.
    The valid_range attribute takes precendence over the valid_min and
    valid_max attributes.


If input object is an ndarray it will be converted into a dict
        holding dtype, shape and the data, base64 encoded.


Get lines sampled accross all threads, in order
        from most to least sampled.


leftSibling
        previousSibling
        leftSib
        prevSib
        lsib
        psib

        have the same parent,and on the left


rightSibling
        nextSibling
        rightSib
        nextSib
        rsib
        nsib

        have the same parent,and on the right


rightCousin
        nextCousin
        rightCin
        nextCin
        rcin
        ncin

        parents are neighbors,and on the right


_creat_child_desc
            update depth,parent_breadth_path,parent_path,sib_seq,path,lsib_path,rsib_path,lcin_path,rcin_path


_upgrade_breadth_info
            update breadth, breadth_path, and add desc to desc_level


Parse command content from the LaTeX source.

        Parameters
        ----------
        source : `str`
            The full source of the tex document.

        Yields
        ------
        parsed_command : `ParsedCommand`
            Yields parsed commands instances for each occurence of the command
            in the source.


r"""Attempt to parse a single token on the first line of this source.

        This method is used for parsing whitespace-delimited arguments, like
        ``\input file``. The source should ideally contain `` file`` along
        with a newline character.

        >>> source = 'Line 1\n' r'\input test.tex' '\nLine 2'
        >>> LatexCommand._parse_whitespace_argument(source, 'input')
        'test.tex'

        Bracket delimited arguments (``\input{test.tex}``) are handled in
        the normal logic of `_parse_command`.


Returns a list of TMDDEventConverter elements.

        doc is an XML Element containing one or more <FEU> events


Returns a Pandas DataFrame of the data.
        This always returns positive down depths