Convenience method for creating ResourceRecordSets. Most of the calls
        are basically the same, this saves on repetition.

        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created ResourceRecordSet sub-class
             instance.


Creates and returns an A record attached to this hosted zone.

        :param str name: The fully qualified name of the record to add.
        :param list values: A list of value strings for the record.
        :keyword int ttl: The time-to-live of the record (in seconds).
        :keyword int weight: *For weighted record sets only*. Among resource record
            sets that have the same combination of DNS name and type, a value
            that determines what portion of traffic for the current resource
            record set is routed to the associated location. Ranges from 0-255.
        :keyword str region: *For latency-based record sets*. The Amazon EC2 region
            where the resource that is specified in this resource record set
            resides.
        :keyword str set_identifier: *For weighted and latency resource record
            sets only*. An identifier that differentiates among multiple
            resource record sets that have the same combination of DNS name
            and type. 1-128 chars.
        :keyword str alias_hosted_zone_id: Alias A records have this specified.
            It appears to be the hosted zone ID for the ELB the Alias points at.
        :keyword str alias_dns_name: Alias A records have this specified. It is
            the DNS name for the ELB that the Alias points to.
        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created
            :py:class:`AResourceRecordSet <route53.resource_record_set.AResourceRecordSet>`
            instance.


Creates a CNAME record attached to this hosted zone.

        :param str name: The fully qualified name of the record to add.
        :param list values: A list of value strings for the record.
        :keyword int ttl: The time-to-live of the record (in seconds).
        :keyword int weight: *For weighted record sets only*. Among resource record
            sets that have the same combination of DNS name and type, a value
            that determines what portion of traffic for the current resource
            record set is routed to the associated location. Ranges from 0-255.
        :keyword str region: *For latency-based record sets*. The Amazon EC2 region
            where the resource that is specified in this resource record set
            resides.
        :keyword str set_identifier: *For weighted and latency resource record
            sets only*. An identifier that differentiates among multiple
            resource record sets that have the same combination of DNS name
            and type. 1-128 chars.
        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created CNAMEResourceRecordSet instance.


Creates a MX record attached to this hosted zone.

        :param str name: The fully qualified name of the record to add.
        :param list values: A list of value strings for the record.
        :keyword int ttl: The time-to-live of the record (in seconds).
        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created MXResourceRecordSet instance.


Creates a NS record attached to this hosted zone.

        :param str name: The fully qualified name of the record to add.
        :param list values: A list of value strings for the record.
        :keyword int ttl: The time-to-live of the record (in seconds).
        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created NSResourceRecordSet instance.


Creates a SPF record attached to this hosted zone.

        :param str name: The fully qualified name of the record to add.
        :param list values: A list of value strings for the record.
        :keyword int ttl: The time-to-live of the record (in seconds).
        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created SPFResourceRecordSet instance.


Creates a TXT record attached to this hosted zone.

        :param str name: The fully qualified name of the record to add.
        :param list values: A list of value strings for the record.
        :keyword int ttl: The time-to-live of the record (in seconds).
        :keyword int weight: *For weighted record sets only*. Among resource record
            sets that have the same combination of DNS name and type, a value
            that determines what portion of traffic for the current resource
            record set is routed to the associated location. Ranges from 0-255.
        :keyword str region: *For latency-based record sets*. The Amazon EC2 region
            where the resource that is specified in this resource record set
            resides.
        :keyword str set_identifier: *For weighted and latency resource record
            sets only*. An identifier that differentiates among multiple
            resource record sets that have the same combination of DNS name
            and type. 1-128 chars.
        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created TXTResourceRecordSet instance.


Register a user-defined text frame key.

        Some ID3 tags are stored in TXXX frames, which allow a
        freeform 'description' which acts as a subkey,
        e.g. TXXX:BARCODE.::

            EasyID3.RegisterTXXXKey('barcode', 'BARCODE').


Creates an XML element for the change.

    :param tuple change: A change tuple from a ChangeSet. Comes in the form
        of ``(action, rrset)``.
    :rtype: lxml.etree._Element
    :returns: A fully baked Change tag.


Forms an XML string that we'll send to Route53 in order to change
    record sets.

    :param Route53Connection connection: The connection instance used to
        query the API.
    :param change_set.ChangeSet change_set: The ChangeSet object to create the
        XML doc from.
    :keyword str comment: An optional comment to go along with the request.


Initiate log file.


Gets an item by its alias.


Joins the map structure into HTML attributes.

    The return value is a 2-tuple ``(template, ordered_values)``. It should be
    passed into :class:`markupsafe.Markup` to prevent XSS attacked.

    e.g.::

        >>> join_html_attrs({'href': '/', 'data-active': 'true'})
        ('data-active="{0}" href="{1}"', ['true', '/'])


Initializes an app to work with this extension.

        The app-context signals will be subscribed and the template context
        will be initialized.

        :param app: the :class:`flask.Flask` app instance.


Calls the initializers of all bound navigation bars.


Binds a navigation bar into this extension instance.


The arguments which will be passed to ``url_for``.

        :type: :class:`dict`


The final url of this navigation item.

        By default, the value is generated by the :attr:`self.endpoint` and
        :attr:`self.args`.

        .. note::

           The :attr:`url` property require the app context without a provided
           config value :const:`SERVER_NAME`, because of :func:`flask.url_for`.

        :type: :class:`str`


``True`` if current request has same endpoint with the item.

        The property should be used in a bound request context, or the
        :class:`RuntimeError` may be raised.


Fetches a statistics based on the given class name. Does a look-up
    in the gadgets' registered statistics to find the specified one.


Calculates all of the metrics associated with the registered gadgets.


Returns a CSV dump of all of the specified metric's counts
    and cumulative counts.


Command handler for the "metrics" command.


Tries to extract a boolean variable from the specified request.


Returns the default GET parameters for a particular Geckoboard
    view request.


Searches the GET variables for metric UIDs, and displays
    them in a RAG widget.


Returns the data for a line chart for the specified metric.


Returns a Geck-o-Meter control for the specified metric.


Returns a funnel chart for the metrics specified in the GET variables.


Returns all of the active statistics for the gadgets currently registered.


Registers a gadget object.
        If a gadget is already registered, this will raise AlreadyRegistered.


Performs sanitation of the path after validating

    :param path: path to sanitize
    :return: path
    :raises:
        - InvalidPath if the path doesn't start with a slash


Ensures the passed schema instance is compatible

    :param obj: object to validate
    :return: obj
    :raises:
        - IncompatibleSchema if the passed schema is of an incompatible type


Attaches a flask.Blueprint to the bundle

        :param bp: :class:`flask.Blueprint` object
        :param description: Optional description string
        :raises:
            - InvalidBlueprint if the Blueprint is not of type `flask.Blueprint`


Returns the DottedRule that results from moving the dot.


Computes the intermediate FIRST set using symbols.


Computes the initial closure using the START_foo production.


Fills out the entire closure based on some initial dotted rules.

        Args:
            rules - an iterable of DottedRules

        Returns: frozenset of DottedRules


Initializes Journey extension

        :param app: App passed from constructor or directly to init_app
        :raises:
            - NoBundlesAttached if no bundles has been attached attached


Returns simple info about registered blueprints

        :return: Tuple containing endpoint, path and allowed methods for each route


Register and return info about the registered blueprint

        :param bp: :class:`flask.Blueprint` object
        :param bundle_path: the URL prefix of the bundle
        :param child_path: blueprint relative to the bundle path
        :return: Dict with info about the blueprint


Returns detailed information about registered blueprint routes matching the `BlueprintBundle` path

        :param app: App instance to obtain rules from
        :param base_path: Base path to return detailed route info for
        :return: List of route detail dicts


Computes the precedence of terminal and production.

        The precedence of a terminal is it's level in the PRECEDENCE tuple. For
        a production, the precedence is the right-most terminal (if it exists).
        The default precedence is DEFAULT_PREC - (LEFT, 0).

        Returns:
            precedence - dict[terminal | production] = (assoc, level)


Generates the ACTION and GOTO tables for the grammar.

        Returns:
            action - dict[state][lookahead] = (action, ...)
            goto - dict[state][just_reduced] = new_state


Return the antecedents and the consequent of a definite clause.


Auxiliary routine to implement tt_entails.


Return a list of all propositional symbols in x.


A variable is an Expr with no args and a lowercase symbol as the op.


Remove the sentence's clauses from the KB.


Updates the cache with setting values from the database.


Search game to determine best action; use alpha-beta pruning.
    This version cuts off search and uses an evaluation function.


If X wins with this move, return 1; if O return -1; else return 0.


Return true if there is a line through move on board for player.


Update a dict, or an object with slots, according to `entries` dict.

    >>> update({'a': 1}, a=10, b=20)
    {'a': 10, 'b': 20}
    >>> update(Struct(a=1), a=10, b=20)
    Struct(a=10, b=20)


Return a random-sample function that picks from seq weighted by weights.


Format args with the first argument as format string, and write.
    Return the last arg, or format itself if there are no args.


Just count how many times each value of each input attribute
    occurs, conditional on the target value. Count the different
    target values too.


Number of bits to represent the probability distribution in values.


Given a list of learning algorithms, have them vote.


Return a predictor that takes a weighted vote.


Copy dataset, replicating each example in proportion to its weight.


Leave one out cross-validation over the dataset.


Generate a DataSet with n examples.


2 inputs are chosen uniformly from (0.0 .. 2.0]; output is xor of ints.


Compare various learners on various datasets using cross-validation.
    Print results as a table.


Check that my fields make sense.


Raise ValueError if example has any invalid values.


Returns the number used for attr, which can be a name, or -n .. n-1.


Return a copy of example, with non-input attributes replaced by None.


Add an observation o to the distribution.


