Public: Returns the value of the registered primary stat.
966382
def primary_stat
      @primary_stat ||= manifest.stats.filter(primary: true).with_context([self]).map { |name, value| [name, value] }.first&.last
    end
479358
public StatisticImpl getStatistic() {
        StatisticImpl aggStat = getSpdDouble().getStatistic();
        aggStat.setLastSampleTime(PmiUtil.currentTime());
        return aggStat;
    }
320026
def _pk(self, obj):
        
        pk_values = tuple(getattr(obj, c.name)
                          for c in obj.__mapper__.primary_key)
        if len(pk_values) == 1:
            return pk_values[0]
        return pk_values
550796
def pshard_stats_for_version(version):
    
    pshard_stats_metrics = dict(PRIMARY_SHARD_METRICS)
    if version >= [1, 0, 0]:
        pshard_stats_metrics.update(PRIMARY_SHARD_METRICS_POST_1_0)

    return pshard_stats_metrics
97684
def primary_key(self):
        
        primary_key = self.__current_descriptor.get('primaryKey', [])
        if not isinstance(primary_key, list):
            primary_key = [primary_key]
        return primary_key
159082
def primary(self, repl_id):
        
        repl = self[repl_id]
        primary = repl.primary()
        return repl.member_info(repl.host2id(primary))
413864
def get_fld2val(self, name, vals):
        """"""
        if vals:
            return self._init_fld2val_stats(name, vals)
        return self._init_fld2val_null(name)
985996
def getEmpTraitCovar(self):
        
        if self.P==1:
            out=self.Y[self.Iok].var()
        else:
            out=SP.cov(self.Y[self.Iok].T)
        return out
951090
def format(self):
        
        name = self._primary.value[0]
        if self.surname:
            if name:
                name += ' '
            name += self.surname
        if self._primary.value[2]:
            if name:
                name += ' '
            name += self._primary.value[2]
        return name
187546
def _GetStat(self):
    
    stat_object = super(VShadowFileEntry, self)._GetStat()

    if self._vshadow_store is not None:
      # File data stat information.
      stat_object.size = self._vshadow_store.volume_size

    # Ownership and permissions stat information.

    # File entry type stat information.

    # The root file entry is virtual and should have type directory.
    return stat_object
1154477
public static boolean getBooleanValue(String primaryKey, String secondaryKey) {
        Object val = CFG.get(primaryKey);
        if (val == null) {
            val = CFG.get(secondaryKey);
            if (val == null) {
                throw new SofaRpcRuntimeException("Not found key: " + primaryKey + "/" + secondaryKey);
            }
        }
        return Boolean.valueOf(val.toString());
    }
54330
protected function getPrimaryName() {
		if ($this->primary === null) {
			$tableModel    = $this->getTableModel();
			$this->primary = $tableModel->getModelsMetaData()->getPrimaryKeyAttributes($tableModel);
			
			if (empty($this->primary)) {
				$this->primary = false;
			}
			
			if (count($this->primary) === 1) {
				$this->primary = current($this->primary);
			}
		}
		
		if ($this->primary === false) {
			return;
		}
		
		return $this->primary;
	}
1026138
def _primary_input(self, index):
        '''
        
        '''
        primary_input = z.ZcashByteData()
        primary_input += self.tx_joinsplits[index].anchor
        primary_input += self.tx_joinsplits[index].nullifiers
        primary_input += self.tx_joinsplits[index].commitments
        primary_input += self.tx_joinsplits[index].vpub_old
        primary_input += self.tx_joinsplits[index].vpub_new
        primary_input += self.hsigs[index]
        primary_input += self.tx_joinsplits[index].vmacs
        return primary_input.to_bytes()
378909
public StatisticImpl getStatistic() {
        if (enabled) {
            if (proxy == null) {
                System.out.println("[SpdStatisticExternal] null proxy");
                return null;
            }

            proxy.updateStatisticOnRequest(dataId);

            // onReqStatistic will be updated by the component
            // the reference is kept in this class
            return onReqStatistic;
        } else
            return null;
    }
70414
def compute_stats(self, incremental=False):
        
        return self._client.compute_stats(
            self._qualified_name, incremental=incremental
        )
393799
def primary_key(cls):
        

        if cls.__from_class__:
            cls = cls.__from_class__
        return cls.__table__.primary_key.columns.values()[0].name
897905
def primary_measures(self):
        
        from ambry.valuetype.core import ROLE

        for c in self.columns:

            if not c.parent and c.role == ROLE.MEASURE:
                    yield c