use the bk predict method to compute the location of the source on the given date.
431582
def predict(self, date, obs_code=568):
        
        time = Time(date, scale='utc', precision=6)
        jd = ctypes.c_double(time.jd)
        # call predict with agbfile, jdate, obscode
        self.orbfit.predict.restype = ctypes.POINTER(ctypes.c_double * 5)
        self.orbfit.predict.argtypes = [ ctypes.c_char_p, ctypes.c_double, ctypes.c_int ]
        predict = self.orbfit.predict(ctypes.c_char_p(self.abg.name),
                       jd,
                       ctypes.c_int(obs_code))
        self.coordinate = coordinates.SkyCoord(predict.contents[0],
                                               predict.contents[1],
                                               unit=(units.degree, units.degree))
        self.dra = predict.contents[2]
        self.ddec = predict.contents[3]
        self.pa = predict.contents[4]
        self.date = str(time)
128814
def predict(self, input):
        

        assert self._mode == MpsGraphMode.Inference
        assert input.shape == self._ishape

        input_array = MpsFloatArray(input)
        result_handle = _ctypes.c_void_p()
        status_code = self._LIB.TCMPSPredictGraph(
            self.handle, input_array.handle, _ctypes.byref(result_handle))

        assert status_code == 0, "Error calling TCMPSPredictGraph"
        assert result_handle, "TCMPSPredictGraph unexpectedly returned NULL pointer"

        result = MpsFloatArray(result_handle)
        assert result.shape() == self._oshape

        return result
377651
def predict_y(self, xq, sigma=None, k = None):
        
        #print(len(xq) , self.dataset.dim_x)
        assert len(xq) == self.dataset.dim_x
        sigma_sq = self.sigma_sq if sigma is None else sigma*sigma
        k = k or self.k

        dists, index = self.dataset.nn_x(xq, k = k)
        #print(list(index))

        w = self._weights(dists, index, sigma_sq)
        idx = index[np.argmax(w)]
        return self.dataset.get_y(idx)
1163026
def dateAt( self, point ):
        
        for date, data in self._dateGrid.items():
            if ( data[1].contains(point) ):
                return QDate.fromJulianDay(date)
        return QDate()
1061393
function findOutNearestDate(x0, d0, d1){
            return (new Date(x0).getTime() - new Date(d0.date).getTime()) > (new Date(d1.date).getTime() - new Date(x0).getTime()) ? d0 : d1;
        }
1223851
function locate(fn, location) {
    try {
        return fn();
    } catch (e) {
        if (e instanceof JuttleError && !e.info.location) {
            e.info.location = location;
        }

        throw e;
    }
}
291173
async def on_date(self, date: datetime.date) -> dict:
        """"""
        return await self._request(
            'get', 'dailystats/{0}'.format(date.strftime('%Y-%m-%d')))
21240
function getDatePos(date, month, notValue = null) {
	const monthPos = (date.month === month.date.month && 'current') ||
		(date.month === month.nextMonth.date.month && 'next') ||
		(date.month === month.previousMonth.date.month && 'prev');
		
	switch (monthPos) {
		case 'current':
			return calculateDatePos(month.startDayOfMonth, date.day);
		case 'prev':
			return calculateDatePosinPrev(
				month.startDayOfMonth,
				month.previousMonth.daysCount,
				date.day
			);
		case 'next':
			const posNext = calculateDatePosinNext(
				month.startDayOfMonth,
				month.daysCount,
				date.day
			);

			return posNext;

		default:
			return notValue;
	}
}
15105
def _getFromDate(l, date):
    '''
    
    '''
    try:
        date = _toDate(date)
        i = _insertDateIndex(date, l) - 1
        if i == -1:
            return l[0]
        return l[i]
    except (ValueError, TypeError):
        # ValueError: date invalid / TypeError: date = None
        return l[0]
452543
def onOffset(self, date):
        """"""
        mod_month = (date.month - self.month) % 3
        return mod_month == 0 and date.day == self._get_offset_day(date)
150046
def predict(self, X):
        """"""
        return self.__cost(self.__unroll(self.__thetas), 0, np.matrix(X))
941154
@Override
    public LocalDate moveCurrentDate(final BaseCalculator<LocalDate> calculator) {
        return adjustDate(calculator.getCurrentBusinessDate(), 1, calculator);
    }
1055693
protected static void updateKDistance(int kn, LofPoint targetPoint, LofDataSet dataSet)
    {
        // 対象点のK距離、K距離近傍を算出する。
        KDistanceResult kResult = calculateKDistance(kn, targetPoint, dataSet);
        targetPoint.setkDistance(kResult.getkDistance());
        targetPoint.setkDistanceNeighbor(kResult.getkDistanceNeighbor());
    }
1031618
def predict_given_context(self, x, c, c_dims):
        
        assert len(c) == len(c_dims)
        _, index = self.dataset.nn_dims(x, c, range(self.dim_x), list(np.array(c_dims) + self.dim_x), k=1)
        return self.dataset.get_y(index[0])
735313
def date_local(self) -> datetime:
        """"""
        return datetime.fromtimestamp(self._node["date"] if "date" in self._node else self._node["taken_at_timestamp"])
148854
def predict(self, h=5):        
             

        if self.latent_variables.estimated is False:
            raise Exception("No latent variables estimated!")
        else:
            y_holder = self.y.copy() # holds past data and predicted data to create AR matrix
            full_X = self.X.copy()
            full_X = np.append(full_X,np.array([np.append(1.0, y_holder[-self.ar:][::-1])]), axis=0)
            Z = full_X

            for step in range(h):
                a, P = self._forecast_model(self.latent_variables.get_z_values(),Z,step)
                new_value = np.dot(Z[-1,:],a[:,self.y.shape[0]+step])
                y_holder = np.append(y_holder, new_value)
                Z = np.append(Z, np.array([np.append(1.0, y_holder[-self.ar:][::-1])]), axis=0)

            date_index = self.shift_dates(h)

            result = pd.DataFrame(y_holder[-h:])
            result.rename(columns={0:self.y_name}, inplace=True)
            result.index = date_index[-h:]

            return result
1140111
function calculateDatePos(startDayOfMonth, day) {
	const start = startDayOfMonth - 1;
	day = day - 1;
	const weekDayIndex = (start + day) % WEEKDAYS;
	const weekIndex = Math.ceil((start + day + 1) / WEEKDAYS) - 1;
	return {
		weekIndex,
		weekDayIndex
	};
}