Work in progress
500997
public function createItems()
    {
        $count = $this->hasRequestParameter('count') ? $this->getRequestParameter('count') : 100;

        DataGenerator::generateItems($count);

        echo 'created '.$count.' items';
    }
691268
def progress(self, percent, tag, summary):
        

        if self.progress_updates:
            self.progress_updates(percent, tag, summary)
377609
def progress(self):
        
        now = time()
        if now - self.last_progress_t > 1:
            self.last_progress_t = now
            if self.status:
                self.uplink.status(self.status)
                self.status = None
            self.__spill_counters()
            self.uplink.progress(self.progress_value)
            self.uplink.flush()
368092
def build(self, *args, **kwargs):
        """"""
        # Create the directories of the work.
        self.indir.makedirs()
        self.outdir.makedirs()
        self.tmpdir.makedirs()

        # Build dirs and files of each task.
        for task in self:
            task.build(*args, **kwargs)

        # Connect signals within the work.
        self.connect_signals()
1282740
def update_progress(total, done)
      percentage = total.zero? ? 100 : ((done.to_f / total) * 100).to_i
      progress(percentage)
    end
250033
function InstalationProgress(library, step, finished) {
  var fillSpaces = ' '.repeat(15 - library.length)
  if (finished) {
    return chalk.cyan.dim(' > ') + chalk.yellow.dim(library) + fillSpaces + chalk.green('Installed')
  } else {
    return chalk.cyan(' > ') + chalk.yellow(library) + fillSpaces+ chalk.blue(step)
  }
}
272922
function progress( _line ){

    messages[ _line ].progress++;

    if( (messages[ _line ].progress + messages[ _line ].diff) > 0 ){

        messages[ _line ].progress = 0;

    }

}
1115119
private void performIndexActions(Progress progress, String transactionId) {
    List<IndexAction> indexActions =
        dataService
            .findAll(INDEX_ACTION, createQueryGetAllIndexActions(transactionId), IndexAction.class)
            .collect(toList());
    try {
      boolean success = true;
      int count = 0;
      for (IndexAction indexAction : indexActions) {
        success &= performAction(progress, count++, indexAction);
      }
      if (success) {
        progress.progress(count, "Executed all index actions, cleaning up the actions...");
        dataService.delete(INDEX_ACTION, indexActions.stream());
        dataService.deleteById(INDEX_ACTION_GROUP, transactionId);
        progress.progress(count, "Cleaned up the actions.");
      }
    } catch (Exception ex) {
      LOG.error("Error performing index actions", ex);
      throw ex;
    } finally {
      progress.status("Refresh index start");
      indexService.refreshIndex();
      progress.status("Refresh index done");
    }
  }
396588
void complete()
    {
        _file=_stack[_top].getFileName()+":"+_stack[_top].getLineNumber();
        _method=_stack[_top].getClassName()+"."+_stack[_top].getMethodName();
        _depth=_stack.length-_top;
        _thread = Thread.currentThread().getName();
    }
43867
private void advance() {
        if (current == null || !current.hasNext()) {
            do {
                current = iters.poll();
            } while (current != null && !current.hasNext());
        }
    }
1362428
public void progress() {
    count++;
    if (count % period == 0 && LOG.isInfoEnabled()) {
      final double percent = 100 * (count / (double) totalIterations);
      final long tock = System.currentTimeMillis();
      final long timeInterval = tock - tick;
      final long linesPerSec = (count - prevCount) * 1000 / timeInterval;
      tick = tock;
      prevCount = count;
      final int etaSeconds = (int) ((totalIterations - count) / linesPerSec);
      final long hours = SECONDS.toHours(etaSeconds);
      final long minutes = SECONDS.toMinutes(etaSeconds - HOURS.toSeconds(hours));
      final long seconds = SECONDS.toSeconds(etaSeconds - MINUTES.toSeconds(minutes));
      LOG.info(String.format("[%3.0f%%] Completed %d iterations of %d total input. %d iters/s. ETA %02d:%02d:%02d",
          percent, count, totalIterations, linesPerSec, hours, minutes, seconds));
    }
  }
901052
function (e) {
			var $progress = $('.progress:first', this.$el),
					complete;

			if (e.lengthComputable) {
				complete = e.loaded / e.total * 100;
				complete = complete ? complete : 0;
				$progress.attr('value', complete);
				$progress.html(complete);
			}
		}
608686
def task(ft):
	
	ft.pack(expand = True,  fill = BOTH,  side = TOP)
	pb_hD = ttk.Progressbar(ft, orient = 'horizontal', mode = 'indeterminate')
	pb_hD.pack(expand = True, fill = BOTH, side = TOP)
	pb_hD.start(50)
	ft.mainloop()
1320572
function done() {
        var arg = errors.length ? errors : null
        --pending || process.nextTick(callback, arg)
    }
619721
def set_work(self, work):
        """"""
        if not hasattr(self, "_work"):
            self._work = work
        else:
            if self._work != work:
                raise ValueError("self._work != work")
778755
def progress_updater(size, total):
    """"""
    current_task.update_state(
        state=state('PROGRESS'),
        meta=dict(size=size, total=total)
    )
578492
def progress(request):
    
    if 'delete' in request.GET:
        models.MachineCache.objects.all().delete()
        models.InstituteCache.objects.all().delete()
        models.PersonCache.objects.all().delete()
        models.ProjectCache.objects.all().delete()
        return render(
            template_name='main.html',
            context={'content': 'Deleted'},
            request=request)

    if request.method == 'POST':
        if 'task_id' in request.POST:
            result = Task.AsyncResult(request.POST['task_id'])
            if result.failed():
                value = {
                    'info': {},
                    'ready': result.ready(),
                }
            else:
                value = {
                    'info': result.info,
                    'ready': result.ready(),
                }
            return HttpResponse(
                json.dumps(value), content_type="application/json")
    return None