Include o among the possible observations, whether or not
        it's been observed yet.


Minimum-remaining-values heuristic.


Least-constraining-values heuristic.


Prune neighbor values inconsistent with var=value.


Solve a CSP by stochastic hillclimbing on the number of conflicts.


Return the value that will give var the least number of conflicts.
    If there is a tie, choose at random.


Start accumulating inferences from assuming var=value.


Rule out var=value.


Return a list of variables in current assignment that are in conflict


The number of conflicts, as recorded with each assignment.
        Count conflicts in row and in up, down diagonals. If there
        is a queen there, it can't conflict with itself, so subtract 3.


Record conflicts caused by addition or deletion of a Queen.


Print error and stop command


Build up a random sample of text nwords words long, using
        the conditional probability given the n-1 preceding words.


Compute a score for this word on this docid.


Present the results as a list.


Return a score for text based on how common letters pairs are.


Score is product of word scores, unigram scores, and bigram scores.
        This can get very small, so we use logs and exp.


The expected utility of doing a in state s, according to the MDP and U.


Return the state that results from going in this direction.


Returns a ``SettingDict`` object for this queryset.


Creates and returns an object of the appropriate type for ``value``.


Returns ``True`` if this model should be used to store ``value``.

        Checks if ``value`` is an instance of ``value_type``. Override this
        method if you need more advanced behaviour. For example, to distinguish
        between single and multi-line text.


One possible schedule function for simulated annealing


Call genetic_algorithm on the appropriate parts of a problem.
    This requires the problem to have states that can mate and mutate,
    plus a value method that scores states.


Print the board in a 2-d array.


Return a list of lists, where the i-th element is the list of indexes
    for the neighbors of square i.


List the nodes reachable in one step from this node.


Return a list of nodes forming the path from the root to this node.


Add a link from A and B of given distance, and also add the inverse
        link if the graph is undirected.


Set the board, and find all the words in it.


The total score for the words found, according to the rules.


Wrap the agent's program to print its input and output. This will let
    you see what the agent is doing in the environment.


Run the Environment for given number of time steps.


Return all things exactly at a given location.


Remove a thing from the environment.


Return all things within radius of location.


By default, agent perceives things within a default radius.


Move a thing to a new location.


Put walls around the entire perimeter of the grid.


Parse a list of words; according to the grammar.
        Leave results in the chart.


Add edge to chart, and see if it extends or predicts another edge.


Add to chart any rules for B that could help extend this edge.


See what edges can be extended by this edge.


Adds a ``SettingDict`` object for the ``Setting`` model to the context as
    ``SETTINGS``. Automatically creates non-existent settings with an empty
    string as the default value.


Return the factor for var in bn's joint distribution given e.
    That is, bn's full joint distribution, projected to accord with e,
    is the pointwise product of these factors for bn's variables.


Eliminate var from all factors by summing over its values.


Yield every way of extending e with values for all vars.


Sample an event from bn that's consistent with the evidence e;
    return the event and its weight, the likelihood that the event
    accords to the evidence.


Show the probabilities rounded and sorted by key, for the
        sake of portable doctests.


Add a node to the net. Its parents must already be in the
        net, and its variable must not.


Multiply two factors, combining their variables.


Make a factor eliminating var by summing over its values.


Takes a hls color and converts to proper hue
        Bulbs use a BGR order instead of RGB


Takes your standard rgb color
        and converts it to a proper hue value


Takes an HTML hex code
        and converts it to a proper hue value


Wait for x seconds
            each wait command is 100ms


Return json from querying Web Api

		Args:
			view: django view function.
			request: http request object got from django.

		Returns: json format dictionary


put text on on screen
    a tuple as first argument tells absolute position for the text
    does not change TermCursor position
    args = list of optional position, formatting tokens and strings


get user input without echo


get character. waiting for key


tweaked from source of base


getProcessOwner - Get the process owner of a pid

        @param pid <int> - process id

        @return - None if process not found or can't be determined. Otherwise, a dict:
            {
                uid  - Owner UID
                name - Owner name, or None if one cannot be determined
            }


scanProcessForCwd - Searches a given pid's cwd for a given pattern

            @param pid <int> - A running process ID on this system
            @param searchPortion <str> - Any portion of directory to search
            @param isExactMatch <bool> Default False - If match should be exact, otherwise a partial match is performed.

            @return <dict> - If result is found, the following dict is returned. If no match found on the given pid, or pid is not found running, None is returned.
                {
                    'searchPortion' : The passed search pattern
                    'pid'           : The passed pid (as an integer)
                    'owner'         : String of process owner, or uid if no mapping can be found, or "unknown" if neither could be determined.
                    'cmdline'       : Commandline string
                    'cwd'           : The exact cwd of matched process
                }


scanAllProcessesForCwd - Scans all processes on the system for a given search pattern.

            @param searchPortion <str> - Any portion of directory to search
            @param isExactMatch <bool> Default False - If match should be exact, otherwise a partial match is performed.

        @return - <dict> - A dictionary of pid -> cwdResults for each pid that matched the search pattern. For format of "cwdResults", @see scanProcessForCwd


scanAllProcessesForMapping - Scans all processes on the system for a given search pattern.

            @param searchPortion <str> - A mapping for which to search, example: libc or python or libz.so.1. Give empty string to return all mappings.
            @param isExactMatch <bool> Default False - If match should be exact, otherwise a partial match is performed.
            @param ignoreCase <bool> Default False - If True, search will be performed case-insensitively

        @return - <dict> - A dictionary of pid -> mappingResults for each pid that matched the search pattern. For format of "mappingResults", @see scanProcessForMapping


scanProcessForOpenFile - Scans open FDs for a given pid to see if any are the provided searchPortion

            @param searchPortion <str> - Filename to check
            @param isExactMatch <bool> Default True - If match should be exact, otherwise a partial match is performed.
            @param ignoreCase <bool> Default False - If True, search will be performed case-insensitively

        @return -  If result is found, the following dict is returned. If no match found on the given pid, or the pid is not found running, None is returned.
                {
                    'searchPortion' : The search portion provided
                    'pid'           : The passed pid (as an integer)
                    'owner'         : String of process owner, or "unknown" if one could not be determined
                    'cmdline'       : Commandline string
                    'fds'           : List of file descriptors assigned to this file (could be mapped several times)
                    'filenames'     : List of the filenames matched
                }


scanAllProcessessForOpenFile - Scans all processes on the system for a given filename

            @param searchPortion <str> - Filename to check
            @param isExactMatch <bool> Default True - If match should be exact, otherwise a partial match is performed.
            @param ignoreCase <bool> Default False - If True, search will be performed case-insensitively

        @return - <dict> - A dictionary of pid -> mappingResults for each pid that matched the search pattern. For format of "mappingResults", @see scanProcessForOpenFile


Get current light data as dictionary with light zids as keys.


Get current light data, set and return as list of Bulb objects.


Set color and brightness of bulb.


Update light objects to their current values.


This function takes a file path beginning with edgar and stores the form in a directory.
        The default directory is sec_filings but can be changed through a keyword argument.


read file as is


Clean up after ourselves, removing created files.
    @param {[String]} A list of file paths specifying the files we've created
        during run. Will all be deleted.
    @return {None}


Crawl the root directory downwards, generating an index HTML file in each
    directory on the way down.
    @param {String} root_dir - The top level directory to crawl down from. In
        normal usage, this will be '.'.
    @param {Boolean=False} force_no_processing - If True, do not attempt to
        actually process thumbnails, PIL images or anything. Simply index
        <img> tags with original file src attributes.
    @return {[String]} Full file paths of all created files.


Get an instance of PIL.Image from the given file.
    @param {String} dir_path - The directory containing the image file
    @param {String} image_file - The filename of the image file within dir_path
    @return {PIL.Image} An instance of the image file as a PIL Image, or None
        if the functionality is not available. This could be because PIL is not
        present, or because it can't process the given file type.


Get a PIL.Image from the given image file which has been scaled down to
    THUMBNAIL_WIDTH wide.
    @param {String} dir_path - The directory containing the image file
    @param {String} image_file - The filename of the image file within dir_path
    @return {PIL.Image} An instance of the thumbnail as a PIL Image, or None
        if the functionality is not available. See _get_image_from_file for
        details.


Run the image server. This is blocking. Will handle user KeyboardInterrupt
    and other exceptions appropriately and return control once the server is
    stopped.
    @return {None}


Generate indexes and run server from the given directory downwards.
    @param {String} dir_path - The directory path (absolute, or relative to CWD)
    @return {None}


USE carefully ^^


Returns the team ID of the winning team. Returns NaN if a tie.


Returns a DataFrame where each row is an entry in the starters table
        from PFR.

        The columns are:
        * player_id - the PFR player ID for the player (note that this column
        is not necessarily all unique; that is, one player can be a starter in
        multiple positions, in theory).
        * playerName - the listed name of the player; this too is not
        necessarily unique.
        * position - the position at which the player started for their team.
        * team - the team for which the player started.
        * home - True if the player's team was at home, False if they were away
        * offense - True if the player is starting on an offensive position,
        False if defense.

        :returns: A pandas DataFrame. See the description for details.


The playing surface on which the game was played.

        :returns: string representing the type of surface. Returns np.nan if
        not avaiable.


Returns a dictionary of weather-related info.

        Keys of the returned dict:
        * temp
        * windChill
        * relHumidity
        * windMPH

        :returns: Dict of weather data.


Gets a dictionary of ref positions and the ref IDs of the refs for
        that game.

        :returns: A dictionary of ref positions and IDs.


Returns a list of BoxScore IDs for every game in the season.
        Only needs to handle 'R' or 'P' options because decorator handles 'B'.

        :param kind: 'R' for regular season, 'P' for playoffs, 'B' for both.
            Defaults to 'R'.
        :returns: DataFrame of schedule information.
        :rtype: pd.DataFrame


