当前位置: 首页>>代码示例>>Python>>正文


Python progressbar.SimpleProgress方法代码示例

本文整理汇总了Python中progressbar.SimpleProgress方法的典型用法代码示例。如果您正苦于以下问题:Python progressbar.SimpleProgress方法的具体用法?Python progressbar.SimpleProgress怎么用?Python progressbar.SimpleProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在progressbar的用法示例。


在下文中一共展示了progressbar.SimpleProgress方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_progress_bar

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import SimpleProgress [as 别名]
def create_progress_bar(dynamic_msg=None):
    # Taken from Andreas Rueckle.
    # usage:
    #   bar = _create_progress_bar('loss')
    #   L = []
    #   for i in bar(iterable):
    #       ...
    #       L.append(...)
    #
    #   bar.dynamic_messages['loss'] = np.mean(L)
    widgets = [
        ' [batch ', progressbar.SimpleProgress(), '] ',
        progressbar.Bar(),
        ' (', progressbar.ETA(), ') '
    ]
    if dynamic_msg is not None:
        widgets.append(progressbar.DynamicMessage(dynamic_msg))
    return progressbar.ProgressBar(widgets=widgets) 
开发者ID:UKPLab,项目名称:e2e-nlg-challenge-2017,代码行数:20,代码来源:timing.py

示例2: set_tot_elaborations

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import SimpleProgress [as 别名]
def set_tot_elaborations(self, tot_elaborations):
        """
        Set the total number of elaborations

        :param tot_elaborations: total number of elaborations
        :return: None
        """

        widgets = [
            progressbar.Percentage(),
            ' (', progressbar.SimpleProgress(), ') ',

            progressbar.Bar(),
            progressbar.Timer(),
            ' ETC: ', self._ETC, ' '
        ]
        self._bar = progressbar.ProgressBar(redirect_stderr=True, max_value=tot_elaborations, widgets=widgets)
        self._bar.start()
        self._tot_elaborations = tot_elaborations 
开发者ID:ucsb-seclab,项目名称:karonte,代码行数:21,代码来源:bar_logger.py

示例3: _create_progress_bar

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import SimpleProgress [as 别名]
def _create_progress_bar(dynamic_msg=None):
    widgets = [
        ' [batch ', progressbar.SimpleProgress(), '] ',
        progressbar.Bar(),
        ' (', progressbar.ETA(), ') '
    ]
    if dynamic_msg is not None:
        widgets.append(progressbar.DynamicMessage(dynamic_msg))
    return progressbar.ProgressBar(widgets=widgets) 
开发者ID:UKPLab,项目名称:iwcs2017-answer-selection,代码行数:11,代码来源:__init__.py

示例4: get_progress_bar

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import SimpleProgress [as 别名]
def get_progress_bar(num_reads):
    bar_format = [RotatingMarker(), " ", SimpleProgress(), Bar(), Percentage(), " ", ETA()]
    progress_bar = ProgressBar(maxval=num_reads, widgets=bar_format)
    bad_progressbar_version = False
    try:
        progress_bar.currval
    except AttributeError as e:
        bad_progressbar_version = True
        pass
    if bad_progressbar_version:
        raise RuntimeError('Wrong progressbar package detected, likely '
                           '"progressbar2". Please uninstall that package and '
                           'install "progressbar33" instead.')

    return progress_bar.start() 
开发者ID:nanoporetech,项目名称:ont_fast5_api,代码行数:17,代码来源:conversion_utils.py

示例5: make_widget

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import SimpleProgress [as 别名]
def make_widget():
    widgets = [progressbar.Percentage(), ' ', progressbar.SimpleProgress(), ' ', 
                                 progressbar.Bar(left = '[', right = ']'), ' ', progressbar.ETA(), ' ', 
                                 progressbar.DynamicMessage('LOSS'), ' ',  progressbar.DynamicMessage('PREC'), ' ',
                                 progressbar.DynamicMessage('REC')]
    bar = progressbar.ProgressBar(widgets = widgets)
    return bar


### Find nearest timestamps ### 
开发者ID:illidanlab,项目名称:urgent-care-comparative,代码行数:12,代码来源:utilities.py


注:本文中的progressbar.SimpleProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。