Module ImportFrom alias Assign NameStore Str Import alias Import alias Import alias Import alias identifier Import alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Import alias identifier ImportFrom alias ImportFrom alias identifier FunctionDef arguments args defaults body Expr Str Return CompareIn Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If UnaryOpNot CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Dict Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr BinOpSub NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpDiv BinOpMult NameLoad NameLoad Num Assign AttributeStore NameLoad attr Call NameLoad BinOpDiv BinOpAdd NameLoad Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpSub NameLoad AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore BinOpDiv BinOpAdd AttributeLoad NameLoad attr BinOpMult BinOpAdd AttributeLoad NameLoad attr BinOpMult BinOpMult AttributeLoad NameLoad attr Num Num BinOpPow Num Num BinOpPow Num Num Assign NameStore Call NameLoad BinOpSub BinOpDiv BinOpMult BinOpSub BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num NameLoad Call NameLoad BinOpSub NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore BinOpAdd Str Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Str AttributeLoad NameLoad attr NameLoad NameLoad Num NameLoad NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad CompareLtE NameLoad AttributeLoad NameLoad attr CompareNotEq NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign NameStore NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore Call NameLoad BinOpDiv NameLoad AttributeLoad NameLoad attr Assign NameStore CompareGtE NameLoad AttributeLoad NameLoad attr If BoolOpOr CompareGt NameLoad AttributeLoad NameLoad attr NameLoad NameLoad body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Str If NameLoad body Assign NameStore BinOpAdd BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr Str orelse Assign NameStore Call NameLoad BinOpMult BinOpDiv NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpSub AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult BinOpDiv NameLoad AttributeLoad NameLoad attr Num If NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str BinOpMult Str NameLoad BinOpMult Str NameLoad Str BinOpMod Str NameLoad Str orelse Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str BinOpMult Str NameLoad BinOpMult Str NameLoad Str BinOpMod Str NameLoad Str NameLoad If NameLoad body Assign NameStore BinOpMod NameLoad NameLoad If CompareEq NameLoad Str body If BoolOpAnd NameLoad UnaryOpNot NameLoad body Expr Call NameLoad NameLoad keyword Str orelse Expr Call NameLoad NameLoad orelse If CompareIsNot NameLoad NameLoad body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Str AttributeLoad NameLoad attr NameLoad NameLoad Num NameLoad NameLoad body Expr Str Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Return NameLoad handlers ExceptHandler type NameLoad body Return Dict decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If CompareLt Call NameLoad NameLoad Num body Return NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore Call NameLoad NameLoad BinOpAdd NameLoad Num For NameStore NameLoad body Assign NameStore BinOpSub SubscriptLoad NameLoad Index Num NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameLoad For NameStore NameLoad body If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad AugAssignAdd NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpAdd Str SubscriptLoad NameLoad Index Num If CompareIs NameLoad NameLoad body Assign NameStore TupleLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return BinOpAdd BinOpAdd NameLoad Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad Str While NameLoad body TryExcept body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Break Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareNotEq AttributeLoad NameLoad attr Num body Raise decorator_list
N/A __future__ print_function N/A __author__ Robert Meyer N/A sys N/A os N/A datetime N/A numpy np N/A inspect N/A logging N/A socket N/A N/A N/A zmq N/A N/A N/A ImportError N/A N/A zmq None N/A pypet.compat compat pypet.utils.decorators deprecated pypet.utils.comparisons nested_equal nested_equal_new is_debug N/A N/A N/A N/A N/A Checks if user is currently debugging.

    Debugging is checked via ``'pydevd' in sys.modules``.

    :return: True of False

     N/A N/A pydevd N/A sys modules N/A flatten_dictionary N/A N/A nested_dict separator N/A N/A N/A Flattens a nested dictionary.

    New keys are concatenations of nested keys with the `separator` in between.

     N/A flat_dict N/A N/A N/A key val N/A N/A nested_dict items N/A N/A N/A isinstance val dict N/A N/A new_flat_dict N/A flatten_dictionary val separator N/A N/A flat_key inval N/A N/A new_flat_dict items N/A N/A new_key N/A N/A key separator flat_key N/A N/A flat_dict N/A new_key inval N/A N/A N/A flat_dict N/A key val N/A flat_dict N/A nest_dictionary N/A N/A flat_dict separator N/A N/A N/A  Nests a given flat dictionary.

    Nested keys are created by splitting given keys around the `separator`.

     N/A nested_dict N/A N/A N/A key val N/A N/A flat_dict items N/A N/A split_key N/A N/A key split separator N/A act_dict nested_dict N/A final_key N/A N/A split_key pop N/A new_key split_key N/A N/A N/A N/A new_key act_dict N/A N/A N/A act_dict N/A new_key N/A N/A act_dict N/A act_dict N/A new_key N/A N/A act_dict N/A final_key val N/A nested_dict N/A _Progressbar N/A object N/A N/A Implements a progress bar.

    This class is supposed to be a singleton. Do not
    import the class itself but use the `progressbar` function from this module.

     __init__ N/A N/A self N/A N/A N/A N/A self _start_time None N/A N/A self _start_index None N/A N/A self _current_index N/A np inf N/A N/A self _percentage_step None N/A N/A self _total None N/A N/A self _total_minus_one None N/A N/A self _length None N/A N/A self _norm_factor None N/A N/A self _current_interval None N/A _reset N/A N/A self index total percentage_step length N/A N/A N/A Resets to the progressbar to start a new one N/A N/A self _start_time N/A N/A N/A datetime datetime now N/A N/A self _start_index index N/A N/A self _current_index index N/A N/A self _percentage_step percentage_step N/A N/A self _total N/A float total N/A N/A self _total_minus_one N/A total 1 N/A N/A self _length length N/A N/A self _norm_factor N/A N/A total percentage_step 100.0 N/A N/A self _current_interval N/A int N/A N/A index 1.0 N/A self _norm_factor N/A _get_remaining N/A N/A self index N/A N/A N/A Calculates remaining time as a string N/A N/A N/A current_time N/A N/A N/A datetime datetime now N/A time_delta N/A current_time N/A self _start_time N/A N/A N/A total_seconds N/A N/A time_delta total_seconds N/A N/A N/A AttributeError N/A N/A total_seconds N/A N/A N/A time_delta microseconds N/A N/A N/A time_delta seconds N/A N/A N/A time_delta days 24 3600 N/A 10 6 N/A 10.0 6 N/A remaining_seconds N/A int N/A N/A N/A N/A N/A N/A self _total N/A self _start_index 1.0 total_seconds N/A float N/A index N/A self _start_index total_seconds N/A remaining_delta N/A N/A datetime timedelta seconds remaining_seconds N/A remaining_str N/A , remaining:  N/A str remaining_delta N/A N/A N/A ZeroDivisionError N/A N/A remaining_str N/A remaining_str N/A __call__ N/A N/A self index total percentage_step logger log_level reprint time length fmt_string reset N/A 5 print N/A logging INFO False True 20 None False N/A N/A Plots a progress bar to the given `logger` for large for loops.

        To be used inside a for-loop at the end of the loop.

        :param index: Current index of for-loop
        :param total: Total size of for-loop
        :param percentage_step: Percentage step with which the bar should be updated
        :param logger:

            Logger to write to, if string 'print' is given, the print statement is
            used. Use None if you don't want to print or log the progressbar statement.

        :param log_level: Log level with which to log.
        :param reprint:

            If no new line should be plotted but carriage return (works only for printing)

        :param time: If the remaining time should be calculated and displayed
        :param length: Length of the bar in `=` signs.
        :param fmt_string:

            A string which contains exactly one `%s` in order to incorporate the progressbar.
            If such a string is given, ``fmt_string % progressbar`` is printed/logged.

        :param reset:

            If the progressbar should be restarted. If progressbar is called with a lower
            index than the one before, the progressbar is automatically restarted.

        :return:

            The progressbar string or None if the string has not been updated.


         N/A reset N/A reset N/A index N/A self _current_index N/A total N/A self _total N/A reset N/A N/A N/A N/A self _reset index total percentage_step length N/A statement None N/A indexp1 N/A index 1.0 N/A next_interval N/A int N/A indexp1 N/A self _norm_factor N/A ending N/A index N/A self _total_minus_one N/A N/A N/A next_interval N/A self _current_interval ending reset N/A N/A time N/A N/A remaining_str N/A N/A self _get_remaining index N/A N/A remaining_str N/A ending N/A N/A statement N/A N/A [ N/A = N/A self _length ]100.0% N/A N/A bars N/A int N/A N/A indexp1 N/A self _total N/A self _length N/A spaces N/A N/A self _length bars N/A percentage N/A N/A indexp1 N/A self _total 100.0 N/A reset N/A N/A statement N/A N/A N/A N/A N/A [ N/A = bars N/A spaces ] N/A  %4.1f percentage % N/A N/A statement N/A N/A N/A N/A N/A N/A [ N/A = bars N/A spaces ] N/A  %4.1f percentage % remaining_str N/A fmt_string N/A N/A statement N/A fmt_string statement N/A N/A logger print N/A N/A N/A reprint N/A ending N/A N/A N/A print statement end N/A N/A N/A print statement N/A N/A N/A logger None N/A N/A N/A isinstance logger N/A compat base_type N/A N/A logger N/A N/A logging getLogger logger N/A N/A N/A logger log msg statement level log_level N/A N/A self _current_interval next_interval N/A N/A self _current_index index N/A statement N/A N/A N/A _progressbar N/A _Progressbar progressbar N/A N/A index total percentage_step logger log_level reprint time length fmt_string reset N/A 10 print N/A logging INFO True True 20 None False N/A N/A Plots a progress bar to the given `logger` for large for loops.

    To be used inside a for-loop at the end of the loop:

    .. code-block:: python

        for irun in range(42):
            my_costly_job() # Your expensive function
            progressbar(index=irun, total=42, reprint=True) # shows a growing progressbar


    There is no initialisation of the progressbar necessary before the for-loop.
    The progressbar will be reset automatically if used in another for-loop.

    :param index: Current index of for-loop
    :param total: Total size of for-loop
    :param percentage_step: Steps with which the bar should be plotted
    :param logger:

        Logger to write to - with level INFO. If string 'print' is given, the print statement is
        used. Use ``None`` if you don't want to print or log the progressbar statement.

    :param log_level: Log level with which to log.
    :param reprint:

        If no new line should be plotted but carriage return (works only for printing)

    :param time: If the remaining time should be estimated and displayed
    :param length: Length of the bar in `=` signs.
    :param fmt_string:

        A string which contains exactly one `%s` in order to incorporate the progressbar.
        If such a string is given, ``fmt_string % progressbar`` is printed/logged.

    :param reset:

        If the progressbar should be restarted. If progressbar is called with a lower
        index than the one before, the progressbar is automatically restarted.

    :return:

        The progressbar string or `None` if the string has not been updated.

     N/A N/A _progressbar index index total total percentage_step percentage_step logger logger log_level log_level reprint reprint time time length length fmt_string fmt_string reset reset N/A get_matching_kwargs N/A N/A func kwargs N/A N/A N/A Takes a function and keyword arguments and returns the ones that can be passed. N/A N/A N/A inspect isclass func N/A N/A func N/A func __init__ N/A N/A N/A argspec N/A N/A inspect getargspec func N/A N/A N/A argspec keywords None N/A N/A N/A N/A kwargs copy N/A N/A matching_kwargs N/A dict N/A N/A k N/A kwargs N/A k N/A k N/A argspec args N/A k kwargs N/A matching_kwargs N/A N/A N/A TypeError N/A N/A N/A N/A result_sort N/A N/A result_list start_index N/A 0 N/A N/A Sorts a list of results in O(n) in place (since every run is unique)

    :param result_list: List of tuples [(run_idx, res), ...]
    :param start_index: Index with which to start, every entry before `start_index` is ignored

     N/A N/A N/A len result_list 2 N/A N/A result_list N/A to_sort N/A result_list N/A start_index N/A minmax N/A N/A x N/A 0 N/A x to_sort N/A minimum N/A min minmax N/A maximum N/A max minmax N/A sorted_list N/A None N/A _ N/A range minimum N/A maximum 1 N/A elem to_sort N/A N/A key N/A N/A elem N/A 0 minimum N/A N/A sorted_list N/A key elem N/A idx_count start_index N/A elem sorted_list N/A N/A N/A elem None N/A N/A N/A result_list N/A idx_count elem N/A idx_count 1 N/A result_list N/A format_time N/A N/A timestamp N/A N/A N/A Formats timestamp to human readable format N/A format_string %Y_%m_%d_%Hh%Mm%Ss N/A formatted_time N/A N/A N/A N/A N/A datetime datetime fromtimestamp timestamp strftime format_string N/A formatted_time N/A port_to_tcp N/A N/A port N/A None N/A N/A Returns local tcp address for a given `port`, automatic port if `None` N/A domain_name N/A N/A socket getfqdn N/A N/A N/A addr_list N/A N/A socket getaddrinfo domain_name None N/A N/A N/A Exception N/A N/A addr_list N/A N/A socket getaddrinfo localhost None N/A N/A family socktype proto canonname sockaddr N/A addr_list N/A 0 N/A address N/A tcp:// N/A sockaddr N/A 0 N/A N/A port None N/A N/A port N/A N/A N/A N/A isinstance port int N/A N/A context N/A N/A zmq Context N/A socket_ N/A N/A context socket N/A zmq REP N/A port N/A N/A socket_ bind_to_random_port address port N/A N/A N/A socket_ close N/A N/A N/A context term N/A N/A N/A address : N/A str port N/A racedirs N/A N/A path N/A N/A N/A Like os.makedirs but takes care about race conditions N/A N/A N/A N/A os path isfile path N/A N/A N/A IOError Path `%s` is already a file not a directory N/A True N/A N/A N/A N/A N/A N/A N/A os path isdir path N/A N/A N/A N/A N/A os makedirs path N/A N/A N/A EnvironmentError N/A exc N/A N/A N/A N/A exc errno 17 N/A N/A N/A