Returns a DataFrame containing standings information.


Helper function for stats tables on season pages. Returns a
        DataFrame.


Returns a DataFrame containing information about ROY voting.


Returns a DataFrame of player stats from the game (either basic or
        advanced, depending on the argument.

        :param table_id_fmt: Format string for str.format with a placeholder
            for the team ID (e.g. 'box_{}_basic')
        :returns: DataFrame of player stats


Decorator that switches to given directory before executing function, and
    then returning to orignal directory.


Returns a unique identifier for a class instantiation.


A decorator for memoizing functions.

    Only works on functions that take simple arguments - arguments that take
    list-like or dict-like arguments will not be memoized, and this function
    will raise a TypeError.


Returns a DataFrame of per-game box score stats.


Returns a DataFrame of per-36-minutes stats.


Returns a DataFrame of per-100-possession stats.


Returns a DataFrame of advanced stats.


Returns a DataFrame of play-by-play stats.


Returns a table of a player's basic game-by-game stats for a season.

        :param year: The year representing the desired season.
        :param kind: specifies regular season, playoffs, or both. One of 'R',
            'P', 'B'. Defaults to 'R'.
        :returns: A DataFrame of the player's standard boxscore stats from each
            game of the season.
        :rtype: pd.DataFrame


Converts a permutation into a permutation matrix.

    `matches` is a dictionary whose keys are vertices and whose values are
    partners. For each vertex ``u`` and ``v``, entry (``u``, ``v``) in the
    returned matrix will be a ``1`` if and only if ``matches[u] == v``.

    Pre-condition: `matches` must be a permutation on an initial subset of the
    natural numbers.

    Returns a permutation matrix as a square NumPy array.


Convenience function that creates a block matrix with the specified
    blocks.

    Each argument must be a NumPy matrix. The two top matrices must have the
    same number of rows, as must the two bottom matrices. The two left matrices
    must have the same number of columns, as must the two right matrices.


Returns the adjacency matrix of a bipartite graph whose biadjacency
    matrix is `A`.

    `A` must be a NumPy array.

    If `A` has **m** rows and **n** columns, then the returned matrix has **m +
    n** rows and columns.


Returns the Boolean matrix in the same shape as `D` with ones exactly
    where there are nonzero entries in `D`.

    `D` must be a NumPy array.


Expands the details column of the given dataframe and returns the
    resulting DataFrame.

    :df: The input DataFrame.
    :detailCol: The detail column name.
    :returns: Returns DataFrame with new columns from pbp parsing.


Adds extra convenience features based on teams with and without
    possession, with the precondition that the there are 'team' and 'opp'
    specified in row.

    :df: A DataFrame representing a game's play-by-play data after
        _clean_features has been called and 'team' and 'opp' have been added by
        _add_team_columns.
    :returns: A dict with new features in addition to previous features.


Gets the initial win probability of a game given its Vegas line.

    :line: The Vegas line from the home team's perspective (negative means
    home team is favored).
    :returns: A float in [0., 100.] that represents the win probability.


Gets yearly passing stats for the player.

        :kind: One of 'R', 'P', or 'B'. Case-insensitive; defaults to 'R'.
        :returns: Pandas DataFrame with passing stats.


Template for simple award functions that simply list years, such as
        pro bowls and first-team all pro.

        :award_id: The div ID that is appended to "leaderboard_" in selecting
        the table's div.
        :returns: List of years for the award.


Returns the real name of the franchise given the team ID.

        Examples:
        'nwe' -> 'New England Patriots'
        'sea' -> 'Seattle Seahawks'

        :returns: A string corresponding to the team's full name.


Returns a PyQuery object containing the info from the meta div at
        the top of the team year page with the given keyword.

        :year: Int representing the season.
        :keyword: A keyword to filter to a single p tag in the meta div.
        :returns: A PyQuery object for the selected p element.


Returns a DataFrame with schedule information for the given year.

        :year: The year for the season in question.
        :returns: Pandas DataFrame with schedule information.


Returns the coach ID for the team's DC in a given year.

        :year: An int representing the year.
        :returns: A string containing the coach ID of the DC.


Returns the ID for the stadium in which the team played in a given
        year.

        :year: The year in question.
        :returns: A string representing the stadium ID.


Returns the name of the defensive alignment the team ran in the
        given year.

        :year: Int representing the season year.
        :returns: A string representing the defensive alignment.


Gets the HTML for the given URL using a GET request.

    :url: the absolute URL of the desired page.
    :returns: a string of HTML.


Flattens relative URLs within text of a table cell to IDs and returns
    the result.

    :td: the PyQuery object for the HTML to convert
    :returns: the string with the links flattened to IDs


Converts a relative URL to a unique ID.

    Here, 'ID' refers generally to the unique ID for a given 'type' that a
    given datum has. For example, 'BradTo00' is Tom Brady's player ID - this
    corresponds to his relative URL, '/players/B/BradTo00.htm'. Similarly,
    '201409070dal' refers to the boxscore of the SF @ DAL game on 09/07/14.

    Supported types:
    * player/...
    * boxscores/...
    * teams/...
    * years/...
    * leagues/...
    * awards/...
    * coaches/...
    * officials/...
    * schools/...
    * schools/high_schools.cgi?id=...

    :returns: ID associated with the given relative URL.


Converts kwargs given to PSF to a querystring.

    :returns: the querystring.


Returns the result of incrementing `version`.

    If `which` is not specified, the "patch" part of the version number will be
    incremented.  If `which` is specified, it must be ``'major'``, ``'minor'``,
    or ``'patch'``. If it is one of these three strings, the corresponding part
    of the version number will be incremented instead of the patch number.

    Returns a string representing the next version number.

    Example::

        >>> bump_version('2.7.1')
        '2.7.2'
        >>> bump_version('2.7.1', 'minor')
        '2.8.0'
        >>> bump_version('2.7.1', 'major')
        '3.0.0'


Gets the current version from the specified file.

    This function assumes the file includes a string of the form::

        <pattern> = <version>


Prints the specified message and exits the program with the specified
    exit status.


Main function for the processes that read from the HDF5 file.

    :param self: A reference to the streamer object that created these processes.
    :param path: The HDF5 path to the node to be read from.
    :param read_size: The length of the block along the outer dimension to read.
    :param cbuf: The circular buffer to place read elements into.
    :param stop: The Event that signals the process to stop reading.
    :param barrier: The Barrier that synchonises read cycles.
    :param cyclic: True if the process should read cyclically.
    :param offset: Offset into the dataset that this process should start reading at.
    :param read_skip: How many element to skip on each iteration.
    :param sync: GuardSynchonizer to order writes to the buffer.
    :return: Nothing


Allows direct access to the buffer element.
        Blocks until there is room to write into the buffer.

        :return: A guard object that returns the buffer element.


Allows direct access to the buffer element.
        Blocks until there is data that can be read.

        :return: A guard object that returns the buffer element.


Close the queue, signalling that no more data can be put into the queue.


Get a block of data from the node at path.

        :param path: The path to the node to read from.
        :param length: The length along the outer dimension to read.
        :param last: True if the remainder elements should be read.
        :return: A copy of the requested block of data as a numpy array.


Get a generator that allows convenient access to the streamed data.
        Elements from the dataset are returned from the generator one row at a time.
        Unlike the direct access queue, this generator also returns the remainder elements.
        Additional arguments are forwarded to get_queue.
        See the get_queue method for documentation of these parameters.

        :param path:
        :return: A generator that iterates over the rows in the dataset.


initialize with templates' path
        parameters
          templates_path    str    the position of templates directory
          global_data       dict   globa data can be got in any templates


shortcut to render data with `template`. Just add exception
    catch to `renderer.render`


Get the DataFrame for this view.
        Defaults to using `self.dataframe`.

        This method should always be used rather than accessing `self.dataframe`
        directly, as `self.dataframe` gets evaluated only once, and those results
        are cached for all subsequent requests.

        You may want to override this if you need to provide different
        dataframes depending on the incoming request.


Indexes the row based on the request parameters.


Returns the row the view is displaying.

        You may want to override this if you need to provide non-standard
        queryset lookups.  Eg if objects are referenced using multiple
        keyword arguments in the url conf.


The paginator instance associated with the view, or `None`.


Return a single page of results, or `None` if pagination is disabled.


parse post source files name to datetime object


watch files for changes, if changed, rebuild blog. this thread
        will quit if the main process ends


Deploy new blog to current directory


Parse a stream.

    Args:
        ifp (string or file-like object): input stream.
        pb_cls (protobuf.message.Message.__class__): The class object of
            the protobuf message type encoded in the stream.


Write to a stream.

    Args:
        ofp (string or file-like object): output stream.
        pb_objs (*protobuf.message.Message): list of protobuf message objects
            to be written.


Close the stream.


Write a group of one or more protobuf objects to the file. Multiple
        object groups can be written by calling this method several times
        before closing stream or exiting the runtime context.

        The input protobuf objects get buffered and will be written down when
        the number of buffered objects exceed the `self._buffer_size`.

        Args:
            pb2_obj (*protobuf.message.Message): list of protobuf messages.


Returns joined game directory path relative to Steamapps


Temporarily update the context to use the BlockContext for the given alias.


Find the first matching block in the current block_context


Return a list of widget names for the provided field.


Allow reuse of a block within a template.

    {% reuse '_myblock' foo=bar %}

    If passed a list of block names, will use the first that matches:

    {% reuse list_of_block_names .... %}


When dealing with optgroups, ensure that the value is properly force_text'd.


Waits until conditions is True or returns a non-None value.
        If any of the trait is still not present after timeout, raises a TimeoutException.


