def __init__(self, num, label='<STR_LIT>', value=<NUM_LIT:0>, screen=<NUM_LIT>,<EOL>time_remaining=True, bar=True, bar_symbol='<STR_LIT:=>', bar_caps='<STR_LIT>',<EOL>bar_decimals=<NUM_LIT:2>, display=True):
<EOL>self.num = num<EOL>self.value = value<EOL>self._percent = <NUM_LIT:0><EOL>self.time_remaining = time_remaining<EOL>self._deltas = []<EOL>self.display = display<EOL>self.label = label<EOL>self.bar = bar<EOL>self._bar_symbol = bar_symbol<EOL>self._bar_caps = bar_caps<EOL>self._decimals = bar_decimals<EOL>self.screen = screen<EOL>if len(self._bar_caps) % <NUM_LIT:2> != <NUM_LIT:0>:<EOL><INDENT>raise AttributeError("<STR_LIT>")<EOL><DEDENT>if self.bar:<EOL><INDENT>self._numsize = <NUM_LIT:3> + self._decimals + <NUM_LIT:1><EOL>self._cap_len = len(self._bar_caps)//<NUM_LIT:2><EOL>self._capl = self._bar_caps[:self._cap_len]<EOL>self._capr = self._bar_caps[self._cap_len:]<EOL>self._time_space = <NUM_LIT:11> if self.time_remaining else <NUM_LIT:0><EOL>self._barsize = (<EOL>self.screen - len(self.label) - self._numsize -<EOL>len(self._bar_caps) - <NUM_LIT:2> - <NUM_LIT:1> - self._time_space<EOL>)<EOL>self._formatstr = '<STR_LIT>'<EOL>self._percent = <NUM_LIT:0><EOL>self._dt = '<STR_LIT>'<EOL>self._bars = '<STR_LIT>'<EOL>if self.time_remaining:<EOL><INDENT>self._formatstr += "<STR_LIT>"<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._digits = str(int(np.ceil(np.log10(self.num))))<EOL>self._formatstr = '<STR_LIT>'<EOL>self._dt = '<STR_LIT>'<EOL>if self.time_remaining:<EOL><INDENT>self._formatstr += "<STR_LIT>"<EOL><DEDENT><DEDENT>self.update()<EOL>
ProgressBar class which creates a dynamic ASCII progress bar of two
different varieties:

    1) A bar chart that looks like the following:
        ``Progress [================      ]  63.00%``

    2) A simple number completed look:
        ``Progress :   17 / 289``

Parameters
-----------
num : integer
    The number of tasks that need to be completed

label : string [default: 'Progress']
    The label for this particular progress indicator,

value : integer [default: 0]
    Starting value

screen : integer [default: 79]
    Size the screen to use for the progress bar

time_remaining : boolean [default: True]
    Display estimated time remaining

bar : boolean [default: True]
    Whether or not to display the bar chart

bar_symbol : char [default: '=']
    The character to use to fill in the bar chart

bar_caps : string [default: '[]']
    Characters to use as the end caps of the.  The string will be split in
    half and each half put on a side of the chart

bar_decimals : integer [default: 2]
    Number of decimal places to include in the percentage

display : boolean [default: True]
    a crutch so that we don't have a lot of ``if``s later.  display
    or don't display the progress bar