forces to use the Shell Progress
766450
def progress_patch(self, _=False):
        
        from .progress import ShellProgressView
        self.cli_ctx.progress_controller.init_progress(ShellProgressView())
        return self.cli_ctx.progress_controller
1278678
def shell(ctx):
    

    shell = code.InteractiveConsole({"engineer": getattr(ctx.parent, "widget", None)})
    shell.interact("\n".join([
        "Engineer connected to %s" % ctx.parent.params["host"],
        "Dispatch available through the 'engineer' object"
    ]))
920690
def update(shell)
      shell.status "Updating ..."

      shell.run 'git', 'reset', '--hard', 'HEAD'
      shell.run 'git', 'pull', '-f'

      shell.status "Updated."
    end
134682
void force() throws InternalLogException
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "force", this);

        // Check that the file is actually open
        if (_activeFile == null)
        {
            if (tc.isEntryEnabled())
                Tr.exit(tc, "force", "InternalLogException");
            throw new InternalLogException(null);
        }

        // Attempt to get exclusive lock on the lock object provided by RecoveryLogService
        // to protect access to the isSuspended flag, which is toggled during calls
        // to RecoveryLogService suspend/resume
        synchronized (RLSControllerImpl.SUSPEND_LOCK)
        {
            while (RLSControllerImpl.isSuspended())
            {
                try
                {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "Waiting for RecoveryLogService to resume");
                    RLSControllerImpl.SUSPEND_LOCK.wait();
                } catch (InterruptedException exc)
                {
                    // This exception is received if another thread interrupts this thread by calling this threads 
                    // Thread.interrupt method. The RecoveryLogService class does not use this mechanism for 
                    // breaking out of the wait call - it uses notifyAll to wake up all waiting threads. This
                    // exception should never be generated. If for some reason it is called then ignore it and 
                    // start to wait again.
                    FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.LogHandle.force", "834", this);
                }
            }

            // Check if we've been configured to run in snapshot safe mode
            // With this in place we synchronize all force method calls and
            // take the synchronization performance hit.  The benefit is that we
            // can be sure that the log files will be in a consistent state
            // for snapshotting
            if (Configuration._isSnapshotSafe)
            {
                _activeFile.force();
            }
        }

        //  If we're not configured to be snapshot safe then we
        //  run a slight risk here that a force operation could be called
        //  just after the RecoveryLogService has been called to suspend,
        //  as we're outwith the sync block.
        //  The benefit is that we don't have the synchronization performance 
        //  hit when calling the force method 
        if (!Configuration._isSnapshotSafe)
        {
            _activeFile.force();
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "force");
    }
836911
def add_progress(kwargs, git, progress):
    """"""
    if progress is not None:
        v = git.version_info[:2]
        if v >= (1, 7):
            kwargs['progress'] = True
        # END handle --progress
    # END handle progress
    return kwargs
655611
def deploy(self):
        '''
        
        '''
        self.shell.send(
            self.thin,
            os.path.join(self.thin_dir, 'salt-thin.tgz'),
        )
        self.deploy_ext()
        return True
904691
function notifyStepProgress(element, progress) {
    const index = getIndex(element);
    if (progress !== undefined) stepStates[index].progress = progress;
    const resp = { element, index, progress: stepStates[index].progress };

    if (stepStates[index].state === 'enter') cb.stepProgress(resp);
  }
505980
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException {
        AnnotatedLargeText text = obtainLog();
        if(text!=null) {
            text.doProgressText(req,rsp);
            return;
        }
        rsp.setStatus(HttpServletResponse.SC_OK);
    }
855320
function(cb_) {
      console.log('Extracting ' + path.join(THRUST_PATH, 
                                            THRUST_RELEASE_FILENAME));
      if(os.platform() === 'darwin') {
        var unzip_p = require('child_process').spawn('unzip', 
          [ '-oqq', path.join(THRUST_PATH, THRUST_RELEASE_FILENAME) ], {
            cwd: THRUST_PATH
        });
        unzip_p.on('close', function (code) {
          if(code !== 0) {
            return cb_(common.err('Extraction failed with code: ' + code,
                                  'boostrap:failed_extraction'));
          }
          return cb_();
        });
      }
      else {
        async.series([
          function(cb_) {
            fs.createReadStream(path.join(THRUST_PATH, THRUST_RELEASE_FILENAME))
              .on('error', cb_)
              .pipe(unzip.Extract({
                path: THRUST_PATH
              }).on('close', cb_));
          },
          function(cb_) {
            if(os.platform() === 'linux') {
              var exec_path = path.join(THRUST_PATH, 'thrust_shell');
              fs.chmod(exec_path, 0755, cb_);
            }
            else {
              return cb_();
            }
          }
        ], cb_);
      }
    }
527963
def complete_shells(line, text, predicate=lambda i: True):
    """"""
    res = [i.display_name + ' ' for i in dispatchers.all_instances() if
           i.display_name.startswith(text) and
           predicate(i) and
           ' ' + i.display_name + ' ' not in line]
    return res
849514
def _progress(bytes_received, bytes_total, worker):
        """"""
        worker.sig_download_progress.emit(
            worker.url, worker.path, bytes_received, bytes_total)
454539
def cli_progress(addr, offset, size):
    """"""
    width = 25
    done = offset * width // size
    print("\r0x{:08x} {:7d} [{}{}] {:3d}% "
          .format(addr, size, '=' * done, ' ' * (width - done),
                  offset * 100 // size), end="")
    try:
        sys.stdout.flush()
    except OSError:
        pass # Ignore Windows CLI "WinError 87" on Python 3.6
    if offset == size:
        print("")
591341
def set_shellwidget(self, shellwidget):
        """"""
        self.shellwidget = shellwidget
        shellwidget.set_figurebrowser(self)
        shellwidget.sig_new_inline_figure.connect(self._handle_new_figure)
480113
def run(self, force=False):
        
        now = time.time()
        for func, spec in self.tasks.items():
            if force or now >= spec.get('next_run', 0):
                func()
                spec['next_run'] = now + spec['interval']
519246
function _progress(lengthComputable, loaded, total) {
    var event = new _Event('progress');
    event.target = this;
    event.lengthComputable = lengthComputable;
    event.loaded = loaded;
    event.total = total;
    this.dispatchEvent(event);
  }
674250
function(cb_) {
      console.log('Downloading: ' + THRUST_RELEASE_URL);

      var itv = setInterval(function() {
        process.stdout.write('.');
      }, 1000);
      var finish = function(err) {
        clearInterval(itv);
        process.stdout.write('\n');
        return cb_(err);
      }

      request(THRUST_RELEASE_URL)
        .on('error', finish)
        .on('end', finish)
        .pipe(fs.createWriteStream(path.join(THRUST_PATH, 
                                             THRUST_RELEASE_FILENAME)));
    }
1374866
private void onPushLevelProgress(int steps, Object source, boolean singlesteplevel)
    {
        if (this.currentStep.isLevelFinished()) {
            // If current step is done move to next one
            this.currentStep = this.currentStep.getParent().nextStep(null, source);
        }

        // Add level
        this.currentStep = this.currentStep.addLevel(steps, source, singlesteplevel);
    }