Waits until all traits are present.
        If any of the traits is still not present after timeout, raises a TimeoutException.


Set a list of exceptions that should be ignored inside the wait loop.


Message instances are namedtuples of type `Message`.
        The date field is already serialized in datetime.isoformat ECMA-262 format


Send a message to a list of users without passing through `django.contrib.messages`

    :param users: an iterable containing the recipients of the messages
    :param level: message level
    :param message_text: the string containing the message
    :param extra_tags: like the Django api, a string containing extra tags for the message
    :param date: a date, different than the default timezone.now
    :param url: an optional url
    :param fail_silently: not used at the moment


Send a message to all users aka broadcast.

    :param level: message level
    :param message_text: the string containing the message
    :param extra_tags: like the Django api, a string containing extra tags for the message
    :param date: a date, different than the default timezone.now
    :param url: an optional url
    :param fail_silently: not used at the moment


Mark message instance as read for user.
    Returns True if the message was `unread` and thus actually marked as `read` or False in case
    it is already `read` or it does not exist at all.

    :param user: user instance for the recipient
    :param message: a Message instance to mark as read


If the message level was configured for being stored and request.user
        is not anonymous, save it to the database. Otherwise, let some other
        class handle the message.

        Notice: controls like checking the message is not empty and the level
        is above the filter need to be performed here, but it could happen
        they'll be performed again later if the message does not need to be
        stored.


persistent messages are already in the database inside the 'archive',
        so we can say they're already "stored".
        Here we put them in the inbox, or remove from the inbox in case the
        messages were iterated.

        messages contains only new msgs if self.used==True
        else contains both new and unread messages


Like the base class method, prepares a list of messages for storage
        but avoid to do this for `models.Message` instances.


Execute Main.Volume.

        Returns int


Send a command string to the amplifier.


Power the device off.


Power the device on.


Set volume level of the device. Accepts integer values 0-200.


Select a source from the list of sources.


Main entry point for script.


Generates crc32. Modulo keep the value within int range.


initializes a base logger

    you can use this to init a logger in any of your files.
    this will use config.py's LOGGER param and logging.dictConfig to configure
    the logger for you.

    :param int|logging.LEVEL base_level: desired base logging level
    :param int|logging.LEVEL verbose_level: desired verbose logging level
    :param dict logging_dict: dictConfig based configuration.
     used to override the default configuration from config.py
    :rtype: `python logger`


Configure an object with a user-supplied factory.


sets the global verbosity level for console and the jocker_lgr logger.

    :param bool is_verbose_output: should be output be verbose


generates a Dockerfile, builds an image and pushes it to DockerHub

    A `Dockerfile` will be generated by Jinja2 according to the `varsfile`
    imported. If build is true, an image will be generated from the
    `outputfile` which is the generated Dockerfile and committed to the
    image:tag string supplied to `build`.
    If push is true, a build will be triggered and the produced image
    will be pushed to DockerHub upon completion.

    :param string varsfile: path to file with variables.
    :param string templatefile: path to template file to use.
    :param string outputfile: path to output Dockerfile.
    :param string configfile: path to yaml file with docker-py config.
    :param bool dryrun: mock run.
    :param build: False or the image:tag to build to.
    :param push: False or the image:tag to build to. (triggers build)
    :param bool verbose: verbose output.


since the push process outputs a single unicode string consisting of
        multiple JSON formatted "status" lines, we need to parse it so that it
        can be read as multiple strings.

        This will receive the string as an input, count curly braces and ignore
        any newlines. When the curly braces stack is 0, it will append the
        entire string it has read up until then to a list and so forth.

        :param string: the string to parse
        :rtype: list of JSON's


Template filter that obfuscates whatever text it is applied to. The text is
    supposed to be a URL, but it will obfuscate anything.

    Usage:
        Extremely unfriendly URL:
        {{ "/my-secret-path/"|obfuscate }}

        Include some SEO juice:
        {{ "/my-secret-path/"|obfuscate:"some SEO friendly text" }}


It will return all hyper links found in the mr-jatt page for download


It will the resource URL if song is found,
		Otherwise it will return the list of songs that can be downloaded


It will parse google html response
			and return the first url


song_name is a list of strings
		website is a string
		It will return the url from where music file needs to be downloaded


Uploads an image file to Imgur


Return true if the IP address is in dotted decimal notation.


Return true if the IP address is in binary notation.


Return true if the netmask is in bits notatation.


Return true if the netmask is in wildcard bits notatation.


Decimal to dotted decimal notation conversion.


Hexadecimal to decimal conversion.


Generate a table to convert a whole byte to binary.
    This code was taken from the Python Cookbook, 2nd edition - O'Reilly.


Bits to decimal conversion.


Internally used to convert IPs and netmasks to other notations.


Sum two IP addresses.


Subtract two IP addresses.


Return the bits notation of the netmask.


Return the wildcard bits notation of the netmask.


Set the IP address and the netmask.


Change the current netmask.


Return true if the given address in amongst the usable addresses,
        or if the given CIDR is contained in this one.


Copy a file from one bucket into another


Recursively upload a ``folder`` into a backet.

        :param bucket: bucket where to upload the folder to
        :param folder: the folder location in the local file system
        :param key: Optional key where the folder is uploaded
        :param skip: Optional list of files to skip
        :param content_types: Optional dictionary mapping suffixes to
            content types
        :return: a coroutine


Decode AQICN observation response JSON into python object.


The list of logical paths which are used to search for an asset.
        This property makes sense only if the attributes was created with
        logical path.

        It is assumed that the logical path can be a directory containing a
        file named ``index`` with the same suffix.

        Example::

            >>> attrs = AssetAttributes(environment, 'js/app.js')
            >>> attrs.search_paths
            ['js/app.js', 'js/app/index.js']

            >>> attrs = AssetAttributes(environment, 'js/app/index.js')
            >>> attrs.search_paths
            ['js/models/index.js']


MIME type of the asset.


Implicit MIME type of the asset by its compilers.


Implicit format extension on the asset by its compilers.


Remove passed `processor` for passed `mimetype`. If processor for
        this MIME type does not found in the registry, nothing happens.


Register default compilers, preprocessors and MIME types.


Trigger an ``event`` on this channel


Connect to a Pusher websocket


This nasty piece of code is here to force the loading of IDA's
     Qt bindings.
    Without it, Python attempts to load PySide from the site-packages
     directory, and failing, as it does not play nicely with IDA.

    via: github.com/tmr232/Cute


Add the given plugin name to the list of plugin names registered in
      the current IDB.
    Note that this implicitly uses the open IDB via the idc iterface.


Export the given settings instance to the given file system path.

    type settings: IDASettingsInterface
    type config_path: str


Constant time string comparison


Decodes a limited set of HTML entities.


Set signature passphrases


Set encryption passphrases


Set algorithms used for sealing. Defaults can not be overridden.


Get algorithms used for sealing


Private function for setting options used for sealing


Verify sealed data signature


Encode data with specific algorithm


Decode data with specific algorithm


Add signature to data


Verify and remove signature


Read header from data


Remove header from data


Get algorithm info


Generate and return PBKDF2 key


Returns the response that should be used for any given exception.

    By default we handle the REST framework `APIException`, and also
    Django's builtin `Http404` and `PermissionDenied` exceptions.

    Any unhandled exceptions may return `None`, which will cause a 500 error
    to be raised.


Returns a list of tables for the given user.


Fetch packages and summary from Crates.io

        :param category: the category of items to fetch
        :param kwargs: backend arguments

        :returns: a generator of items


Extracts the identifier from an item depending on its type.


Extracts the update time from an item.

        Depending on the item, the timestamp is extracted from the
        'updated_at' or 'fetched_on' fields.
        This date is converted to UNIX timestamp format.

        :param item: item generated by the backend

        :returns: a UNIX timestamp


Get crate team owner


Get crate user owners


Get crate version downloads


Get crate data


Get Crates.io summary


Get crates in alphabetical order


Get a crate by its ID


Get crate attribute


Return the items from Crates.io API using pagination


Fetch questions from the Kitsune url.

        :param category: the category of items to fetch
        :offset: obtain questions after offset
        :returns: a generator of questions


Retrieve questions from older to newer updated starting offset


Fetch items from the ReMo url.

        The method retrieves, from a ReMo URL, the set of items
        of the given `category`.

        :param category: the category of items to fetch
        :param offset: obtain items after offset
        :returns: a generator of items


Extracts the category from a ReMo item.

        This backend generates items types 'event', 'activity'
        or 'user'. To guess the type of item, the code will look
        for unique fields.


Retrieve all items for category using pagination


The buffer list this instance operates on.

        Only available in mode != AIOBLOCK_MODE_POLL.

        Changes on a submitted transfer are not fully applied until its
        next submission: kernel will still be using original buffer list.


IO priority for this instance.


Cancels all pending IO blocks.
        Waits until all non-cancellable IO blocks finish.
        De-initialises AIO context.


Submits transfers.

        block_list (list of AIOBlock)
            The IO blocks to hand off to kernel.

        Returns the number of successfully submitted blocks.


Returns a list of event data from submitted IO blocks.

        min_nr (int, None)
            When timeout is None, minimum number of events to collect before
            returning.
            If None, waits for all submitted events.
        nr (int, None)
            Maximum number of events to return.
            If None, set to maxevents given at construction or to the number of
            currently submitted events, whichever is larger.
        timeout (float, None):
            Time to wait for events.
            If None, become blocking.

        Returns a list of 3-tuples, containing:
        - completed AIOBlock instance
        - res, file-object-type-dependent value
        - res2, another file-object-type-dependent value


Fetch events from the MozillaClub URL.

        The method retrieves, from a MozillaClub URL, the
        events. The data is a Google spreadsheet retrieved using
        the feed API REST.

        :param category: the category of items to fetch

        :returns: a generator of events


