Python progressbar.SimpleProgress() Examples
The following are 6
code examples of progressbar.SimpleProgress().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
progressbar
, or try the search function
.
Example #1
Source File: timing.py From e2e-nlg-challenge-2017 with Apache License 2.0 | 6 votes |
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)
Example #2
Source File: bar_logger.py From karonte with BSD 2-Clause "Simplified" License | 6 votes |
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
Example #3
Source File: __init__.py From iwcs2017-answer-selection with Apache License 2.0 | 5 votes |
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)
Example #4
Source File: conversion_utils.py From ont_fast5_api with Mozilla Public License 2.0 | 5 votes |
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()
Example #5
Source File: utilities.py From urgent-care-comparative with GNU General Public License v3.0 | 5 votes |
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 ###
Example #6
Source File: __init__.py From acl2017-non-factoid-qa with Apache License 2.0 | 5 votes |
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)