Handle progress bar updates
        @type   pbar:   ProgressBar
        @rtype: str
483681
def update(self, pbar):
        
        if pbar.label != self._label:
            self.label = pbar.label

        return self.label
32230
public void updateProgress(float progress) {
        if (mLastProgress == progress) {
            return;
        }
        mLastProgress = progress;
        //TODO this makes ViewPager work, but will probably break more complex transition setup, will think of a better solution
        if (mUpdateStateAfterUpdateProgress) {
            boolean positive = progress >= 0;
            TransitionController transitionController;
            for (int i = 0, size = mTransitionControls.size(); i < size; i++) {
                transitionController = mTransitionControls.get(i);
                if (positive) {
                    if (transitionController.getEnd() > 0) {
                        transitionController.setEnable(true);
                    } else {
                        transitionController.setEnable(false);
                    }
                } else {
                    if (transitionController.getEnd() < 0) {
                        transitionController.setEnable(true);
                    } else {
                        transitionController.setEnable(false);
                    }
                }
            }
        }

        TransitionController transitionController;
        for (int i = 0, size = mTransitionControls.size(); i < size; i++) {
            transitionController = mTransitionControls.get(i);
            if (transitionController.isEnable()) {
                transitionController.updateProgress(progress);
            }
        }
    }
232600
def show_busy(self):
        """"""
        self.progress_bar.show()
        self.parent.pbnNext.setEnabled(False)
        self.parent.pbnBack.setEnabled(False)
        self.parent.pbnCancel.setEnabled(False)
        self.parent.repaint()
        enable_busy_cursor()
        QgsApplication.processEvents()
141404
def update(self, value=None, label=None):
        
        if label:
            self.label = label

        super(ProgressBar, self).update(value)
65610
def cleanup(self):
        
        if self.sock is not None:
            self.sock.close()
        if self.outfile is not None:
            self.outfile.close()
        if self.bar is not None:
            self.update_progress(complete=True)
939554
def _run_progress_callbacks(self, bytes_transferred):
        '''  '''
        if bytes_transferred:
            for callback in self._progress_callbacks:
                try:
                    callback(bytes_transferred=bytes_transferred)
                except Exception as ex:
                    logger.error("Exception: %s" % str(ex))
174051
def _progress_ret(self, progress, out):
        '''
        
        '''
        import salt.output
        # Get the progress bar
        if not hasattr(self, 'progress_bar'):
            try:
                self.progress_bar = salt.output.get_progress(self.config, out, progress)
            except Exception:
                raise LoaderError('\nWARNING: Install the `progressbar` python package. '
                                  'Requested job was still run but output cannot be displayed.\n')
        salt.output.update_progress(self.config, progress, self.progress_bar, out)
7551
def xgb_progressbar(rounds=1000):
    
    pbar = tqdm(total=rounds)

    def callback(_, ):
        pbar.update(1)

    return callback
1019907
def progress_bar(**kwargs):
    
    tqdm_kw = {
        'desc': 'Processing',
        'file': sys.stdout,
        'bar_format': TQDM_BAR_FORMAT,
    }
    tqdm_kw.update(kwargs)
    pbar = tqdm(**tqdm_kw)
    if not pbar.disable:
        pbar.desc = pbar.desc.rstrip(': ')
        pbar.refresh()
    return pbar
972453
def update(self, pbar):
        ''

        if pbar.currval == 0:
            return 'ETA:  --:--:--'
        elif pbar.finished:
            return 'Time: %s' % self.format_time(pbar.seconds_elapsed)
        else:
            return 'ETA:  %s' % self.format_time(self._eta(pbar))
583767
function (progress) {
			var _this = this;
			this.progressBar.animate({
				value: progress
			}, 1, function() {
				_this.onProgress(progress);
			});
			this.progress = progress;
		}
845508
def show_progress(total_duration):
    """"""
    with tqdm(total=round(total_duration, 2)) as bar:
        def handler(key, value):
            if key == 'out_time_ms':
                time = round(float(value) / 1000000., 2)
                bar.update(time - bar.n)
            elif key == 'progress' and value == 'end':
                bar.update(bar.total - bar.n)
        with _watch_progress(handler) as socket_filename:
            yield socket_filename
1265505
def progress(byte, total, extra=""):
    
    if total == 0:
        progresstr = "Downloaded %dkB bytes" % (byte >> 10)
        progress_stream.write(progresstr + '\r')
        return
    progressbar(total, byte, extra)
377274
def get_progressbar(self, total, **options):
        
        progressbar = ColoredProgressBar(total)
        progressbar.steps_label = 'Commit'
        progressbar.elements += ['eta', 'time']
        return progressbar
805955
protected void updateProgress() {

        CmsRpcAction<CmsUploadProgessInfo> callback = new CmsRpcAction<CmsUploadProgessInfo>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                getUploadService().getUploadProgressInfo(this);
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onFailure(java.lang.Throwable)
             */
            @Override
            public void onFailure(Throwable t) {

                super.onFailure(t);
                cancelUpdateProgress();
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(CmsUploadProgessInfo result) {

                updateProgressBar(result);
            }
        };
        callback.execute();
    }
204808
def progress(arr, options = {})
      bar = ProgressBar.new arr.length, options
      bar.show
      arr.each { |v| bar.increment yield(v) }
    end
166380
def update(self, pbar):
        """"""

        if pbar.seconds_elapsed < 2e-6 or pbar.currval < 2e-6: # =~ 0
            scaled = power = 0
        else:
            speed = pbar.currval / pbar.seconds_elapsed
            power = int(math.log(speed, 1000))
            scaled = speed / 1000.**power

        return self.FORMAT % (scaled, self.PREFIXES[power], self.unit)