Returns a value that indicates project health, currently FinancialIndicator
    is used as this value, but it can be a result of calculation with other
    indicators in future
326131
def complexidade(obj):
    
    indicators = obj.indicator_set.all()
    if not indicators:
        value = 0.0
    else:
        value = indicators.first().value
    return value
42385
def get_task_indicator(self, task_level=None):
        
        if task_level is None:
            task_level = len(self.tasks)
        return self.TASK_INDICATORS[task_level % len(self.TASK_INDICATORS)]
338825
def get_timeseries_values_for_indicators(
        self, resolution: str = "month", months: Iterable[int] = range(6, 9)
    ):
        
        if resolution == "month":
            funcs = [
                partial(get_indicator_value, month=month) for month in months
            ]
        else:
            raise NotImplementedError(
                "Currently, only the 'month' resolution is supported."
            )

        for n in self.nodes(data=True):
            for indicator in n[1]["indicators"].values():
                indicator.timeseries = [
                    func(indicator, year="2017")[0] for func in funcs
                ]
                if len(set(indicator.timeseries)) == 1:
                    indicator.timeseries = None
103128
@Override
	public Long getValue() {
		final JobStatus status = eg.getState();

		if (status == JobStatus.RUNNING) {
			// running right now - report the uptime
			final long runningTimestamp = eg.getStatusTimestamp(JobStatus.RUNNING);
			// we use 'Math.max' here to avoid negative timestamps when clocks change
			return Math.max(System.currentTimeMillis() - runningTimestamp, 0);
		}
		else if (status.isTerminalState()) {
			// not running any more -> finished or not on leader
			return NO_LONGER_RUNNING;
		}
		else {
			// not yet running or not up at the moment
			return 0L;
		}
	}
1298063
def show_health_monitor(self, health_monitor, **_params):
        """"""
        return self.get(self.health_monitor_path % (health_monitor),
                        params=_params)
1344302
def relevant_items(df):
    
    start_date = datetime(2013, 1, 1)

    df['DataProjeto'] = pd.to_datetime(df['DataProjeto'])

    # get only projects newer than start_date
    # and items with price > 0
    df = df[df.DataProjeto >= start_date]
    df = df[df.VlUnitarioAprovado > 0.0]

    return df
54649
function getHealthReport() {
        var healthReport = {
            projectLoadTimes : "",
            fileOpenTimes : ""
        };

        _.forEach(perfData, function (entry, testName) {
            if (StringUtils.startsWith(testName, "Application Startup")) {
                healthReport.AppStartupTime = getValueAsString(entry);
            } else if (StringUtils.startsWith(testName, "brackets module dependencies resolved")) {
                healthReport.ModuleDepsResolved = getValueAsString(entry);
            } else if (StringUtils.startsWith(testName, "Load Project")) {
                healthReport.projectLoadTimes += ":" + getValueAsString(entry, true);
            } else if (StringUtils.startsWith(testName, "Open File")) {
                healthReport.fileOpenTimes += ":" + getValueAsString(entry, true);
            }
        });

        return healthReport;
    }
623682
def indicators_shelf(self):
        """"""
        if self._indicators_shelf is None:
            self._indicators_shelf = shelve.open(self.indicator_shelf_fqfn, writeback=False)
        return self._indicators_shelf
131606
public void setHomeAsUpIndicator(Drawable indicator) {
        if(!deviceSupportMultiPane()) {
            pulsante.setHomeAsUpIndicator(indicator);
        }
        else {
            actionBar.setHomeAsUpIndicator(indicator);
        }
    }
688701
public synchronized Object getValueAt(int rowIndex, int columnIndex) {
    TableRowProgressMonitor monitor = monitors.get(rowIndex);
    switch (columnIndex) {
    case TITLE_COLUMN:
      return monitor.getTitle();
    case PROGRESS_COLUMN:
      return monitor.getProgressBar();
    case STATUS_COLUMN:
      return monitor.getStatus();
    default:
      throw new IndexOutOfBoundsException();
    }
  }
52277
public float getMeanValue() {
    if (Measure_Type.featOkTst && ((Measure_Type)jcasType).casFeat_meanValue == null)
      jcasType.jcas.throwFeatMissing("meanValue", "ch.epfl.bbp.uima.types.Measure");
    return jcasType.ll_cas.ll_getFloatValue(addr, ((Measure_Type)jcasType).casFeatCode_meanValue);}
659781
def get_health(self):
        
        summary = {'badreadings': [], 'health': const.Health.Ok}
        fallbackreadings = []
        try:
            self.oem_init()
            fallbackreadings = self._oem.get_health(summary)
            for reading in self.get_sensor_data():
                if reading.health != const.Health.Ok:
                    summary['health'] |= reading.health
                    summary['badreadings'].append(reading)
        except exc.BypassGenericBehavior:
            pass
        if not summary['badreadings']:
            summary['badreadings'] = fallbackreadings
        return summary
242348
def progress_indicator(self, fmt=None, interval=100, values=None):
        
        return ProgressIndicator(self.io, fmt, interval, values)
620993
public boolean getCritical()
   {
      Boolean critical = (Boolean) getCachedValue(TaskField.CRITICAL);
      if (critical == null)
      {
         Duration totalSlack = getTotalSlack();
         ProjectProperties props = getParentFile().getProjectProperties();
         int criticalSlackLimit = NumberHelper.getInt(props.getCriticalSlackLimit());
         if (criticalSlackLimit != 0 && totalSlack.getDuration() != 0 && totalSlack.getUnits() != TimeUnit.DAYS)
         {
            totalSlack = totalSlack.convertUnits(TimeUnit.DAYS, props);
         }
         critical = Boolean.valueOf(totalSlack.getDuration() <= criticalSlackLimit && NumberHelper.getInt(getPercentageComplete()) != 100 && ((getTaskMode() == TaskMode.AUTO_SCHEDULED) || (getDurationText() == null && getStartText() == null && getFinishText() == null)));
         set(TaskField.CRITICAL, critical);
      }
      return (BooleanHelper.getBoolean(critical));
   }
696071
def check_health(settings_cls) -> int:
    
    cls_kwargs = get_kwargs(settings_cls)
    loop = asyncio.get_event_loop()
    return loop.run_until_complete(async_check_health(cls_kwargs.get('redis_settings')))
485545
public static DiscreteFactor createIndicatorFeatureTensor(VariableNumMap vars, int featureVarNum,
      TableFactorBuilder initialWeights) {
    // The "name" of an indicator feature is the assignment that it indicates.
    List<List<Object>> features = Lists.newArrayList();
    Iterator<Assignment> assignmentIterator = initialWeights != null ?
        initialWeights.assignmentIterator() : new AllAssignmentIterator(vars);
    while (assignmentIterator.hasNext()) {
      features.add(assignmentIterator.next().getValues());
    }
    DiscreteVariable featureVariable = new DiscreteVariable("indicator features", features);
    VariableNumMap featureVarMap = VariableNumMap.singleton(featureVarNum, "features-" + featureVarNum,
        featureVariable);

    TableFactorBuilder featureValueBuilder = new TableFactorBuilder(vars.union(featureVarMap),
        SparseTensorBuilder.getFactory());
    for (List<Object> featureValues : features) {
      Assignment newAssignment = vars.outcomeToAssignment(featureValues)
          .union(featureVarMap.outcomeArrayToAssignment(featureValues));
      featureValueBuilder.setWeight(newAssignment, 1.0);
    }
    return featureValueBuilder.build().cacheWeightPermutations();
  }
460238
def create_healthcheck(self):
        """"""

        return Healthcheck(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)