Retrieve all cells from the spreadsheet.


Parse the MozillaClub spreadsheet feed cells json.


This function will extract a single file from the remote zip without downloading
        the entire zip file. The filename argument should match whatever is in the 'filename'
        key of the tableOfContents.


Does photometry and estimates uncertainties by calculating the scatter around a linear fit to the data
        in each orientation. This function is called by other functions and generally the user will not need
        to interact with it directly.


Creates the figure shown in ``adjust_aperture`` for visualization purposes. Called by other functions
        and generally not called by the user directly.

        Args:
            img: The data frame to be passed through to be plotted. A cutout of the ``integrated_postcard``


Identify the centroid positions for the target star at all epochs. Useful for verifying that there is
        no correlation between flux and position, as might be expected for high proper motion stars.


Identify the "expected" flux value at the time of each observation based on the
        Kepler long-cadence data, to ensure variations observed are not the effects of a single
        large starspot. Only works if the target star was targeted for long or short cadence
        observations during the primary mission.


Load default permission factory.


Create Invenio-Records-UI blueprint.

    The factory installs one URL route per endpoint defined, and adds an
    error handler for rendering tombstones.

    :param endpoints: Dictionary of endpoints to be installed. See usage
        documentation for further details.
    :returns: The initialized blueprint.


r"""Display default view.

    Sends record_viewed signal and renders template.

    :param pid: PID object.
    :param record: Record object.
    :param template: Template to render.
    :param \*\*kwargs: Additional view arguments based on URL rule.
    :returns: The rendered template.


r"""Record serialization view.

    Serializes record with given format and renders record export template.

    :param pid: PID object.
    :param record: Record object.
    :param template: Template to render.
    :param \*\*kwargs: Additional view arguments based on URL rule.
    :return: The rendered template.


Send a Timer metric calculating duration of execution of the provided callable


Send a Timer metric with the specified duration in milliseconds


Send a GaugeDelta metric to change a Gauge by the specified value


Override parent by buffering the metric instead of sending now


Return a batch client with same settings of the client


My permission factory.


Return a TCP batch client with same settings of the TCP client


Return a TCPClient with same settings of the batch TCP client


tries to convert a Python object into an OpenMath object
    this is not a replacement for using a Converter for exporting Python objects
    instead, it is used conveniently building OM objects in DSL embedded in Python
    inparticular, it converts Python functions into OMBinding objects using lambdaOM as the binder


Converts a term into OpenMath, using either a converter or the interpretAsOpenMath method


Convert OpenMath object to Python


Convert Python object to OpenMath


Register a conversion from Python to OpenMath

        :param py_class: A Python class the conversion is attached to, or None
        :type py_class: None, type

        :param converter: A conversion function or an OpenMath object
        :type converter: Callable, OMAny

        :rtype: None

        ``converter`` will used to convert any object of type ``py_class``,
        or any object if ``py_class`` is ``None``. If ``converter`` is an
        OpenMath object, it is returned immediately. If it is a callable, it
        is called with the Python object as paramter; in this case, it must
        either return an OpenMath object, or raise an exception.  The
        special exception ``CannotConvertError`` can be used to signify that
        ``converter`` does not know how to convert the current object, and that
        ``to_openmath`` shall continue with the other converters. Any other
        exception stops conversion immediately.

        Converters registered by this function are called in order from the
        most recent to the oldest.


Register a conversion from OpenMath to Python

        This function has two forms. A three-arguments one:

        :param cd: A content dictionary name
        :type cd: str

        :param name: A symbol name
        :type name: str

        :param converter: A conversion function, or a Python object
        :type: Callable, Any

        Any object of type ``openmath.OMSymbol``, with content
        dictionary equal to ``cd`` and name equal to ``name`` will be converted
        using ``converter``. Also, any object of type ``openmath.OMApplication``
        whose first child is an ``openmath.OMSymbol`` as above will be converted
        using ``converter``. If ``converter`` is a callable, it will be called with the
        OpenMath object as parameter; otherwise ``converter`` will be returned.

        In the two-argument form

        :param cd: A subclass of ``OMAny``
        :type cd: type

        :param name: A conversion function
        :type name: Callable

        Any object of type ``cd`` will be passed to ``name()``, and the
        result will be returned. This forms is mainly to override default
        conversions for basic OpenMath tags (OMInteger, OMString, etc.). It
        is discouraged to use it for ``OMSymbol`` and ``OMApplication``.


Used to initialize redis with app object


django_any birds language parser


Register form field data function.

        Could be used as decorator


Lowest value generator.

        Separated from __call__, because it seems that python
        cache __call__ reference on module import


Dump single field.


Disassemble serialized protocol buffers file.


Find all missing imports in list of Pbd instances.


Sometimes return None if field is not required

    >>> result = any_form_field(forms.BooleanField(required=False))
    >>> result in ['', 'True', 'False']
    True


Selection from field.choices


Return random value for DecimalField

    >>> result = any_form_field(forms.DecimalField(max_value=100, min_value=11, max_digits=4, decimal_places = 2))
    >>> type(result)
    <type 'str'>
    >>> from decimal import Decimal
    >>> Decimal(result) >= 11, Decimal(result) <= Decimal('99.99')
    (True, True)


Return random value for EmailField

    >>> result = any_form_field(forms.EmailField(min_length=10, max_length=30))
    >>> type(result)
    <type 'str'>
    >>> len(result) <= 30, len(result) >= 10
    (True, True)


Return random value for DateTimeField

    >>> result = any_form_field(forms.DateTimeField())
    >>> type(result)
    <type 'str'>


Return random value for FloatField

    >>> result = any_form_field(forms.FloatField(max_value=200, min_value=100))
    >>> type(result)
    <type 'str'>
    >>> float(result) >=100, float(result) <=200
    (True, True)


Return random value for IntegerField

    >>> result = any_form_field(forms.IntegerField(max_value=200, min_value=100))
    >>> type(result)
    <type 'str'>
    >>> int(result) >=100, int(result) <=200
    (True, True)


Return random value for TimeField

    >>> result = any_form_field(forms.TimeField())
    >>> type(result)
    <type 'str'>


Return random value for ChoiceField

    >>> CHOICES = [('YNG', 'Child'), ('OLD', 'Parent')]
    >>> result = any_form_field(forms.ChoiceField(choices=CHOICES))
    >>> type(result)
    <type 'str'>
    >>> result in ['YNG', 'OLD']
    True
    >>> typed_result = any_form_field(forms.TypedChoiceField(choices=CHOICES))
    >>> typed_result in ['YNG', 'OLD']
    True


Return random value for MultipleChoiceField

    >>> CHOICES = [('YNG', 'Child'), ('MIDDLE', 'Parent') ,('OLD', 'GrandParent')]
    >>> result = any_form_field(forms.MultipleChoiceField(choices=CHOICES))
    >>> type(result)
    <type 'str'>


Return one of first ten items for field queryset


Deploy the app to PYPI.

    Args:
        msg (str, optional): Description


Deploy a version tag.


Sometimes return None if field could be blank


Evaluate an OpenMath symbol describing a global Python object

    EXAMPLES::

        >>> from openmath.convert_pickle import to_python
        >>> from openmath.convert_pickle  import load_python_global
        >>> load_python_global('math', 'sin')
        <built-in function sin>

        >>> from openmath import openmath as om
        >>> o = om.OMSymbol(cdbase="http://python.org/", cd='math', name='sin')
        >>> to_python(o)
        <built-in function sin>


Apply the setstate protocol to initialize `inst` from `state`.

    INPUT:

    - ``inst`` -- a raw instance of a class
    - ``state`` -- the state to restore; typically a dictionary mapping attribute names to their values

    EXAMPLES::

        >>> from openmath.convert_pickle import cls_build
        >>> class A(object): pass
        >>> inst = A.__new__(A)
        >>> state = {"foo": 1, "bar": 4}
        >>> inst2 = cls_build(inst,state)
        >>> inst is inst2
        True
        >>> inst.foo
        1
        >>> inst.bar
        4


Convert a list of OM objects into an OM object

        EXAMPLES::

            >>> from openmath import openmath as om
            >>> from openmath.convert_pickle  import PickleConverter
            >>> converter = PickleConverter()
            >>> o = converter.OMList([om.OMInteger(2), om.OMInteger(2)]); o
            OMApplication(elem=OMSymbol(name='list', cd='Python', id=None, cdbase='http://python.org/'),
                     arguments=[OMInteger(integer=2, id=None),
                                OMInteger(integer=2, id=None)],
                     id=None, cdbase=None)
            >>> converter.to_python(o)
            [2, 2]


Decodes a PackBit encoded data.


Encodes data using PackBits encoding.


Helper function to record and log an error message

        :param line_data: dict
        :param error_info: dict
        :param logger:
        :param log_level: int
        :return:


1. get a list of CDS with the same parent
        2. sort according to strand
        3. calculate and validate phase


Format a given number.

        Format a number, with comma-separated thousands and
        custom precision/decimal places

        Localise by overriding the precision and thousand / decimal separators
        2nd parameter `precision` can be an object matching `settings.number`

        Args:
            number (TYPE): Description
            precision (TYPE): Description
            thousand (TYPE): Description
            decimal (TYPE): Description

        Returns:
            name (TYPE): Description


Format a number into currency.

        Usage: accounting.formatMoney(number, symbol, precision, thousandsSep,
                                      decimalSep, format)
        defaults: (0, "$", 2, ",", ".", "%s%v")
        Localise by overriding the symbol, precision,
        thousand / decimal separators and format
        Second param can be an object matching `settings.currency`
        which is the easiest way.

        Args:
            number (TYPE): Description
            precision (TYPE): Description
            thousand (TYPE): Description
            decimal (TYPE): Description

        Returns:
            name (TYPE): Description


