PROGRESS Section 9.3.17
491502
def progress(UserUser_presence=0):
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x3)  # 00000011
    c = ProgressIndicator()
    packet = a / b / c
    if UserUser_presence is 1:
        d = UserUserHdr()
        packet = packet / d
    return packet
702187
def report_progress(self):
        """"""
        percent = self.calc_percent()
        total = format_bytes(self._total)

        speed = self.calc_speed()
        total_speed_report = '{0} at {1}'.format(total, speed)

        report = '\r{0: <56} {1: >30}'.format(percent, total_speed_report)

        if self._finished:
            print(report)
        else:
            print(report, end="")
        sys.stdout.flush()
204808
def progress(arr, options = {})
      bar = ProgressBar.new arr.length, options
      bar.show
      arr.each { |v| bar.increment yield(v) }
    end
380147
def _get_progress(self):
        
        input_data = []
        ret = {}

        # traverse emerge.log from bottom up to get latest information
        last_lines = self.py3.command_output(["tail", "-50", self.emerge_log_file])
        input_data = last_lines.split("\n")
        input_data.reverse()

        for line in input_data:
            if "*** terminating." in line:
                # copy content of ret_default, not only the references
                ret = copy.deepcopy(self.ret_default)
                break
            else:
                status_re = re.compile(
                    "\((?P<cu>[\d]+) of (?P<t>[\d]+)\) "
                    "(?P<a>[a-zA-Z\/]+( [a-zA-Z]+)?) "
                    "\((?P<ca>[\w\-]+)\/(?P<p>[\w\.]+)"
                )
                res = status_re.search(line)
                if res is not None:
                    ret["action"] = res.group("a").lower()
                    ret["category"] = res.group("ca")
                    ret["current"] = res.group("cu")
                    ret["pkg"] = res.group("p")
                    ret["total"] = res.group("t")
                    break
        return ret
73450
def determine_progression(self, shorthand=False):
        """"""
        res = []
        for x in self.bar:
            res.append([x[0], progressions.determine(x[2].get_note_names(),
                       self.key.key, shorthand)])
        return res
80588
def ytdl_progress_hook(self, d):
        """"""
        if d['status'] == 'downloading':
            self.play_empty()

            if "elapsed" in d:
                if d["elapsed"] > self.current_download_elapsed + 4:
                    self.current_download_elapsed = d["elapsed"]

                    current_download = 0
                    current_download_total = 0
                    current_download_eta = 0
                    if "total_bytes" in d and d["total_bytes"] > 0:
                        current_download_total = d["total_bytes"]
                    elif "total_bytes_estimate" in d and d["total_bytes_estimate"] > 0:
                        current_download_total = d["total_bytes_estimate"]
                    if "downloaded_bytes" in d and d["downloaded_bytes"] > 0:
                        current_download = d["downloaded_bytes"]
                    if "eta" in d and d["eta"] > 0:
                        current_download_eta = d["eta"]

                    if current_download_total > 0:
                        percent = round(100 * (current_download / current_download_total))
                        if percent > 100:
                            percent = 100
                        elif percent < 0:
                            percent = 0

                        seconds = str(round(current_download_eta)) if current_download_eta > 0 else ""
                        eta = " ({} {} remaining)".format(seconds, "seconds" if seconds != 1 else "second")

                        downloading = "Downloading song: {}%{}".format(percent, eta)
                        if self.prev_time != downloading:
                            self.timelog.debug(downloading)
                            self.prev_time = downloading
        if d['status'] == 'error':
            self.statuslog.error("Error downloading song")
        elif d['status'] == 'finished':
            self.statuslog.info("Downloaded song")
            downloading = "Downloading song: {}%".format(100)
            if self.prev_time != downloading:
                self.timelog.debug(downloading)
                self.prev_time = downloading

            if "elapsed" in d:
                download_time = "{} {}".format(d["elapsed"] if d["elapsed"] > 0 else "<1",
                                               "seconds" if d["elapsed"] != 1 else "second")
                self.logger.debug("Downloaded song in {}".format(download_time))

            # Create an FFmpeg player
            future = asyncio.run_coroutine_threadsafe(self.create_ffmpeg_player(d['filename']), client.loop)
            try:
                future.result()
            except Exception as e:
                logger.exception(e)
                return
