Obtains q(t) for the given t.
971818
private int at(long t) {
        SortedMap<Long, int[]> head = data.subMap(t,Long.MAX_VALUE);
        if (head.isEmpty()) return 0;
        return data.get(head.firstKey())[0];
    }
1049763
def T_sigma(self, sigma):
        
        R_sigma, Q_sigma = self.RQ_sigma(sigma)
        return lambda v: R_sigma + self.beta * Q_sigma.dot(v)
122568
public T _get(long seqno) {
        int index=index(seqno);
        lock.lock();
        try {
            return index < 0? null : buf[index];
        }
        finally {
            lock.unlock();
        }
    }
361093
def q(self):
        
        if self._q is None:
            if self._euler is not None:
                # get q from euler
                self._q = self._euler_to_q(self.euler)
            elif self._dcm is not None:
                # get q from DCM
                self._q = self._dcm_to_q(self.dcm)
        return self._q
641255
def scan(self, t, dt=None, aggfunc=None):
        
        return self.data.scan(t, dt, aggfunc)
1179917
def get_q_object(self):
        
        q_object = Q()
        for field in self.searchable_fields:
            value = self.request.GET.getlist(alias_field(self.model, field), None)
            mini_q = Q()
            for val in value:
                attr = "{0}{1}".format(field, self.specifications.get(field, ''))
                if val:
                    dic_tmp = {
                        attr: val
                    }
                    mini_q |= Q(**dic_tmp)
            q_object &= mini_q
        return q_object
1026353
public int getQuality() {
        int qvalue, sum = 0, quality = 0, tempQ[];

        for (int i = 0; i < qTables.length; i++) {
            if (qTables[i] != null) {
                tempQ = qTables[i].getQ();
                for (int j = 0; j < 64; j++) {
                    sum += tempQ[j];
                }
            }
        }

        if ((qTables[0] != null) && (qTables[1] != null)) {

            qvalue = (int) (qTables[0].getQ()[2] + qTables[0].getQ()[53] + qTables[1].getQ()[0] + qTables[1].getQ()[63]);

            for (int i = 0; i < 100; i++) {
                if ((qvalue < DOUBLE_QUANT_HASH[i]) && (sum < DOUBLE_QUANT_SUMS[i])) {
                    continue;
                }

                if (((qvalue <= DOUBLE_QUANT_HASH[i]) && (sum <= DOUBLE_QUANT_SUMS[i])) || (i >= 50)) {
                    quality = i + 1;
                }

                break;
            }
        } else if (qTables[0] != null) {

            qvalue = (qTables[0].getQ()[2] + qTables[0].getQ()[53]);

            for (int i = 0; i < 100; i++) {
                if ((qvalue < SINGLE_QUANT_HASH[i]) && (sum < SINGLE_QUANT_SUMS[i])) {
                    continue;
                }

                if (((qvalue <= SINGLE_QUANT_HASH[i]) && (sum <= SINGLE_QUANT_SUMS[i])) || (i >= 50)) {
                    quality = i + 1;
                }

                break;
            }
        }

        return quality;
    }
1024564
def scan_timestamp(self, tbuf):
        ''''''
        while True:
            (tusec,) = struct.unpack('>Q', tbuf)
            t = tusec * 1.0e-6
            if abs(t - self._last_timestamp) <= 3*24*60*60:
                break
            c = self.f.read(1)
            if len(c) != 1:
                break
            tbuf = tbuf[1:] + c
        return t
1318911
def calmar(sharpe, T = 1.0):
    '''
    
    '''
    x = 0.5*T*sharpe*sharpe
    return x/qp(x)
525357
def get_in(d, t, default=None):
    
    result = reduce(lambda d, t: d.get(t, {}), t, d)
    if not result:
        return default
    else:
        return result
948225
def DebyeChain(q, Rg):
    
    a = (q * Rg) ** 2
    return 2 * (np.exp(-a) - 1 + a) / a ** 2
1330750
def get(self, timeout=None):
        """"""
        self.wait(timeout)
        if self._state==self.FULFILLED:
            return self.value
        else:
            raise ValueError("Calculation didn't yield a value")
339408
function(q,a,b,x,s,t){
        return __add(__rol(__add(__add(a,q),__add(x,t)),s),b);
    }
1117284
def qstd(x,quant=0.05,top=False,bottom=False):
    
    s = np.sort(x)
    n = np.size(x)
    lo = s[int(n*quant)]
    hi = s[int(n*(1-quant))]
    if top:
        w = np.where(x>=lo)
    elif bottom:
        w = np.where(x<=hi)
    else:
        w = np.where((x>=lo)&(x<=hi))
    return np.std(x[w])
761132
public ZMatrixRMaj getQ(ZMatrixRMaj Q ) {
        Q = UtilDecompositons_ZDRM.checkIdentity(Q,N,N);

        Arrays.fill(u,0,N*2,0);
        for( int j = N-2; j >= 0; j-- ) {
            QrHelperFunctions_ZDRM.extractHouseholderColumn(QH,j+1,N,j,u,0);
            QrHelperFunctions_ZDRM.rank1UpdateMultR(Q, u, 0,gammas[j], j + 1, j + 1, N, b);
        }

        return Q;
    }
1358393
public double calculateQmax() {
        if (Qtot == null) {
            calculateQ();
        }

        double qmax = 0f;
        for( int i = 0; i < Qtot.length; i++ ) {
            if (Qtot[i][1] > qmax)
                qmax = Qtot[i][1];
        }

        return qmax;
    }
274212
def t_VAR(self, t):
        '
        t.type = self.reserved.get(t.value.lower(), 'VAR')
        return t