given a filename, return the ABFs ID string.


given the bytestring ABF header, make and launch HTML.


iterate over every sweep


read the header and populate self with information about comments


given a sweep, return the protocol as condensed sequence.
        This is better for comparing similarities and determining steps.
        There should be no duplicate numbers.


return the average of part of the current sweep.


Return a sweep which is the average of multiple sweeps.
        For now, standard deviation is lost.


create kernel based on this ABF info.


Get the filtered sweepY of the current sweep.
        Only works if self.kernel has been generated.


given a key, return a list of values from the matrix with that key.


given a recarray, return it as a list of dicts.


show everything we can about an object's projects and methods.


Put 2d numpy data into a temporary HTML file.


mono-exponential curve.


Try to format anything as a 2D matrix with column names.


save something to a pickle file


determine the comment cooked in the protocol.


given an ABF file name, return the ABF of its parent.


given an ABF and the groups dict, return the ID of its parent.


given an ABF, find the parent, return that line of experiments.txt


May be given an ABF object or filename.


return an "FTP" object after logging in.


upload everything from localFolder into the current FTP folder.


use the GUI to ask for a string.


Import a blosc array into a numpy array.

    Arguments:
        data: A blosc packed numpy array

    Returns:
        A numpy array with data from a blosc compressed array


Export a numpy array to a blosc array.

    Arguments:
        array: The numpy array to compress to blosc array

    Returns:
        Bytes/String. A blosc compressed array


Add a workspace entry in user config file.


List all available workspaces.


Return True if workspace contains repository name.


Synchronise workspace's repositories.


check out the arguments and figure out what to do.


Clone a repository.


Converts an array to its voxel list.

    Arguments:
        array (numpy.ndarray): A numpy nd array. This must be boolean!

    Returns:
        A list of n-tuples


Execute update subcommand.


Print repository update.


Execute command with os.popen and return output.


Import a png file into a numpy array.

    Arguments:
        png_filename (str): A string filename of a png datafile

    Returns:
        A numpy array with data from the png file


Export a numpy array to a png file.

    Arguments:
        filename (str): A filename to which to save the png data
        numpy_data (numpy.ndarray OR str): The numpy array to save to png.
            OR a string: If a string is provded, it should be a binary png str

    Returns:
        str. The expanded filename that now holds the png data

    Raises:
        ValueError: If the save fails; for instance if the binary string data
            cannot be coerced into a png, or perhaps your numpy.ndarray is
            ill-formed?


provide all stats on the first AP.


Print workspace status.


Print repository status.


easy way to plot a gain function.


draw vertical lines at comment points. Defaults to seconds.


stamp the bottom with file info.


makes a new matplotlib figure with default dims and DPI.
    Also labels it with pA or mV depending on ABF.


Import a TIFF file into a numpy array.

    Arguments:
        tiff_filename:  A string filename of a TIFF datafile

    Returns:
        A numpy array with data from the TIFF file


When dynamic, not all argument values may be available.


Summarizes the trace of values used to update the DynamicArgs
        and the arguments subsequently returned. May be used to
        implement the summary method.


Takes as input a list or tuple of two elements. First the
        value returned by incrementing by 'stepsize' followed by the
        value returned after a 'stepsize' decrement.


given a filename or ABF object, try to analyze it.


Get version from package resources.


frame the current matplotlib plot with ABF info, and optionally save it.
    Note that this is entirely independent of the ABFplot class object.
    if saveImage is False, show it instead.

    Datatype should be:
        * plot
        * experiment


make sure a figure is ready.


save the existing figure. does not close it.


plot every sweep of an ABF file.


plot the current sweep protocol.


plot the protocol of all sweeps.


Same as mix_and_match, but using the @option decorator.


Given ABFs and TIFs formatted long style, rename each of them to prefix their number with a different number.

    Example: 2017_10_11_0011.abf
    Becomes: 2017_10_11_?011.abf
    where ? can be any character.


Returns info regarding a particular dataset.

        Arugments:
            name (str): Dataset name

        Returns:
            dict: Dataset information


Lists datasets in resources. Setting 'get_global_public' to 'True'
        will retrieve all public datasets in cloud. 'False' will get user's
        public datasets.

        Arguments:
            get_global_public (bool): True if user wants all public datasets in
                                      cloud. False if user wants only their
                                      public datasets.

        Returns:
            dict: Returns datasets in JSON format


Show specific workspace.


Show details for all workspaces.


Get the base URL of the Remote.

        Arguments:
            None
        Returns:
            `str` base URL


given files and cells, return a dict of files grouped by cell.


populate class properties relating to files in the folder.


generate list of cells with links. keep this simple.
        automatically generates splash page and regnerates frames.


generate a data view for every ABF in the project folder.


IC steps. See how hyperpol. step affects things.


repeated membrane tests.


fast sweeps, 1 step per sweep, for clean IV without fast currents.


combination of membrane test and IV steps.


OBSOLETE WAY TO INDEX A FOLDER.


A custom save method that handles figuring out when something is activated or deactivated.


It is impossible to delete an activatable model unless force is True. This function instead sets it to inactive.


Write to file_handle if supplied, othewise print output


A helper method that supplies the root directory name given a
        timestamp.


The log contains the tids and corresponding specifications
        used during launch with the specifications in JSON format.


All launchers should call this method to write the info file
        at the end of the launch. The .info file is saved given
        setup_info supplied by _setup_launch into the
        root_directory. When called without setup_info, the existing
        info file is updated with the end-time.


Launches processes defined by process_commands, but only
        executes max_concurrency processes at a time; if a process
        completes and there are still outstanding processes to be
        executed, the next processes are run until max_concurrency is
        reached again.


A succinct summary of the Launcher configuration.  Unlike the
        repr, a summary does not have to be complete but must supply
        key information relevant to the user.


The method that actually runs qsub to invoke the python
        process with the necessary commands to trigger the next
        collation step and next block of jobs.


This method handles static argument specifiers and cases where
        the dynamic specifiers cannot be queued before the arguments
        are known.


Aggregates all process_commands and the designated output files into a
        list, and outputs it as JSON, after which the wrapper script is called.


Performs consistency checks across all the launchers.


Launches all available launchers.


Helper to prompt the user for input on the commandline.


The implementation in the base class simply checks there is no
        clash between the metadata and data keys.


Returns the full path for saving the file, adding an extension
        and making the filename unique as necessary.


Returns a boolean indicating whether the filename has an
        appropriate extension for this class.


Data may be either a PIL Image object or a Numpy array.


return "YYYY-MM-DD" when the file was modified.


returns a dict of active folders with days as keys.


given some data and a list of X posistions, return the normal
    distribution curve as a Y point at each of those Xs.


return self.dataY around a time point. All units are seconds.
        if thisSweep==False, the time point is considered to be experiment time
            and an appropriate sweep may be selected. i.e., with 10 second
            sweeps and timePint=35, will select the 5s mark of the third sweep


RETURNS filtered trace. Desn't filter it in place.


Reads in a file from disk.

    Arguments:
        in_file: The name of the file to read in
        in_fmt: The format of in_file, if you want to be explicit

    Returns:
        numpy.ndarray


Compute invariants from an existing GraphML file using the remote
        grute graph services.

        Arguments:
            graph_file (str): The filename of the graphml file
            input_format (str): One of grute.GraphFormats
            invariants (str[]: Invariants.ALL)*: An array of grute.Invariants
                to compute on the graph
            email (str: self.email)*: The email to notify upon completion
            use_threads (bool: False)*: Whether to use Python threads to run
                computation in the background when waiting for the server to
                return the invariants
            callback (function: None)*: The function to run upon completion of
                the call, if using threads. (Will not be called if use_threads
                is set to False.)

        Returns:
            HTTP Response if use_threads is False. Otherwise, None

        Raises:
            ValueError: If the graph file does not exist, or if there are
                issues with the passed arguments
            RemoteDataUploadError: If there is an issue packing the file
            RemoteError: If the server experiences difficulty computing invs


Convert a graph from one GraphFormat to another.

        Arguments:
            graph_file (str): Filename of the file to convert
            input_format (str): A grute.GraphFormats
            output_formats (str[]): A grute.GraphFormats
            email (str: self.email)*: The email to notify
            use_threads (bool: False)*: Whether to use Python threads to run
                computation in the background when waiting for the server
            callback (function: None)*: The function to run upon completion of
                the call, if using threads. (Will not be called if use_threads
                is set to False.)

        Returns:
            HTTP Response if use_threads=False. Else, no return value.

        Raises:
            RemoteDataUploadError: If there's an issue uploading the data
            RemoteError: If there's a server-side issue
            ValueError: If there's a problem with the supplied arguments


Method to define the positional arguments and keyword order
        for pretty printing.


A succinct summary of the argument specifier. Unlike the repr,
        a summary does not have to be complete but must supply the
        most relevant information about the object to the user.


Returns the specs, the remaining kwargs and whether or not the
        constructor was called with kwarg or explicit specs.


Convenience method to inspect the available argument values in
        human-readable format. The ordering of keys is determined by
        how quickly they vary.

        The exclude list allows specific keys to be excluded for
        readability (e.g. to hide long, absolute filenames).


The lexical sort order is specified by a list of string
        arguments. Each string is a key name prefixed by '+' or '-'
        for ascending and descending sort respectively. If the key is
        not found in the operand's set of varying keys, it is ignored.


Parses the log file generated by a launcher and returns
        dictionary with tid keys and specification values.

        Ordering can be maintained by setting dict_type to the
        appropriate constructor (i.e. OrderedDict). Keys are converted
        from unicode to strings for kwarg use.