1193945
def notify_progress(self):
        '''  '''
        _total = 0
        for _session in self._sessions.values():
            _total += _session.bytes_transferred

        if AsperaSession.PROGRESS_MSGS_SEND_ALL:
            self._run_progress_callbacks(_total)
        else:
            # dont call progress callback unless total has changed
            if self._total_bytes_transferred != _total:
                self._total_bytes_transferred = _total
                self._run_progress_callbacks(_total)
91795
def _progress_aware(self):
        """"""
        from dvc.progress import progress

        if not progress.is_finished:
            progress._print()
        progress.clearln()
772793
def progress(self, p):
        '''
        
        '''
        self.task_stack[-1] = self.task_stack[-1]._replace(progress=p)
        self.progress_report()
1315096
def progress_inc(self, step=1, new_status=None):
    
    self._value += step
    self.progress(self._value, new_status=new_status)
622302
function updateStepProgressIO() {
    io.stepProgress = stepEl.map((el, i) => {
      const marginTop = stepOffsetHeight[i] - offsetMargin;
      const marginBottom = -viewH + offsetMargin;
      const rootMargin = `${marginTop}px 0px ${marginBottom}px 0px`;
      const threshold = createThreshold(stepOffsetHeight[i]);
      const options = { rootMargin, threshold };
      // console.log(options);
      const obs = new IntersectionObserver(intersectStepProgress, options);
      obs.observe(el);
      return obs;
    });
  }
1209534
function writeProgress(id, total, completed) {
    var percent = Math.round(10 * (100 * completed) / total) / 10;
    if(id == lastProgressId) {
        readline.cursorTo(process.stdout, 0);
        readline.clearLine(process.stdout, 0);
    } else {
        lastProgressId = id;
        process.stdout.write('\n');
    }
    var progressTitles = {
        projects: 'Indexing Projects',
        chunks: 'Indexing Chunks',
        ta: 'Indexing translationAcademy',
        resources: 'Indexing Resources',
        container: 'Downloading Containers',
        catalog: 'Indexing Catalogs',
        langnames: 'Indexing Target Languages',
        'temp-langnames': 'Indexing Temporary Target Languages',
        'approved-temp-langnames': 'Indexing Approved Temporary Target Languages',
        'new-language-questions': 'Indexing Questionnaire'
    };
    process.stdout.write((progressTitles[id] || id) + ' [' + total + '] ' + percent + '%');
}
399526
function progress( $step )
    {
        $totalSteps = 0;
        foreach ( $this->StepTable as $tableStep )
        {
            if ( !isset( $tableStep['count_step'] ) or
                 $tableStep['count_step'] )
                ++$totalSteps;
        }

        $currentStep = 0;
        foreach ( $this->StepTable as $key => $tableStep )
        {
            if ( $step['class'] == $tableStep['class'] )
            {
                break;
            }
            else if ( !isset( $tableStep['count_step'] ) or
                      $tableStep['count_step'] )
                ++$currentStep;
        }

        return (int) ( $currentStep * 100 / ( $totalSteps - 1 ) );
    }
849514
def _progress(bytes_received, bytes_total, worker):
        """"""
        worker.sig_download_progress.emit(
            worker.url, worker.path, bytes_received, bytes_total)
937885
def progress(progress):
    
    if isinstance(progress, int) or isinstance(progress, float):
        progress = float(progress)
    else:
        try:
            progress = float(json.loads(progress))
        except (TypeError, ValueError):
            return warning("Progress must be a float.")

    if not 0 <= progress <= 1:
        return warning("Progress must be a float between 0 and 1.")

    return json.dumps({'proc.progress': progress})
174171
def show_progress(self):
        """'"""
        if self.in_progress_hanging:
            sys.stdout.write('.')
            sys.stdout.flush()
567515
def progress(self, *msg):
        
        label = colors.purple("Progress")
        self._msg(label, *msg)