Writes the supplied specifications to the log path. The data
        may be supplied as either as a an Args or as a list of
        dictionaries.

        By default, specifications will be appropriately appended to
        an existing log file. This can be disabled by setting
        allow_append to False.


Load all the files in a given directory selecting only files
        with the given extension if specified. The given kwargs are
        passed through to the normal constructor.


Loads the files that match the given pattern.


Convenience method to directly chain a pattern processed by
        FilePattern into a FileInfo instance.

        Note that if a default filetype has been set on FileInfo, the
        filetype argument may be omitted.


Load the file contents into the supplied Table using the
        specified key and filetype. The input table should have the
        filenames as values which will be replaced by the loaded
        data. If data_key is specified, this key will be used to index
        the loaded data to retrive the specified item.


Load the file contents into the supplied dataframe using the
        specified key and filetype.


Generates the union of the source.specs and the metadata
        dictionary loaded by the filetype object.


Push new data into the buffer. Resume looping if paused.


Inelegant for now, but lets you manually analyze every ABF in a folder.


create ID_plot.html of just intrinsic properties.


This applies a kernel to a signal through convolution and returns the result.

    Some magic is done at the edges so the result doesn't apprach zero:
        1. extend the signal's edges with len(kernel)/2 duplicated values
        2. perform the convolution ('same' mode)
        3. slice-off the ends we added
        4. return the same number of points as the original


if the value is in the list, move it to the back and return it.


given a list and a list of items to be first, return the list in the
    same order except that it begins with each of the first items.


given a list of goofy ABF names, return it sorted intelligently.
    This places things like 16o01001 after 16901001.


return the semi-temporary user folder


Check if the listener limit is hit and warn if needed.


Bind a listener to a particular event.

        Args:
            event (str): The name of the event to listen for. This may be any
                string value.
            listener (def or async def): The callback to execute when the event
                fires. This may be a sync or async function.


Schedule a coroutine for execution.

        Args:
            event (str): The name of the event that triggered this call.
            listener (async def): The async def that needs to be executed.
            *args: Any number of positional arguments.
            **kwargs: Any number of keyword arguments.

        The values of *args and **kwargs are passed, unaltered, to the async
        def when generating the coro. If there is an exception generating the
        coro, such as the wrong number of arguments, the emitter's error event
        is triggered. If the triggering event _is_ the emitter's error event
        then the exception is reraised. The reraised exception may show in
        debug mode for the event loop but is otherwise silently dropped.


Execute a sync function.

        Args:
            event (str): The name of the event that triggered this call.
            listener (def): The def that needs to be executed.
            *args: Any number of positional arguments.
            **kwargs: Any number of keyword arguments.

        The values of *args and **kwargs are passed, unaltered, to the def
        when exceuting. If there is an exception executing the def, such as the
        wrong number of arguments, the emitter's error event is triggered. If
        the triggering event _is_ the emitter's error event then the exception
        is reraised. The reraised exception may show in debug mode for the
        event loop but is otherwise silently dropped.


Dispatch an event to a listener.

        Args:
            event (str): The name of the event that triggered this call.
            listener (def or async def): The listener to trigger.
            *args: Any number of positional arguments.
            **kwargs: Any number of keyword arguments.

        This method inspects the listener. If it is a def it dispatches the
        listener to a method that will execute that def. If it is an async def
        it dispatches it to a method that will schedule the resulting coro with
        the event loop.


Get the number of listeners for the event.

        Args:
            event (str): The event for which to count all listeners.

        The resulting count is a combination of listeners added using
        'on'/'add_listener' and 'once'.


Converts a RAMON object list to a JSON-style dictionary. Useful for going
    from an array of RAMONs to a dictionary, indexed by ID.

    Arguments:
        ramons (RAMON[]): A list of RAMON objects
        flatten (boolean: False): Not implemented

    Returns:
        dict: A python dictionary of RAMON objects.


Takes str or int, returns class type


Deletes a channel given its name, name of its project
        , and name of its dataset.

        Arguments:
            channel_name (str): Channel name
            project_name (str): Project name
            dataset_name (str): Dataset name

        Returns:
            bool: True if channel deleted, False if not


Convert each TIF to PNG. Return filenames of new PNGs.


expects a folder of ABFs.


Add a new dataset to the ingest.

        Arguments:
            dataset_name (str): Dataset Name is the overarching name of the
                research effort. Standard naming convention is to do
                LabNamePublicationYear or LeadResearcherCurrentYear.
            imagesize (int, int, int): Image size is the pixel count
                dimensions of the data. For example is the data is stored
                as a series of 100 slices each 2100x2000 pixel TIFF images,
                the X,Y,Z dimensions are (2100, 2000, 100).
            voxelres (float, float, float): Voxel Resolution is the number
                of voxels per unit pixel. We store X,Y,Z voxel resolution
                separately.
            offset (int, int, int): If your data is not well aligned and
                there is "excess" image data you do not wish to examine, but
                are present in your images, offset is how you specify where
                your actual image starts. Offset is provided a pixel
                coordinate offset from origin which specifies the "actual"
                origin of the image. The offset is for X,Y,Z dimensions.
            timerange (int, int): Time Range is a parameter to support
                storage of Time Series data, so the value of the tuple is a
                0 to X range of how many images over time were taken. It
                takes 2 inputs timeStepStart and timeStepStop.
            scalinglevels (int): Scaling levels is the number of levels the
                data is scalable to (how many zoom levels are present in the
                data). The highest resolution of the data is at scaling level
                0, and for each level up the data is down sampled by 2x2
                (per slice). To learn more about the sampling service used,
                visit the the propagation service page.
            scaling (int): Scaling is the scaling method of the data being
                stored. 0 corresponds to a Z-slice orientation (as in a
                collection of tiff images in which each tiff is a slice on
                the z plane) where data will be scaled only on the xy plane,
                not the z plane. 1 corresponds to an isotropic orientation
                (in which each tiff is a slice on the y plane) where data
                is scaled along all axis.

        Returns:
            None


Genarate ND json object.


Generate the project dictionary.


Genarate the project dictionary.


Identify the image size using the data location and other parameters


Try to post data to the server.


Find path for given workspace and|or repository.


Return the project info for a given token.

        Arguments:
            token (str): Token to return information for

        Returns:
            JSON: representation of proj_info


Insert new metadata into the OCP metadata database.

        Arguments:
            token (str): Token of the datum to set
            data (str): A dictionary to insert as metadata. Include `secret`.

        Returns:
            json: Info of the inserted ID (convenience) or an error message.

        Throws:
            RemoteDataUploadError: If the token is already populated, or if
                there is an issue with your specified `secret` key.


Get a response object for a given url.

        Arguments:
            url (str): The url make a get to
            token (str): The authentication token

        Returns:
            obj: The response object


Returns a post resquest object taking in a url, user token, and
        possible json information.

        Arguments:
            url (str): The url to make post to
            token (str): The authentication token
            json (dict): json info to send

        Returns:
            obj: Post request object


plot X and Y data, then shade its background by variance.


create some fancy graphs to show color-coded variances.


runs AP detection on every sweep.


Return package author and version as listed in `init.py`.


Create an API subclass with fewer methods than its base class.

    Arguments:
      name (:py:class:`str`): The name of the new class.
      docstring (:py:class:`str`): The docstring for the new class.
      remove_methods (:py:class:`dict`): The methods to remove from
        the base class's :py:attr:`API_METHODS` for the subclass. The
        key is the name of the root method (e.g. ``'auth'`` for
        ``'auth.test'``, the value is either a tuple of child method
        names (e.g. ``('test',)``) or, if all children should be
        removed, the special value :py:const:`ALL`.
      base (:py:class:`type`, optional): The base class (defaults to
        :py:class:`SlackApi`).

    Returns:
      :py:class:`type`: The new subclass.

    Raises:
      :py:class:`KeyError`: If the method wasn't in the superclass.


Execute a specified Slack Web API method.

        Arguments:
          method (:py:class:`str`): The name of the method.
          **params (:py:class:`dict`): Any additional parameters
            required.

        Returns:
          :py:class:`dict`: The JSON data from the response.

        Raises:
          :py:class:`aiohttp.web_exceptions.HTTPException`: If the HTTP
            request returns a code other than 200 (OK).
          SlackApiError: If the Slack API is reached but the response
           contains an error message.


Join the real-time messaging service.

        Arguments:
          filters (:py:class:`dict`, optional): Dictionary mapping
            message filters to the functions they should dispatch to.
            Use a :py:class:`collections.OrderedDict` if precedence is
            important; only one filter, the first match, will be
            applied to each message.


Handle an incoming message appropriately.

        Arguments:
          message (:py:class:`aiohttp.websocket.Message`): The incoming
            message to handle.
          filters (:py:class:`list`): The filters to apply to incoming
            messages.


If you send a message directly to me


Create a new instance from the API token.

        Arguments:
          token (:py:class:`str`, optional): The bot's API token
            (defaults to ``None``, which means looking in the
            environment).
          api_cls (:py:class:`type`, optional): The class to create
            as the ``api`` argument for API access (defaults to
            :py:class:`aslack.slack_api.SlackBotApi`).

        Returns:
          :py:class:`SlackBot`: The new instance.


Format an outgoing message for transmission.

        Note:
          Adds the message type (``'message'``) and incremental ID.

        Arguments:
          channel (:py:class:`str`): The channel to send to.
          text (:py:class:`str`): The message text to send.

        Returns:
          :py:class:`str`: The JSON string of the message.


Returns list of paths to tested apps


Get the options for each task that will be run


Adds a character matrix to DendroPy tree and infers gaps using
    Fitch's algorithm.

    Infer gaps in sequences at ancestral nodes.


Write the data from the db to a CLDF dataset according to the metadata in `self.dataset`.

        :param dest:
        :param mdname:
        :return: path of the metadata file


A user-friendly description of the handler.

        Returns:
          :py:class:`str`: The handler's description.


Use CLDF reference properties to implicitely create foreign key constraints.

        :param component: A Table object or `None`.


Create a URL for the specified endpoint.

        Arguments:
          endpoint (:py:class:`str`): The API endpoint to access.
          root: (:py:class:`str`, optional): The root URL for the
            service API.
          params: (:py:class:`dict`, optional): The values for format
            into the created URL (defaults to ``None``).
          url_params: (:py:class:`dict`, optional): Parameters to add
            to the end of the URL (defaults to ``None``).

        Returns:
          :py:class:`str`: The resulting URL.


Install our gettext and ngettext functions into Jinja2's environment.


Truncate the supplied text for display.

    Arguments:
      text (:py:class:`str`): The text to truncate.
      max_len (:py:class:`int`, optional): The maximum length of the
        text before truncation (defaults to 350 characters).
      end (:py:class:`str`, optional): The ending to use to show that
        the text was truncated (defaults to ``'...'``).

    Returns:
      :py:class:`str`: The truncated text.


this is the central unsafe function, using a lock and updating the state in `guard` in-place.


Add a source, either specified by glottolog reference id, or as bibtex record.


Returns a cache key consisten of a username and image size.


Decorator to cache the result of functions that take a ``user`` and a
    ``size`` value.


Function to be called when saving or changing an user's avatars.


Returns preferences model class dynamically crated for a given app or None on conflict.


Generator to walk through variables considered as preferences
    in locals dict of a given frame.

    :param int stepback:

    :rtype: tuple


Prints file details in the current directory


Calculate a percentage.


Get slabs info.


Add admin global context, for compatibility with Django 1.7


Return the status of all servers.


Show the dashboard.


Show server statistics.


For every parameter, create a matcher if the parameter has an
        annotation.


Makes a wrapper function that executes a dispatch call for func. The
        wrapper has the dispatch and dispatch_first attributes, so that
        additional overloads can be added to the group.


Adds the decorated function to this dispatch.


Adds the decorated function to this dispatch, at the FRONT of the order.
        Useful for allowing third parties to add overloaded functionality
        to be executed before default functionality.


Convert a byte value into a human-readable format.


reprojette en WGS84 et recupere l'extend


Convert GRIB to Tif


Triggered on dynamic preferences model save.
     Issues DB save and reread.


Binds PrefProxy objects to module variables used by apps as preferences.

    :param list|tuple values: Preference values.

    :param str|unicode category: Category name the preference belongs to.

    :param Field field: Django model field to represent this preference.

    :param str|unicode verbose_name: Field verbose name.

    :param str|unicode help_text: Field help text.

    :param bool static: Leave this preference static (do not store in DB).

    :param bool readonly: Make this field read only.

    :rtype: list


Registers dynamically created preferences models for Admin interface.

    :param admin.AdminSite admin_site: AdminSite object.


Automatically discovers and registers all preferences available in all apps.

    :param admin.AdminSite admin_site: Custom AdminSite object.


Restores the original values of module variables
    considered preferences if they are still PatchedLocal
    and not PrefProxy.


Replaces a settings module with a Module proxy to intercept
    an access to settings.

    :param int depth: Frame count to go backward.


Registers preferences that should be handled by siteprefs.

    Expects preferences as *args.

    Use keyword arguments to batch apply params supported by
    ``PrefProxy`` to all preferences not constructed by ``pref`` and ``pref_group``.

    Batch kwargs:

        :param str|unicode help_text: Field help text.

        :param bool static: Leave this preference static (do not store in DB).

        :param bool readonly: Make this field read only.

    :param bool swap_settings_module: Whether to automatically replace settings module
        with a special ``ProxyModule`` object to access dynamic values of settings
        transparently (so not to bother with calling ``.value`` of ``PrefProxy`` object).


Marks preferences group.

    :param str|unicode title: Group title

    :param list|tuple prefs: Preferences to group.

    :param str|unicode help_text: Field help text.

    :param bool static: Leave this preference static (do not store in DB).

    :param bool readonly: Make this field read only.


Marks a preference.

    :param preference: Preference variable.

    :param Field field: Django model field to represent this preference.

    :param str|unicode verbose_name: Field verbose name.

    :param str|unicode help_text: Field help text.

    :param bool static: Leave this preference static (do not store in DB).

    :param bool readonly: Make this field read only.

    :rtype: PrefProxy|None


Add objects to the environment.


Replace any config tokens in the file's path with values from the config.


Get the path to the file relative to its parent.


Write data to the file.

        `data` is the data to write
        `mode` is the mode argument to pass to `open()`


Create the file.

        If the file already exists an exception will be raised


Replace any config tokens with values from the config.


Prepare the Directory for use in an Environment.

        This will create the directory if the create flag is set.


Find the path to something inside this directory.


Read a file from the directory.


Add objects to the directory.


Save the state to a file.


Load a saved state file.


Clean up the saved state.


Generate the ``versionwarning-data.json`` file.

    This file is included in the output and read by the AJAX request when
    accessing to the documentation and used to compare the live versions with
    the curent one.

    Besides, this file contains meta data about the project, the API to use and
    the banner itself.


Recursively merge values from a nested dictionary into another nested
    dictionary.

    For example:

    >>> target = {
    ...     'thing': 123,
    ...     'thang': {
    ...         'a': 1,
    ...         'b': 2
    ...     }
    ... }
    >>> source = {
    ...     'thang': {
    ...         'a': 666,
    ...         'c': 777
    ...     }
    ... }
    >>> update_dict(target, source)
    >>> target
    {
        'thing': 123,
        'thang': {
            'a': 666,
            'b': 2,
            'c': 777
        }
    }


Returns a tuple of a reference to the last container in the path, and
        the last component in the key path.

        For example, with a self._value like this:

        {
            'thing': {
                'another': {
                    'some_leaf': 5,
                    'one_more': {
                        'other_leaf': 'x'
                    }
                }
            }
        }

        And a self._path of: 'thing.another.some_leaf'

        This will return a tuple of a reference to the 'another' dict, and
        'some_leaf', allowing the setter and casting methods to directly access
        the item referred to by the key path.


Get the value represented by this node.


Update the configuration with new data.

        This can be passed either or both `data` and `options`.

        `options` is a dict of keypath/value pairs like this (similar to
        CherryPy's config mechanism:

            >>> c.update(options={
            ...     'server.port': 8080,
            ...     'server.host': 'localhost',
            ...     'admin.email': 'admin@lol'
            ... })

        `data` is a dict of actual config data, like this:

            >>> c.update(data={
            ...     'server': {
            ...         'port': 8080,
            ...         'host': 'localhost'
            ...     },
            ...     'admin': {
            ...         'email': 'admin@lol'
            ...     }
            ... })


Gives objective functions a number of dimensions and parameter range

    Parameters
    ----------
    param_scales : (int, int)
        Scale (std. dev.) for choosing each parameter

    xstar : array_like
        Optimal parameters


Pointwise minimum of two quadratic bowls


Beale's function


Booth's function


Three-hump camel function


Return a list of buckets in MimicDB.

        :param boolean force: If true, API call is forced to S3


Sync either a list of buckets or the entire connection.

        Force all API calls to S3 and populate the database with the current
        state of S3.

        :param \*string \*buckets: Buckets to sync


Return an iterable of keys from MimicDB.

        :param boolean force: If true, API call is forced to S3


Sync a bucket.

        Force all API calls to S3 and populate the database with the current state of S3.


Minimize the proximal operator of a given objective using L-BFGS

    Parameters
    ----------
    f_df : function
        Returns the objective and gradient of the function to minimize

    maxiter : int
        Maximum number of L-BFGS iterations


Applies a smoothing operator along one dimension

    currently only accepts a matrix as input

    Parameters
    ----------
    penalty : float

    axis : int, optional
        Axis along which to apply the smoothing (Default: 0)

    newshape : tuple, optional
        Desired shape of the parameters to apply the nuclear norm to. The given
        parameters are reshaped to an array with this shape, or not reshaped if
        the value of newshape is None. (Default: None)


Projection onto the semidefinite cone


Projection onto the probability simplex

    http://arxiv.org/pdf/1309.1541v1.pdf


Applies a proximal operator to the columns of a matrix


Adds a proximal operator to the list of operators


Set key attributes to retrived metadata. Might be extended in the
        future to support more attributes.


Called internally for any type of upload. After upload finishes,
        make sure the key is in the bucket set and save the metadata.


Memoizes an objective + gradient function, and splits it into
    two functions that return just the objective and gradient, respectively.

    Parameters
    ----------
    f_df : function
        Must be unary (takes a single argument)

    xref : list, dict, or array_like
        The form of the parameters

    size : int, optional
        Size of the cache (Default=1)


Compares the numerical gradient to the analytic gradient

    Parameters
    ----------
    f_df : function
        The analytic objective and gradient function to check

    x0 : array_like
        Parameter values to check the gradient at

    stepsize : float, optional
        Stepsize for the numerical gradient. Too big and this will poorly estimate the gradient.
        Too small and you will run into precision issues (default: 1e-6)

    tol : float, optional
        Tolerance to use when coloring correct/incorrect gradients (default: 1e-5)

    width : int, optional
        Width of the table columns (default: 15)

    style : string, optional
        Style of the printed table, see tableprint for a list of styles (default: 'round')


Build Twilio callback url for confirming message delivery status

    :type message: OutgoingSMS


Evaluate the files identified for checksum.


Check the integrity of the datapackage.json


Guess the filetype and read the file into row sets


Guess schema using messytables


Calculates a checksum for a Finnish national reference number


Helper to make sure the given character is valid for a reference number


Creates the huge number from ISO alphanumeric ISO reference