# -*- coding: utf-8 -*-
"""
Created on Fri Aug 17 13:10:52 2012
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
import scipy.sparse as sparse
from scipy.sparse.linalg import svds
from scipy.optimize import fminbound
import warnings
from statsmodels.tools.tools import Bunch
from statsmodels.tools.sm_exceptions import (
IterationLimitWarning, iteration_limit_doc)
def clip_evals(x, value=0): # threshold=0, value=0):
evals, evecs = np.linalg.eigh(x)
clipped = np.any(evals < value)
x_new = np.dot(evecs * np.maximum(evals, value), evecs.T)
return x_new, clipped
[docs]def corr_nearest(corr, threshold=1e-15, n_fact=100):
'''
Find the nearest correlation matrix that is positive semi-definite.
The function iteratively adjust the correlation matrix by clipping the
eigenvalues of a difference matrix. The diagonal elements are set to one.
Parameters
----------
corr : ndarray, (k, k)
initial correlation matrix
threshold : float
clipping threshold for smallest eigenvalue, see Notes
n_fact : int or float
factor to determine the maximum number of iterations. The maximum
number of iterations is the integer part of the number of columns in
the correlation matrix times n_fact.
Returns
-------
corr_new : ndarray, (optional)
corrected correlation matrix
Notes
-----
The smallest eigenvalue of the corrected correlation matrix is
approximately equal to the ``threshold``.
If the threshold=0, then the smallest eigenvalue of the correlation matrix
might be negative, but zero within a numerical error, for example in the
range of -1e-16.
Assumes input correlation matrix is symmetric.
Stops after the first step if correlation matrix is already positive
semi-definite or positive definite, so that smallest eigenvalue is above
threshold. In this case, the returned array is not the original, but
is equal to it within numerical precision.
See Also
--------
corr_clipped
cov_nearest
'''
k_vars = corr.shape[0]
if k_vars != corr.shape[1]:
raise ValueError("matrix is not square")
diff = np.zeros(corr.shape)
x_new = corr.copy()
diag_idx = np.arange(k_vars)
for ii in range(int(len(corr) * n_fact)):
x_adj = x_new - diff
x_psd, clipped = clip_evals(x_adj, value=threshold)
if not clipped:
x_new = x_psd
break
diff = x_psd - x_adj
x_new = x_psd.copy()
x_new[diag_idx, diag_idx] = 1
else:
warnings.warn(iteration_limit_doc, IterationLimitWarning)
return x_new
[docs]def corr_clipped(corr, threshold=1e-15):
'''
Find a near correlation matrix that is positive semi-definite
This function clips the eigenvalues, replacing eigenvalues smaller than
the threshold by the threshold. The new matrix is normalized, so that the
diagonal elements are one.
Compared to corr_nearest, the distance between the original correlation
matrix and the positive definite correlation matrix is larger, however,
it is much faster since it only computes eigenvalues once.
Parameters
----------
corr : ndarray, (k, k)
initial correlation matrix
threshold : float
clipping threshold for smallest eigenvalue, see Notes
Returns
-------
corr_new : ndarray, (optional)
corrected correlation matrix
Notes
-----
The smallest eigenvalue of the corrected correlation matrix is
approximately equal to the ``threshold``. In examples, the
smallest eigenvalue can be by a factor of 10 smaller than the threshold,
e.g. threshold 1e-8 can result in smallest eigenvalue in the range
between 1e-9 and 1e-8.
If the threshold=0, then the smallest eigenvalue of the correlation matrix
might be negative, but zero within a numerical error, for example in the
range of -1e-16.
Assumes input correlation matrix is symmetric. The diagonal elements of
returned correlation matrix is set to ones.
If the correlation matrix is already positive semi-definite given the
threshold, then the original correlation matrix is returned.
``cov_clipped`` is 40 or more times faster than ``cov_nearest`` in simple
example, but has a slightly larger approximation error.
See Also
--------
corr_nearest
cov_nearest
'''
x_new, clipped = clip_evals(corr, value=threshold)
if not clipped:
return corr
# cov2corr
x_std = np.sqrt(np.diag(x_new))
x_new = x_new / x_std / x_std[:, None]
return x_new
[docs]def cov_nearest(cov, method='clipped', threshold=1e-15, n_fact=100,
return_all=False):
"""
Find the nearest covariance matrix that is postive (semi-) definite
This leaves the diagonal, i.e. the variance, unchanged
Parameters
----------
cov : ndarray, (k,k)
initial covariance matrix
method : string
if "clipped", then the faster but less accurate ``corr_clipped`` is
used.if "nearest", then ``corr_nearest`` is used
threshold : float
clipping threshold for smallest eigen value, see Notes
n_fact : int or float
factor to determine the maximum number of iterations in
``corr_nearest``. See its doc string
return_all : bool
if False (default), then only the covariance matrix is returned.
If True, then correlation matrix and standard deviation are
additionally returned.
Returns
-------
cov_ : ndarray
corrected covariance matrix
corr_ : ndarray, (optional)
corrected correlation matrix
std_ : ndarray, (optional)
standard deviation
Notes
-----
This converts the covariance matrix to a correlation matrix. Then, finds
the nearest correlation matrix that is positive semidefinite and converts
it back to a covariance matrix using the initial standard deviation.
The smallest eigenvalue of the intermediate correlation matrix is
approximately equal to the ``threshold``.
If the threshold=0, then the smallest eigenvalue of the correlation matrix
might be negative, but zero within a numerical error, for example in the
range of -1e-16.
Assumes input covariance matrix is symmetric.
See Also
--------
corr_nearest
corr_clipped
"""
from statsmodels.stats.moment_helpers import cov2corr, corr2cov
cov_, std_ = cov2corr(cov, return_std=True)
if method == 'clipped':
corr_ = corr_clipped(cov_, threshold=threshold)
else: # method == 'nearest'
corr_ = corr_nearest(cov_, threshold=threshold, n_fact=n_fact)
cov_ = corr2cov(corr_, std_)
if return_all:
return cov_, corr_, std_
else:
return cov_
def _nmono_linesearch(obj, grad, x, d, obj_hist, M=10, sig1=0.1,
sig2=0.9, gam=1e-4, maxiter=100):
"""
Implements the non-monotone line search of Grippo et al. (1986),
as described in Birgin, Martinez and Raydan (2013).
Parameters
----------
obj : real-valued function
The objective function, to be minimized
grad : vector-valued function
The gradient of the objective function
x : array_like
The starting point for the line search
d : array_like
The search direction
obj_hist : array_like
Objective function history (must contain at least one value)
M : positive integer
Number of previous function points to consider (see references
for details).
sig1 : real
Tuning parameter, see references for details.
sig2 : real
Tuning parameter, see references for details.
gam : real
Tuning parameter, see references for details.
maxiter : positive integer
The maximum number of iterations; returns Nones if convergence
does not occur by this point
Returns
-------
alpha : real
The step value
x : Array_like
The function argument at the final step
obval : Real
The function value at the final step
g : Array_like
The gradient at the final step
Notes
-----
The basic idea is to take a big step in the direction of the
gradient, even if the function value is not decreased (but there
is a maximum allowed increase in terms of the recent history of
the iterates).
References
----------
Grippo L, Lampariello F, Lucidi S (1986). A Nonmonotone Line
Search Technique for Newton's Method. SIAM Journal on Numerical
Analysis, 23, 707-716.
E. Birgin, J.M. Martinez, and M. Raydan. Spectral projected
gradient methods: Review and perspectives. Journal of Statistical
Software (preprint).
"""
alpha = 1.
last_obval = obj(x)
obj_max = max(obj_hist[-M:])
for iter in range(maxiter):
obval = obj(x + alpha*d)
g = grad(x)
gtd = (g * d).sum()
if obval <= obj_max + gam*alpha*gtd:
return alpha, x + alpha*d, obval, g
a1 = -0.5*alpha**2*gtd / (obval - last_obval - alpha*gtd)
if (sig1 <= a1) and (a1 <= sig2*alpha):
alpha = a1
else:
alpha /= 2.
last_obval = obval
return None, None, None, None
def _spg_optim(func, grad, start, project, maxiter=1e4, M=10,
ctol=1e-3, maxiter_nmls=200, lam_min=1e-30,
lam_max=1e30, sig1=0.1, sig2=0.9, gam=1e-4):
"""
Implements the spectral projected gradient method for minimizing a
differentiable function on a convex domain.
Parameters
----------
func : real valued function
The objective function to be minimized.
grad : real array-valued function
The gradient of the objective function
start : array_like
The starting point
project : function
In-place projection of the argument to the domain
of func.
... See notes regarding additional arguments
Returns
-------
rslt : Bunch
rslt.params is the final iterate, other fields describe
convergence status.
Notes
-----
This can be an effective heuristic algorithm for problems where no
gauranteed algorithm for computing a global minimizer is known.
There are a number of tuning parameters, but these generally
should not be changed except for `maxiter` (positive integer) and
`ctol` (small positive real). See the Birgin et al reference for
more information about the tuning parameters.
Reference
---------
E. Birgin, J.M. Martinez, and M. Raydan. Spectral projected
gradient methods: Review and perspectives. Journal of Statistical
Software (preprint). Available at:
http://www.ime.usp.br/~egbirgin/publications/bmr5.pdf
"""
lam = min(10*lam_min, lam_max)
params = start.copy()
gval = grad(params)
obj_hist = [func(params), ]
for itr in range(int(maxiter)):
# Check convergence
df = params - gval
project(df)
df -= params
if np.max(np.abs(df)) < ctol:
return Bunch(**{"Converged": True, "params": params,
"objective_values": obj_hist,
"Message": "Converged successfully"})
# The line search direction
d = params - lam*gval
project(d)
d -= params
# Carry out the nonmonotone line search
alpha, params1, fval, gval1 = _nmono_linesearch(
func,
grad,
params,
d,
obj_hist,
M=M,
sig1=sig1,
sig2=sig2,
gam=gam,
maxiter=maxiter_nmls)
if alpha is None:
return Bunch(**{"Converged": False, "params": params,
"objective_values": obj_hist,
"Message": "Failed in nmono_linesearch"})
obj_hist.append(fval)
s = params1 - params
y = gval1 - gval
sy = (s*y).sum()
if sy <= 0:
lam = lam_max
else:
ss = (s*s).sum()
lam = max(lam_min, min(ss/sy, lam_max))
params = params1
gval = gval1
return Bunch(**{"Converged": False, "params": params,
"objective_values": obj_hist,
"Message": "spg_optim did not converge"})
def _project_correlation_factors(X):
"""
Project a matrix into the domain of matrices whose row-wise sums
of squares are less than or equal to 1.
The input matrix is modified in-place.
"""
nm = np.sqrt((X*X).sum(1))
ii = np.flatnonzero(nm > 1)
if len(ii) > 0:
X[ii, :] /= nm[ii][:, None]
[docs]class FactoredPSDMatrix:
"""
Representation of a positive semidefinite matrix in factored form.
The representation is constructed based on a vector `diag` and
rectangular matrix `root`, such that the PSD matrix represented by
the class instance is Diag + root * root', where Diag is the
square diagonal matrix with `diag` on its main diagonal.
Parameters
----------
diag : 1d array-like
See above
root : 2d array-like
See above
Notes
-----
The matrix is represented internally in the form Diag^{1/2}(I +
factor * scales * factor')Diag^{1/2}, where `Diag` and `scales`
are diagonal matrices, and `factor` is an orthogonal matrix.
"""
def __init__(self, diag, root):
self.diag = diag
self.root = root
root = root / np.sqrt(diag)[:, None]
u, s, vt = np.linalg.svd(root, 0)
self.factor = u
self.scales = s**2
[docs] def to_matrix(self):
"""
Returns the PSD matrix represented by this instance as a full
(square) matrix.
"""
return np.diag(self.diag) + np.dot(self.root, self.root.T)
[docs] def decorrelate(self, rhs):
"""
Decorrelate the columns of `rhs`.
Parameters
----------
rhs : array-like
A 2 dimensional array with the same number of rows as the
PSD matrix represented by the class instance.
Returns
-------
C^{-1/2} * rhs, where C is the covariance matrix represented
by this class instance.
Notes
-----
The returned matrix has the identity matrix as its row-wise
population covariance matrix.
This function exploits the factor structure for efficiency.
"""
# I + factor * qval * factor' is the inverse square root of
# the covariance matrix in the homogeneous case where diag =
# 1.
qval = -1 + 1 / np.sqrt(1 + self.scales)
# Decorrelate in the general case.
rhs = rhs / np.sqrt(self.diag)[:, None]
rhs1 = np.dot(self.factor.T, rhs)
rhs1 *= qval[:, None]
rhs1 = np.dot(self.factor, rhs1)
rhs += rhs1
return rhs
[docs] def solve(self, rhs):
"""
Solve a linear system of equations with factor-structured
coefficients.
Parameters
----------
rhs : array-like
A 2 dimensional array with the same number of rows as the
PSD matrix represented by the class instance.
Returns
-------
C^{-1} * rhs, where C is the covariance matrix represented
by this class instance.
Notes
-----
This function exploits the factor structure for efficiency.
"""
qval = -self.scales / (1 + self.scales)
dr = np.sqrt(self.diag)
rhs = rhs / dr[:, None]
mat = qval[:, None] * np.dot(self.factor.T, rhs)
rhs = rhs + np.dot(self.factor, mat)
return rhs / dr[:, None]
[docs] def logdet(self):
"""
Returns the logarithm of the determinant of a
factor-structured matrix.
"""
logdet = np.sum(np.log(self.diag))
logdet += np.sum(np.log(self.scales))
logdet += np.sum(np.log(1 + 1 / self.scales))
return logdet
[docs]def corr_nearest_factor(corr, rank, ctol=1e-6, lam_min=1e-30,
lam_max=1e30, maxiter=1000):
"""
Find the nearest correlation matrix with factor structure to a
given square matrix.
Parameters
----------
corr : square array
The target matrix (to which the nearest correlation matrix is
sought). Must be square, but need not be positive
semidefinite.
rank : positive integer
The rank of the factor structure of the solution, i.e., the
number of linearly independent columns of X.
ctol : positive real
Convergence criterion.
lam_min : float
Tuning parameter for spectral projected gradient optimization
(smallest allowed step in the search direction).
lam_max : float
Tuning parameter for spectral projected gradient optimization
(largest allowed step in the search direction).
maxiter : integer
Maximum number of iterations in spectral projected gradient
optimization.
Returns
-------
rslt : Bunch
rslt.corr is a FactoredPSDMatrix defining the estimated
correlation structure. Other fields of `rslt` contain
returned values from spg_optim.
Notes
-----
A correlation matrix has factor structure if it can be written in
the form I + XX' - diag(XX'), where X is n x k with linearly
independent columns, and with each row having sum of squares at
most equal to 1. The approximation is made in terms of the
Frobenius norm.
This routine is useful when one has an approximate correlation
matrix that is not positive semidefinite, and there is need to
estimate the inverse, square root, or inverse square root of the
population correlation matrix. The factor structure allows these
tasks to be done without constructing any n x n matrices.
This is a non-convex problem with no known gauranteed globally
convergent algorithm for computing the solution. Borsdof, Higham
and Raydan (2010) compared several methods for this problem and
found the spectral projected gradient (SPG) method (used here) to
perform best.
The input matrix `corr` can be a dense numpy array or any scipy
sparse matrix. The latter is useful if the input matrix is
obtained by thresholding a very large sample correlation matrix.
If `corr` is sparse, the calculations are optimized to save
memory, so no working matrix with more than 10^6 elements is
constructed.
References
----------
.. [*] R Borsdof, N Higham, M Raydan (2010). Computing a nearest
correlation matrix with factor structure. SIAM J Matrix Anal Appl,
31:5, 2603-2622.
http://eprints.ma.man.ac.uk/1523/01/covered/MIMS_ep2009_87.pdf
Examples
--------
Hard thresholding a correlation matrix may result in a matrix that
is not positive semidefinite. We can approximate a hard
thresholded correlation matrix with a PSD matrix as follows, where
`corr` is the input correlation matrix.
>>> import numpy as np
>>> from statsmodels.stats.correlation_tools import corr_nearest_factor
>>> np.random.seed(1234)
>>> b = 1.5 - np.random.rand(10, 1)
>>> x = np.random.randn(100,1).dot(b.T) + np.random.randn(100,10)
>>> corr = np.corrcoef(x.T)
>>> corr = corr * (np.abs(corr) >= 0.3)
>>> rslt = corr_nearest_factor(corr, 3)
"""
p, _ = corr.shape
# Starting values (following the PCA method in BHR).
u, s, vt = svds(corr, rank)
X = u * np.sqrt(s)
nm = np.sqrt((X**2).sum(1))
ii = np.flatnonzero(nm > 1e-5)
X[ii, :] /= nm[ii][:, None]
# Zero the diagonal
corr1 = corr.copy()
if type(corr1) == np.ndarray:
np.fill_diagonal(corr1, 0)
elif sparse.issparse(corr1):
corr1.setdiag(np.zeros(corr1.shape[0]))
corr1.eliminate_zeros()
corr1.sort_indices()
else:
raise ValueError("Matrix type not supported")
# The gradient, from lemma 4.1 of BHR.
def grad(X):
gr = np.dot(X, np.dot(X.T, X))
if type(corr1) == np.ndarray:
gr -= np.dot(corr1, X)
else:
gr -= corr1.dot(X)
gr -= (X*X).sum(1)[:, None] * X
return 4*gr
# The objective function (sum of squared deviations between fitted
# and observed arrays).
def func(X):
if type(corr1) == np.ndarray:
M = np.dot(X, X.T)
np.fill_diagonal(M, 0)
M -= corr1
fval = (M*M).sum()
return fval
else:
fval = 0.
# Control the size of intermediates
max_ws = 1e6
bs = int(max_ws / X.shape[0])
ir = 0
while ir < X.shape[0]:
ir2 = min(ir+bs, X.shape[0])
u = np.dot(X[ir:ir2, :], X.T)
ii = np.arange(u.shape[0])
u[ii, ir+ii] = 0
u -= np.asarray(corr1[ir:ir2, :].todense())
fval += (u*u).sum()
ir += bs
return fval
rslt = _spg_optim(func, grad, X, _project_correlation_factors, ctol=ctol,
lam_min=lam_min, lam_max=lam_max, maxiter=maxiter)
root = rslt.params
diag = 1 - (root**2).sum(1)
soln = FactoredPSDMatrix(diag, root)
rslt.corr = soln
del rslt.params
return rslt
[docs]def cov_nearest_factor_homog(cov, rank):
"""
Approximate an arbitrary square matrix with a factor-structured
matrix of the form k*I + XX'.
Parameters
----------
cov : array-like
The input array, must be square but need not be positive
semidefinite
rank : positive integer
The rank of the fitted factor structure
Returns
-------
A FactoredPSDMatrix instance containing the fitted matrix
Notes
-----
This routine is useful if one has an estimated covariance matrix
that is not SPD, and the ultimate goal is to estimate the inverse,
square root, or inverse square root of the true covariance
matrix. The factor structure allows these tasks to be performed
without constructing any n x n matrices.
The calculations use the fact that if k is known, then X can be
determined from the eigen-decomposition of cov - k*I, which can
in turn be easily obtained form the eigen-decomposition of `cov`.
Thus the problem can be reduced to a 1-dimensional search for k
that does not require repeated eigen-decompositions.
If the input matrix is sparse, then cov - k*I is also sparse, so
the eigen-decomposition can be done effciciently using sparse
routines.
The one-dimensional search for the optimal value of k is not
convex, so a local minimum could be obtained.
Examples
--------
Hard thresholding a covariance matrix may result in a matrix that
is not positive semidefinite. We can approximate a hard
thresholded covariance matrix with a PSD matrix as follows:
>>> import numpy as np
>>> np.random.seed(1234)
>>> b = 1.5 - np.random.rand(10, 1)
>>> x = np.random.randn(100,1).dot(b.T) + np.random.randn(100,10)
>>> cov = np.cov(x)
>>> cov = cov * (np.abs(cov) >= 0.3)
>>> rslt = cov_nearest_factor_homog(cov, 3)
"""
m, n = cov.shape
Q, Lambda, _ = svds(cov, rank)
if sparse.issparse(cov):
QSQ = np.dot(Q.T, cov.dot(Q))
ts = cov.diagonal().sum()
tss = cov.dot(cov).diagonal().sum()
else:
QSQ = np.dot(Q.T, np.dot(cov, Q))
ts = np.trace(cov)
tss = np.trace(np.dot(cov, cov))
def fun(k):
Lambda_t = Lambda - k
v = tss + m*(k**2) + np.sum(Lambda_t**2) - 2*k*ts
v += 2*k*np.sum(Lambda_t) - 2*np.sum(np.diag(QSQ) * Lambda_t)
return v
# Get the optimal decomposition
k_opt = fminbound(fun, 0, 1e5)
Lambda_opt = Lambda - k_opt
fac_opt = Q * np.sqrt(Lambda_opt)
diag = k_opt * np.ones(m, dtype=np.float64) # - (fac_opt**2).sum(1)
return FactoredPSDMatrix(diag, fac_opt)
[docs]def corr_thresholded(data, minabs=None, max_elt=1e7):
r"""
Construct a sparse matrix containing the thresholded row-wise
correlation matrix from a data array.
Parameters
----------
data : array_like
The data from which the row-wise thresholded correlation
matrix is to be computed.
minabs : non-negative real
The threshold value; correlation coefficients smaller in
magnitude than minabs are set to zero. If None, defaults
to 1 / sqrt(n), see Notes for more information.
Returns
-------
cormat : sparse.coo_matrix
The thresholded correlation matrix, in COO format.
Notes
-----
This is an alternative to C = np.corrcoef(data); C \*= (np.abs(C)
>= absmin), suitable for very tall data matrices.
If the data are jointly Gaussian, the marginal sampling
distributions of the elements of the sample correlation matrix are
approximately Gaussian with standard deviation 1 / sqrt(n). The
default value of ``minabs`` is thus equal to 1 standard error, which
will set to zero approximately 68% of the estimated correlation
coefficients for which the population value is zero.
No intermediate matrix with more than ``max_elt`` values will be
constructed. However memory use could still be high if a large
number of correlation values exceed `minabs` in magnitude.
The thresholded matrix is returned in COO format, which can easily
be converted to other sparse formats.
Examples
--------
Here X is a tall data matrix (e.g. with 100,000 rows and 50
columns). The row-wise correlation matrix of X is calculated
and stored in sparse form, with all entries smaller than 0.3
treated as 0.
>>> import numpy as np
>>> np.random.seed(1234)
>>> b = 1.5 - np.random.rand(10, 1)
>>> x = np.random.randn(100,1).dot(b.T) + np.random.randn(100,10)
>>> cmat = corr_thresholded(x, 0.3)
"""
nrow, ncol = data.shape
if minabs is None:
minabs = 1. / float(ncol)
# Row-standardize the data
data = data.copy()
data -= data.mean(1)[:, None]
sd = data.std(1, ddof=1)
ii = np.flatnonzero(sd > 1e-5)
data[ii, :] /= sd[ii][:, None]
ii = np.flatnonzero(sd <= 1e-5)
data[ii, :] = 0
# Number of rows to process in one pass
bs = int(np.floor(max_elt / nrow))
ipos_all, jpos_all, cor_values = [], [], []
ir = 0
while ir < nrow:
ir2 = min(data.shape[0], ir + bs)
cm = np.dot(data[ir:ir2, :], data.T) / (ncol - 1)
cma = np.abs(cm)
ipos, jpos = np.nonzero(cma >= minabs)
ipos_all.append(ipos + ir)
jpos_all.append(jpos)
cor_values.append(cm[ipos, jpos])
ir += bs
ipos = np.concatenate(ipos_all)
jpos = np.concatenate(jpos_all)
cor_values = np.concatenate(cor_values)
cmat = sparse.coo_matrix((cor_values, (ipos, jpos)), (nrow, nrow))
return cmat
class MultivariateKernel(object):
"""
Base class for multivariate kernels.
An instance of MultivariateKernel implements a `call` method having
signature `call(x, loc)`, returning the kernel weights comparing `x`
(a 1d ndarray) to each row of `loc` (a 2d ndarray).
"""
def call(self, x, loc):
raise NotImplementedError
def set_bandwidth(self, bw):
"""
Set the bandwidth to the given vector.
Parameters
----------
bw : array-like
A vector of non-negative bandwidth values.
"""
self.bw = bw
self._setup()
def _setup(self):
# Precompute the squared bandwidth values.
self.bwk = np.prod(self.bw)
self.bw2 = self.bw * self.bw
def set_default_bw(self, loc, bwm=None):
"""
Set default bandwiths based on domain values.
Parameters
----------
loc : array-like
Values from the domain to which the kernel will
be applied.
bwm : scalar, optional
A non-negative scalar that is used to multiply
the default bandwidth.
"""
sd = loc.std(0)
q25, q75 = np.percentile(loc, [25, 75], axis=0)
iqr = (q75 - q25) / 1.349
bw = np.where(iqr < sd, iqr, sd)
bw *= 0.9 / loc.shape[0] ** 0.2
if bwm is not None:
bw *= bwm
# The final bandwidths
self.bw = np.asarray(bw, dtype=np.float64)
self._setup()
class GaussianMultivariateKernel(MultivariateKernel):
"""
The Gaussian (squared exponential) multivariate kernel.
"""
def call(self, x, loc):
return np.exp(-(x - loc)**2 / (2 * self.bw2)).sum(1) / self.bwk
[docs]def kernel_covariance(exog, loc, groups, kernel=None, bw=None):
"""
Use kernel averaging to estimate a multivariate covariance function.
The goal is to estimate a covariance function C(x, y) =
cov(Z(x), Z(y)) where x, y are vectors in R^p (e.g. representing
locations in time or space), and Z(.) represents a multivariate
process on R^p.
The data used for estimation can be observed at arbitrary values of the
position vector, and there can be multiple independent observations
from the process.
Parameters
----------
exog : array-like
The rows of exog are realizations of the process obtained at
specified points.
loc : array-like
The rows of loc are the locations (e.g. in space or time) at
which the rows of exog are observed.
groups : array-like
The values of groups are labels for distinct independent copies
of the process.
kernel : MultivariateKernel instance, optional
An instance of MultivariateKernel, defaults to
GaussianMultivariateKernel.
bw : array-like or scalar
A bandwidth vector, or bandwith multiplier. If a 1d array, it
contains kernel bandwidths for each component of the process, and
must have length equal to the number of columns of exog. If a scalar,
bw is a bandwidth multiplier used to adjust the default bandwidth; if
None, a default bandwidth is used.
Returns
-------
A real-valued function C(x, y) that returns an estimate of the covariance
between values of the process located at x and y.
References
----------
.. [1] Genton M, W Kleiber (2015). Cross covariance functions for
multivariate geostatics. Statistical Science 30(2).
https://arxiv.org/pdf/1507.08017.pdf
"""
exog = np.asarray(exog)
loc = np.asarray(loc)
groups = np.asarray(groups)
if loc.ndim == 1:
loc = loc[:, None]
v = [exog.shape[0], loc.shape[0], len(groups)]
if min(v) != max(v):
msg = "exog, loc, and groups must have the same number of rows"
raise ValueError(msg)
# Map from group labels to the row indices in each group.
ix = {}
for i, g in enumerate(groups):
if g not in ix:
ix[g] = []
ix[g].append(i)
for g in ix.keys():
ix[g] = np.sort(ix[g])
if kernel is None:
kernel = GaussianMultivariateKernel()
if bw is None:
kernel.set_default_bw(loc)
elif np.isscalar(bw):
kernel.set_default_bw(loc, bwm=bw)
else:
kernel.set_bandwidth(bw)
def cov(x, y):
kx = kernel.call(x, loc)
ky = kernel.call(y, loc)
cm, cw = 0., 0.
for g, ii in ix.items():
m = len(ii)
j1, j2 = np.indices((m, m))
j1 = ii[j1.flat]
j2 = ii[j2.flat]
w = kx[j1] * ky[j2]
# TODO: some other form of broadcasting may be faster than
# einsum here
cm += np.einsum("ij,ik,i->jk", exog[j1, :], exog[j2, :], w)
cw += w.sum()
if cw < 1e-10:
msg = ("Effective sample size is 0. The bandwidth may be too " +
"small, or you are outside the range of your data.")
warnings.warn(msg)
return np.nan * np.ones_like(cm)
return cm / cw
return cov


|
Search the web using Google! |
||
|
Special Searches
Stanford Search Linux Search |
Help!
About Google! Company Info Google! Logos |
Get Google! Archive |


Thousands turn out for JLP conference
by BALFORD HENRYTHOUSANDS of Jamaica Labour Party (JLP) supporters who filled the National Arena yesterday for the party's 76th annual conference may have left disappointed that there was no indication of an early general election.
The huge turnout, high spirits and general camaraderie suggested that there might have been some special announcement intimating the likelihood of an early election. However, party leaders skipped around the issue, urging Labourites to prepare in the meantime.
Prime Minister Andrew Holness's address seemed intent on energising the crowd for something special, but in a wide-ranging 60-minute-long speech, while he was able to hold the attention of the crowd by addressing the crucial issues, he gave no indication of an early election.
When Holness spoke he admitted that his Government was not without its challenges, including issues relating to corruption allegations.
“I couldn't leave the stage without saying to you that corruption is an issue that occupies the front of my mind. I couldn't leave here today and not say to you that we still need to tighten up on the anti-corruption systems and framework that exists,” he said.
“It is not for want of putting in the legislative and institutional processes. They are there. But you have to bear in mind that we are also very new on the scale of dealing with anti-corruption issues. So there is a learning curve that we are going through,” he stated.
He added that what is important is that the Government supports the development of the institutions which can accelerate very quickly on that learning curve, and that the Government does not intervene or interfere — a message which he said he was also sending to the Opposition People's National Party.
“The Labour Party is ready to take on a second term to work in your service. And very soon we will have everything in place. And when everything is in place, you will see me reach for this bell,” he concluded, as he held on to a bell, the symbol of the governing party.
— Balford Henry


--- layout: post date: 2009-07-24 time: "09:00:00" authors: ["Greg Wilson"] title: Day 10 Done - and With It, Week 2 tags: ["University of Alberta", "University of Toronto"] ---
XML in the morning, regular expressions in the afternoon—it's been a long week, but a productive one (I hope). We're going to shuffle some of the material around so that we can do binary data processing, web client and server programming, and GUI programming next week. The highlight, of course, will be the guest speakers on Wednesday afternoon. I hope the students have a restful weekend; I'm looking forward to the last lap.


Search any artist above and click the album image to stream their tracks! Some tracks are only available with a SoundCloud pro membership, for more information visit https://soundcloud.com/pro


Problem Solving
How I stopped worrying and learnt to love Google.
Getting Blocked on a Simple Problem
The fun thing about stepping outside is that the world isn't nicely put together how you like it. Nor is it optimised for keeping you safe. Coding can be like that too.
The issue was that when you typed in a colour and hit 'submit' the colour would change but only for a split second. I thought for a long time that the issue was within the javascript (JS) code I had written. JS being the part of web development where you actually do 'programming' (whereas the other main parts, html & css are like making a colouring in book and then colouring it in respectively). I spent a lot of time Googling and watching videos on YouTube but my issue didn't seem to be anywhere.
After not getting any further with research I reached out to my peers to see if they had encountered a similar issue. While no one had one of my peers asked questions which made me explain the context further. This felt similar to a much more engaging than normal rubber ducky method. Which is where you normally talk to a 'rubber duck' in the same way you would explain an issue to a colleague providing the full context so they can help you.
While talking with my peer and trying to troubleshoot further I made sure to track everything that was changing step by step. It became apparent that the actual page was refreshing when the submit button was being pressed. This meant that all of the input information was being reset. Finding this out by going through the program step by step gave me a specific area to Google. As it turns out there is a specific name you can give buttons to prevent this happening. Once I found this out the issue was resolved immediately.
Solved a Problem in an Elegant Way
One problem we came across was adding together a series of words. We were specifically supposed to use a specific command called concat. However, I was able to get the same functionality without using a pre-defined command in the javascript language. This might seem clunky as it is similar to only using 'basic' english when a more precise word could describe your state more specifically. e.g. Hungry is a basic word but peckish implies you're not too hungry but could snack for a little bit. My solution was like using the word hungry.
I like this however, as it shows that you can actually do anything you need to in programming using only a few fundamental concepts.
Reflection on Problem Solving
One of the primary tools a software developer has available to them to problem solve is a debugger. And web developers have an additional tool called 'dev tools'. While these tools are powerful debuggers / dev tools won't necessarily say what's happening in the same language you or me would use to describe an issue. So it will be important to recognise what they're actually saying in their own language. One thing that going through problem solving this sprint has re-iterated is to pay very close attention to what happens at each step in the code. If I had known more about exactly dev tools was saying I would've been able to save a lot of time searching things which weren't the issue.
During this particular sprint I didn't really need to go 'up the chain' in problem solving methods for the EDA content. I found that by understanding what the tests were wanting as an outcome I was usually able to provide a functional solution within ~10 to 20 minutes. If something wasn't working as intended using console.log() (which displays whatever you've put into the brackets is at the point in the code where console.log is written) helped me see where something wasn't working. Referring back to previous notes was also useful as I had written them in a way that I understood. Finally if neither of these worked then Google / Stack Overflow / MDN / W3Schools were all fantastic resources. As at this stage it's making sure I understand what the functions within Javascript actually do which is the sticking point. Rather than how to combine them in complex ways (which will come later).
Some Problem Solving Techniques
I've found all of the following methods to be useful in my problem solving:
- Pseudocode
- Trying something
- Rubber Ducky Method
- Reading Error Messages
- Console.logging
- Googling
- Asking your peers for help
- Asking coaches for help
- Improving you process with Reflection
This is useful when the code is slightly too complicated to hold in my head at once. I essentially ask myself 'what are we trying to do here' and outline what each step of the code is trying to do and how it will lead into the next. I've used it multiple times and is particularly helpful when figuring out when to pass certain data into specific methods.
This is my bread and butter. I'll have an idea about what I'll want to do and then put it into code. Does it get the right output or am I getting an unexpected behaviour. It's also a great way to test out different methods or programming ideas in isolation to make sure I actually understand how it works before implementing it in the main body of the application.
There's a great knowledge check which is trying to explain something to someone else. The problem is explaining something to someone else requires their time as well. By explaining it to an imaginary person or object you can get the benefit of breaking down your understanding of the code - while only using your own time.
Compilers have come a long way. Often times the error message will be able to tell you exactly what's happening provided you can correctly interpret what it's saying. The earlier example of the page refreshing when pressing a button is a classic example of this. The console said 'navigated to xyz' where xyz is the html file location. This occurs when the page loads. If I had noticed this I would've known the page was refreshing immediately.
While debugging tools can give you a similar effect, setting breakpoints and stepping through the program can take a while. Using console.log enables you to quickly see what a value is at any given point in the program's execution. I've used this often to see for example why a counter isn't increasing when I expected it to. Or what the value of an element actually is versus what I expected it to be.
The search engine is what has enabled us as a species to move into the 'information age'. Provided you are proficient at using a search engine almost any answer to your question can be found. This is particularly true of programming where most questions a beginner can ask already have been. Typing in exact error messages, or how does 'x method work' will be able to return what you need.
This is particularly useful if none of the above has worked. Especially as your peers will likely be working on a similar problem and have an idea of the context you're working with. They also bring their own perspective and assumptions which will be different to my own which is useful if I'm stuck. As their mental framework of an issue might be more accurate than mine and be able to cut to the heart of the matter. I did this will trying figure out the button page refresh issue. And although my peers didn't know the answer they still asked good questions which helped me think in a different way.
Sometimes however, your peers are still equally stuck. And asking someone with more experience can help. At this stage I haven't had to use this tool as I've been comfortable enough with the concepts covered to resolve most issues on my own. However, in other contexts asking a manager or someone more senior in the organisation was been great. Especially as they'll likely understand the content as it fits into a wider context. And can easily see if you're going down a path which doesn't actually lead to the problem being resolved.
There's a model I really like called WDEP. What do you want? (W). What are you doing? (D). Evaluate is what you're doing working? (E). Plan an alternative approach if what you're doing isn't working (P). This is ultimately a process of continuous reflection and improvement and is something I hold very important as I go through life.


HURRICANE STREETS A film review by Steve Rhodes Copyright 1998 Steve Rhodes
RATING (0 TO ****): **
HURRICANE STREETS tells the story of an amoral group of young New York City teenagers, who live lives of varying degrees of criminality. Some draw the line at shoplifting, some at grand theft, others at guns, and others at much worse crimes.
Written and directed by the accomplished actor Morgan Freeman, the film won numerous awards at last year's Sundance Film Festival. With the tone and pacing of a slow, coming-of-age story set in the Midwest, the movie, set instead in an inner city, apparently wants the audience to be sympathetic to the kids. The multiracial cast looks like a carefully chosen cross section of society. And although the kids live in relatively poor environments, they act more like middle-class teens.
Riding little bikes like the ones from ET, the kids go from the crime scenes to their club house where they keep their loot, to the elementary school grounds where whey take orders, including sizes, for yet-to-be purloined goods. Except that they idle away their days with various misdemeanors, the kids act like older versions of Spanky and Our Gang.
Marcus, played with despair by Brendan Sexton III, is the leader of the gang. Marcus is constantly challenged by fellow member Chip (David Roland Frank), who thinks he is invulnerable -- "I'll never get caught, man." Chip prides himself on being the local rebel. He gets a tattoo of the finger on his arm, dies his hair a strange color, and gets a nose ring. He also has friends who want to push the gang way beyond their petty larceny.
Marcus meets a sweet girl of 14 named Melena, played sweetly by Isidra Vega, whom he invites to his fifteenth birthday party. Her abusive father -- you can guess that he will be bad because he wears a prominent gold cross -- keeps Melena on a tight leash and will not let her go to the party or anywhere at night.
The script tries to pull at your heart strings at every turn. We find that Marcus loves his mother, but she's in prison. The exact nature of her crime is another reason for his melancholy.
The kids view stealing goods from shoes to candy bars with the same casualness that others might look upon collecting seashells. The story provides ample hints that its really not their fault. They've been brought up to act this way and don't know any better. What, for example, does one of the adults give Marcus for his birthday? A can of spray paint so he can deface the local buildings.
When the cops arrest Marcus for taking orders for stolen goods from ten-year-olds, he doesn't understand why the police are bothering him. "I might have sold a thing or two -- it's not like killing people or selling drugs," he argues with the officers.
After meandering for over an hour in a landscape of hopelessness, out of the blue the show takes an unrealistic but dramatic twist. The abrupt ending is equally surprising. People left the theater at my screening kind of numb and disinterested. One hopes that in the future Freeman will stick to acting, where his talent has few equals.
HURRICANE STREETS runs just 1:28. It is rated R for violence and profanity and would be fine for older teenagers.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Our website has a variety of different accomodations available for every type of user. Users do not need to worry about the price either as our platform has the lowest average prices for accomodations as compared to other platforms! Note: you can only register as an applicant to use the system. If you want to access the system as a landlord, please contact us here.
Find Out MoreThere are many thing you can do in our website, such as:
For more information about our website or to send feedback to us, please contact us at:


Stories
Ricky Bluthenthal: Why do I give to UC Santa Cruz?
 Being there helped me figure out how the world worked. You might even say it launched me.
I was very ambitious as an undergraduate—ready to go, anxious to make my mark on the world. But UC Santa Cruz provided more than just the inspiration; it also gave me the means to get where I wanted to go and helped me figure out how to have the impact I wanted.
Now, with the map I started making at UC Santa Cruz, I’ve navigated my way to a life of helping some of the people in our community who need it the most.
This is why I have always given to the university—because of what it did for me.
UC Santa Cruz gave me the opportunity to become involved in its vibrant student life. As a student leader I was involved in the creation of the campus-wide student government, the anti-apartheid divestment movement, and the adoption of an ethnic studies breadth requirement (or general education requirement).
Having that kind of impact is empowering—and the campus also gave me a chance to develop close relationships with faculty who had a strong and positive influence on me.
Those relationships inspired me, but they also had realworld implications. I studied with a visiting scholar, Roger Wilkins, and went on to work for him later on at a think tank in Washington, D.C.
At a young age, I figured out that I wanted to help disadvantaged groups. UC Santa Cruz showed me I could do that by being an engaged, thoughtful researcher—and that is what I’ve been doing ever since.
As a graduate student I helped start and run a needle exchange program in Oakland, and since then I have been conducting research on strategies to prevent the spread of HIV and HCV among vulnerable groups. I have conducted research on a wide range of public health issues that are associated with race and class disparities in health.
This kind of work arises directly from the social consciousness, the practical skills and connections I nurtured at UC Santa Cruz. In the years since I graduated, the percentage of the state’s contribution to the overall UC budget has decreased dramatically. The campus—and its excellent programs—need our support more than ever.
College is such an important time in your life, and if it goes well there are impressive dividends. It went well for me, and I’m reaping those dividends even now, and so is my wife, Nancy Berglass (Merrill ‘85, community studies), also a proud graduate of UC Santa Cruz.
“We can see how important it is to make sure the opportunities we received as students are available for generations to come.”
We can see how important it is to make sure the opportunities we received as students are available for generations to come.
As an alumnus who serves on the Foundation Board of Trustees, I would like to share with you these stories of support and commitment:
- The intellectual property lawyer who is giving back to UC Santa Cruz because of the interdisciplinary problem-solving skills it gave him.'
- The hard-working graduate student who is using her funding to share a piece of history that would otherwise be lost.
- The faculty member who is keeping the memory of his wife alive while helping underprivileged women make their way in STEM careers.
- And the continuing legacy of our founding chancellor, Dean McHenry, whose bequest gifts support the campus he loved so well.
RICKY BLUTHENTHAL (MERRILL ‘86, HISTORY AND SOCIOLOGY)
Professor, Department of Preventive Medicine, Institute for Prevention Research, Keck School of Medicine University of Southern California


We are a group of IT students and we developed this site to promote awareness towards substance abuse and help prevent it. We are after the wellness and safety of many people around this world. We just want to emphasize the bad effects of the drugs that is being used by many and also alcoholic drinks. We do not intend to offend other people rather help and save them.
CALPITO, Maureen Nicole
ESPIRITU, Christopher Edrian
HIRAI, Erika Mae
MACARIO, Maricris
RABOT, Melchizedek
GROUP7
1:00-2:30 MTH


@(currentPage: List[Teachers]) @import helper._ @localStylesheets = { } @localScripts = { } @main(scripts = localScripts, stylesheets = localStylesheets) {


Programming languages: Python, SQL.
Data Analysis: Dask, Datetime, NLTK, Numpy, Pandas Pyreadstat, SpaCy.Data Visualization: Bokeh, Matplotlib, Plotly, Seaborn, Tableau.
Database Management: SQL, SQLite.
Machine Learning: Keras, PyTorch, Scikit-Learn, TensorFlow.
Shell Programming: Command Line Interface.
Version Control: Git, GitHub.
Web Scraping: Beautiful Soup, Requests.
Cloud: AWS.
Other: ArcGIS, Excel, SAS, SPSS.


Basic Examples
To complement The Beginners Guide to Blitz Basic. Below are many examples of the
commands that you have been learning, load them into Blitz, play around with them
until you are comfortable what each line of code means.
Most of all enjoy!
Click on the title of the demo you wish to load below


Team and repository tags¶
networking-ovn - OpenStack Neutron integration with OVN¶
OVN provides virtual networking for Open vSwitch and is a component of the Open vSwitch project. This project provides integration between OpenStack Neutron and OVN.
- Free software: Apache license
- Source: http://git.openstack.org/cgit/openstack/networking-ovn
- Bugs: http://bugs.launchpad.net/networking-ovn
- Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
- IRC: #openstack-neutron-ovn on Freenode.
- Docs: http://docs.openstack.org/developer/networking-ovn/
The original OVN project announcement can be found here:
The OVN architecture is described here:
Here are two tutorials that help with learning different aspects of OVN:
- http://blog.spinhirne.com/p/blog-series.html#introToOVN
- http://docs.openvswitch.org/en/latest/tutorials/ovn-basics/
OVN DB schemas and other man pages:
- http://openvswitch.org/support/dist-docs/ovn-nb.5.html
- http://openvswitch.org/support/dist-docs/ovn-sb.5.html
- http://openvswitch.org/support/dist-docs/ovn-nbctl.8.html
- http://openvswitch.org/support/dist-docs/ovn-sbctl.8.html
- http://openvswitch.org/support/dist-docs/ovn-northd.8.html
- http://openvswitch.org/support/dist-docs/ovn-controller.8.html
- http://openvswitch.org/support/dist-docs/ovn-controller-vtep.8.html
The openvswitch web page includes a list of presentations, some of which are about OVN:
- OVN talk at OpenStack Summit in Barcelona, Fall 2016
OVN talk at OpenStack Summit in Austin, Spring 2016 * https://www.youtube.com/watch?v=okralc7LrZo
OVN Project Update at the OpenStack Summit in Tokyo, Fall 2015 * http://openvswitch.org/support/slides/OVN_Tokyo.pdf * https://www.youtube.com/watch?v=3IrG2xghJjs
OVN at OpenStack Summit in Vancouver, Sping 2015 * http://openvswitch.org/support/slides/OVN-Vancouver.pdf * https://www.youtube.com/watch?v=kEzXTq2fPDg
OVS Conference 2015 * https://www.youtube.com/watch?v=JLGZOYi_Cqc
These blog resources may also help with testing and understanding OVN:
- http://networkop.co.uk/blog/2016/11/27/ovn-part1/
- http://networkop.co.uk/blog/2016/12/10/ovn-part2/
- https://blog.russellbryant.net/2016/12/19/comparing-openstack-neutron-ml2ovs-and-ovn-control-plane/
- https://blog.russellbryant.net/2016/11/11/ovn-logical-flows-and-ovn-trace/
- https://blog.russellbryant.net/2016/09/29/ovs-2-6-and-the-first-release-of-ovn/
- http://galsagie.github.io/2015/11/23/ovn-l3-deepdive/
- http://blog.russellbryant.net/2015/10/22/openstack-security-groups-using-ovn-acls/
- http://galsagie.github.io/sdn/openstack/ovs/2015/05/30/ovn-deep-dive/
- http://blog.russellbryant.net/2015/05/14/an-ez-bake-ovn-for-openstack/
- http://galsagie.github.io/sdn/openstack/ovs/2015/04/26/ovn-containers/
- http://blog.russellbryant.net/2015/04/21/ovn-and-openstack-status-2015-04-21/
- http://blog.russellbryant.net/2015/04/08/ovn-and-openstack-integration-development-update/


13 young women from Argentina, Bolivia, Brazil, Germany, Colombia and Peru came together in São Paulo in November 2018 and develop digital games.
Who are we?Game Artist
Game Designer
Game Artist
Software Developer
Game Designer
Software Developer
Game Artist
Software Developer
Game Artist
Game Designer
Software Developer
Software Developer
Game Designer


What Does a Game Networking Library Need?
Here is the protocol stack I would build for a networked
game library, in order to serve a variety of action, MMO
and turn-based games in a variety of settings. The goal
would be to support different kinds of networked entity
implementations without necessarily imposing policy. The
closest to policy it would probably come would be the
entity state description, which by necessity needs to use
some form of meta-data description, which typically needs
to be statically defined. Possible options include:
- C++ type templates
- C-style format strings
- SunRPC, COM and CORBA style code generation
Persistency of objects can use some functions of this
protocol stack (such as marshalling and entity support),
but is not really a networking function (it's a database
function).
The numbers indicate what layer a specific functionality
group lives at. Thus, the lobbying, peer, server and client
groups all live at layer 4 within the system, on top of the
RPC and State sync layers.
Each line item needs a specific piece of support; some of
the line items are there to support items in layers above.
For example, message sequence numbers and acks must be
available to the messaging layer, so that it knows whether
to re-send queued reliable messages. As another example,
pretty much all layers will get data from the clock
estimator, telling them when the given message/event was
sent and received.
Other things to note:
- User identity lives in Lobbying and Server, but actually
needs to reach all the way down to packet framing, for
authentication purposes.
- Some of these concepts may eventually be removed from the
layer as such, and just represented as arguments. For
example, user identity could be represented in a separate
persistency database, and just passed in (together with a
key) as arguments.
| Layer | Group | Feature | Etwork Support |
| 4. | Lobbying | Game name | |
| Game type | |
| User identity | |
| User groups | |
| Permissions | |
| Chat | |
| NAT traversal | |
| Peer | Peer group management | |
| Server election | |
| Lobby connection | |
| Peer connection | |
| Server | Packet forwarding | |
| Data validation | |
| Lobby listing | |
| Object lifetime | |
| User <-> Client mapping | |
| User identity | |
| Server announcement | |
| Client connection | |
| Client validation | |
| Client | Shadow object lifetime | |
| Focus object messaging | |
| Server discovery | |
| Server connection | |
| Lobby connection | |
| 3. | RPC | Application target | |
| Function | |
| Arguments | |
| State sync | Entity id | |
| State description / Marhshalling / Meta-data | |
| Sync rules / Periodic re-send / Dirty re-send / Reliable update | |
| Entity publishing / Priority sort / Bandwidth management | |
| 2. | Messages | Delivery guarantee / Per channel | |
| Ordering guarantee / Per channel | |
| Application targets | |
| Payload / May include source as protocol data | |
| 1. | Packet framing | Message bundling | |
| RTT estimation | |
| Clock sync | |
| Authentication | |
| Sequence number | |
| Sequence number ack | |
| String table | |
| Channel management | |
| Keepalive transmission | |
| Encryption | |
| 0. | Network packet I/O | Host addressing | 0.1 |
| Host name resolution | 0.1 |
| Connection | 0.1 |
| Timeout | 0.3 |
| Binary serialization | 0.3 |
| Queuing | |
| Delivery notification | 0.2 |


info
If Faces Were Places - London
£80+ p&p. Purchase print
...
6th edition, dark blue/grey & yellow/amber
Medium: 2 colour screen-print
Paper: 300gsm Munken Pure
Edition of 40
Dimensions: 72x102cm
Each print is hand signed and numbered by the artist
£80 + £10 Shipping Worldwide
PURCHASE PRINT
In London? Buy direct and collect from our studio in E8.
hereticprintmakers@gmail.com


Form test
First name:
Email:
Booking Details
Name (required):
Format: firstname lastname
Email (required):
Website:
No.
of Tickets (required):


Club Hours: Monday - Thursday 5am-11pm | Friday 5am - 10pm | Saturday - Sunday 7am-7pm
Daycare Hours: Monday - Wednesday - Friday 9am - 3pm | Tuesday 8:30am - 1:30pm | Thursday 8:30am - 1pm | Saturday - Sunday 8am - 1pm
Club Hours: Monday - Thursday 5am-11pm | Friday 5am - 10pm | Saturday - Sunday 7am-7pm
Daycare Hours: Monday - Wednesday - Friday 9am - 3pm | Tuesday 8:30am - 1:30pm | Thursday 8:30am - 1pm | Saturday - Sunday 8am - 1pm


{% extends "layout.html" %} {% block page_title %} {% if serviceName %} {{ serviceName }} {% endif %} {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} Prototype Index Home Your claim details Please add missing receipt. Date of visit Prisoner number Prison 30/08/16 0000001 Hewell Confirmation added Expense(s) Train Journey Birmingham New Street to Redditch - Return £14 Add receipt Taxi Journey Redditch to Hewell £8.50 Receipt added Taxi Journey Hewell to Redditch £10 Receipt added Light refreshment Tea £2.20 Receipt added Back You can send information about your claim to the Assisted Prison Visits Unit. Send {% endblock %}
Please add missing receipt.


Uses the export endpoint to export a chart as PNG, PDF, or SVG (the latter two require paid plans).
dw_export_chart( chart_id, type = c("png", "pdf", "svg"), unit = c("px", "inch", "mm"), mode = c("rgb", "cmyk"), width = NULL, height = NULL, plain = TRUE, scale = 2, border_width = 0, border_color = NULL, transparent = FALSE, api_key = "environment" )
| chart_id | Required. A Datawrapper-chart-id as character string, usually a five character combination of digits and letters, e.g. "aBcDe". Or a dw_chart-object. |
|---|---|
| type | Required. One of |
| unit | Define units which |
| mode | color movde for output. Defaults to |
| width, height | width and height of the visualization; if not specified it takes the chart width/height. |
| plain | if |
| scale | defines multiplier for the size; e.g. if |
| border_width | margin around the visualization; e.g. if |
| border_color | color of the border; The default is the same as the visualization (likely |
| transparent | make the background transparent; The default is |
| api_key | Optional. A Datawrapper-API-key as character string. Defaults to "environment" - tries to automatically retrieve the key that's stored in the .Reviron-file by |
for png
, a {magick}
object; for pdf
, invisible raw vector with PDF content; for svg
, invisible character vector with SVG content
PDF and SVG export require paid plans
Bob Rudis<EMAIL_ADDRESS>if (FALSE) dw_export_chart("aBcDE") # uses the preset key in the .Renviron-file


Swinger Bot
Hi Stranger This bot is multipurpose bot with many features. This bot was made by our developers @Team Swingers . All the data are recorded in safe files. Swinger Bot supports Moderation, Image manipulation, Music with filters, Leveling, Welcome features, Social, Giveaways, NSFW and other extra cool features.
My prefix is = and it cannot be changed -Vote us in [discordbotlist](https://discordbotlist.com/bots/swinger/upvote)


Ever since I was young, I've had a passion to understand
how things works and growing up I started developing video
game mods and managing unofficial game servers.
Over time I started studying programming languages at school,
on manuals and learning from my more experienced colleagues
on my first job.
I started working as a technician,
developing .NET applications for PDAs and smartphones, I was also a
Java teacher for a short time.
Now I'm a seasoned Software Developer with almost 11 consecutive
years' experience in the Information Technology. I'm passionate
about making the most efficient software for my clients, I've always
worked to the best of my ability and I'm continuing to increase my
knowledge in the field of web development.
My first web application developed with React, to study the efficiency of state management and Redux. Leveraging public APIs, a list of users is initialized and avatars are dynamically displayed and it is possible to perform a search that applies a filter to the user list.
This React application, was my routing experiment and the first to integrate a DB for saving information. The user can register, the password will be saved encrypted and then he can enter an image address that through the Clarifai API will be highlighted the face shown.
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Excepturi neque, ipsa animi maiores repellendus distinctio aperiam earum dolor voluptatum consequatur blanditiis inventore debitis fuga numquam voluptate ex architecto itaque molestiae.
Feel free to send me a message
My mail


Dear {{ name }}, This is an invitation for 3Di. You can activate your account and enter you chosen password via this activation link*. Your username is: {{ username }}. After activation, you can log in with your username and password at https://3di.live/ For a quick start, please visit: - https://3diwatermanagement.com/3di-start/ If you have any questions, please contact<EMAIL_ADDRESS>Best regards, The 3Di team *) This link is valid for 2 weeks


| Package | Description |
|---|---|
| odata.msgraph.client.beta.complex | |
| odata.msgraph.client.beta.entity | |
| odata.msgraph.client.beta.entity.collection.request | |
| odata.msgraph.client.beta.enums |
| Modifier and Type | Field and Description |
|---|---|
protected DevicePlatformType |
CompanyPortalBlockedAction.platform |
| Modifier and Type | Method and Description |
|---|---|
Optional<DevicePlatformType> |
CompanyPortalBlockedAction.getPlatform()
“Device OS/Platform”
|
| Modifier and Type | Method and Description |
|---|---|
CompanyPortalBlockedAction.Builder |
CompanyPortalBlockedAction.Builder.platform(DevicePlatformType platform)
“Device OS/Platform”
|
CompanyPortalBlockedAction |
CompanyPortalBlockedAction.withPlatform(DevicePlatformType platform)
Returns an immutable copy of
this with just the platform field
changed. |
| Modifier and Type | Field and Description |
|---|---|
protected DevicePlatformType |
ManagedDeviceCertificateState.devicePlatform |
protected DevicePlatformType |
DeviceAndAppManagementAssignmentFilter.platform |
protected DevicePlatformType |
AppleUserInitiatedEnrollmentProfile.platform |
| Modifier and Type | Field and Description |
|---|---|
protected List<DevicePlatformType> |
ManagementConditionStatement.applicablePlatforms |
protected List<DevicePlatformType> |
ManagementCondition.applicablePlatforms |
| Modifier and Type | Method and Description |
|---|---|
CollectionPage<DevicePlatformType> |
ManagementConditionStatement.getApplicablePlatforms()
“This is calculated from looking the management conditions associated to the
management condition statement and finding the intersection of applicable
platforms.”
|
CollectionPage<DevicePlatformType> |
ManagementCondition.getApplicablePlatforms()
“The applicable platforms for this management condition.”
|
Optional<DevicePlatformType> |
ManagedDeviceCertificateState.getDevicePlatform()
“Device platform”
|
Optional<DevicePlatformType> |
DeviceAndAppManagementAssignmentFilter.getPlatform()
“Platform type of the devices on which the Assignment Filter will be applicable.”
|
Optional<DevicePlatformType> |
AppleUserInitiatedEnrollmentProfile.getPlatform()
“The platform of the Device.”
|
| Modifier and Type | Method and Description |
|---|---|
ManagedDeviceCertificateState.Builder |
ManagedDeviceCertificateState.Builder.devicePlatform(DevicePlatformType devicePlatform)
“Device platform”
|
DeviceAndAppManagementAssignmentFilter.Builder |
DeviceAndAppManagementAssignmentFilter.Builder.platform(DevicePlatformType platform)
“Platform type of the devices on which the Assignment Filter will be applicable.”
|
AppleUserInitiatedEnrollmentProfile.Builder |
AppleUserInitiatedEnrollmentProfile.Builder.platform(DevicePlatformType platform)
“The platform of the Device.”
|
ManagedDeviceCertificateState |
ManagedDeviceCertificateState.withDevicePlatform(DevicePlatformType devicePlatform)
Returns an immutable copy of
this with just the devicePlatform
field changed. |
DeviceAndAppManagementAssignmentFilter |
DeviceAndAppManagementAssignmentFilter.withPlatform(DevicePlatformType platform)
Returns an immutable copy of
this with just the platform field
changed. |
AppleUserInitiatedEnrollmentProfile |
AppleUserInitiatedEnrollmentProfile.withPlatform(DevicePlatformType platform)
Returns an immutable copy of
this with just the platform field
changed. |
| Modifier and Type | Method and Description |
|---|---|
ManagementConditionStatement.Builder |
ManagementConditionStatement.Builder.applicablePlatforms(List<DevicePlatformType> applicablePlatforms)
“This is calculated from looking the management conditions associated to the
management condition statement and finding the intersection of applicable
platforms.”
|
NetworkIPv6ConfigurationManagementCondition.Builder |
NetworkIPv6ConfigurationManagementCondition.Builder.applicablePlatforms(List<DevicePlatformType> applicablePlatforms) |
NetworkIPv4ConfigurationManagementCondition.Builder |
NetworkIPv4ConfigurationManagementCondition.Builder.applicablePlatforms(List<DevicePlatformType> applicablePlatforms) |
CircularGeofenceManagementCondition.Builder |
CircularGeofenceManagementCondition.Builder.applicablePlatforms(List<DevicePlatformType> applicablePlatforms) |
| Modifier and Type | Method and Description |
|---|---|
CollectionPageNonEntityRequest<ManagementCondition> |
ManagementConditionCollectionRequest.getManagementConditionsForPlatform(DevicePlatformType platform) |
CollectionPageNonEntityRequest<ManagementConditionStatement> |
ManagementConditionStatementCollectionRequest.getManagementConditionStatementsForPlatform(DevicePlatformType platform) |
| Modifier and Type | Method and Description |
|---|---|
static DevicePlatformType |
DevicePlatformType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DevicePlatformType[] |
DevicePlatformType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Copyright © 2018–2020. All rights reserved.


Home
editProduct
addCategory
removecategory
Fill in product information
Name:
Price:
Explanation:
Image:
Submit


|
Scientific Fortran Tools (SciFT)
1.2
|
Public Member Functions | |
| generic | init => initRealHistogram |
| generic | assignment => copyRealHistogram |
| procedure | initrealhistogram |
| procedure | copyrealhistogram |
| final | destroyrealhistogram |
| procedure | str |
| procedure | show |
| procedure | setrule |
| generic | add => addValue, addFArray |
| procedure | build |
| procedure | mean |
| procedure | stdev |
| procedure | var |
| procedure | mode |
| procedure | median |
| procedure | minimum |
| procedure | maximum |
| procedure | skewness |
| procedure | stderr |
| procedure | summation |
Public Attributes | |
| type(rnfunction) | counts |
| type(rnfunction) | density |
Private Member Functions | |
| procedure, private | addvalue |
| procedure, private | addfarray |
Private Attributes | |
| integer, private | rule |
Definition at line 54 of file RealHistogram.f90.
| generic realhistogram::realhistogram::add | ( | ) |
Definition at line 70 of file RealHistogram.f90.
|
private |
Definition at line 72 of file RealHistogram.f90.
|
private |
Definition at line 71 of file RealHistogram.f90.
| generic realhistogram::realhistogram::assignment | ( | ) |
Definition at line 61 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::build | ( | ) |
Definition at line 74 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::copyrealhistogram | ( | ) |
Definition at line 64 of file RealHistogram.f90.
|
final |
Definition at line 65 of file RealHistogram.f90.
| generic realhistogram::realhistogram::init | ( | ) |
Definition at line 60 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::initrealhistogram | ( | ) |
Definition at line 63 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::maximum | ( | ) |
Definition at line 81 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::mean | ( | ) |
Definition at line 75 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::median | ( | ) |
Definition at line 79 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::minimum | ( | ) |
Definition at line 80 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::mode | ( | ) |
Definition at line 78 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::setrule | ( | ) |
Definition at line 69 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::show | ( | ) |
Definition at line 67 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::skewness | ( | ) |
Definition at line 82 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::stderr | ( | ) |
Definition at line 83 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::stdev | ( | ) |
Definition at line 76 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::str | ( | ) |
Definition at line 66 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::summation | ( | ) |
Definition at line 84 of file RealHistogram.f90.
| procedure realhistogram::realhistogram::var | ( | ) |
Definition at line 77 of file RealHistogram.f90.
| type(rnfunction) realhistogram::realhistogram::counts |
Definition at line 56 of file RealHistogram.f90.
| type(rnfunction) realhistogram::realhistogram::density |
Definition at line 57 of file RealHistogram.f90.
|
private |
Definition at line 55 of file RealHistogram.f90.


Function 'pip3d' tests whether a point in 3D space is within, exactly on, or outside an enclosed surface defined by a triangular mesh. Function 'pip2d' tests whether a point in 2D space is within, exactly on, or outside a polygon.
| Version: | 2.4 |
| Depends: | R (≥ 2.10), misc3d |
| Suggests: | rgl, geometry |
| Published: | 2014-08-27 |
| Author: | Jose M. Maisog, Yuan Wang, George Luta, Jianfei Liu |
| Maintainer: | Jose M. Maisog <bravas02 at gmail.com> |
| License: | GPL-2 |
| URL: | http://ptinpoly.pbworks.com |
| NeedsCompilation: | yes |
| CRAN checks: | ptinpoly results |
| Reference manual: | ptinpoly.pdf |
| Package source: | ptinpoly_2.4.tar.gz |
| Windows binaries: | r-devel: ptinpoly_2.4.zip, r-release: ptinpoly_2.4.zip, r-oldrel: ptinpoly_2.4.zip |
| OS X binaries: | r-release: ptinpoly_2.4.tgz, r-oldrel: ptinpoly_2.4.tgz |
| Old sources: | ptinpoly archive |
| Reverse depends: | RadOnc |
| Reverse imports: | curvHDR |
Please use the canonical form https://CRAN.R-project.org/package=ptinpoly to link to this page.


Clrd.🎨
Upload Image:
Apply Filter:
GreyScale Filter
RGB Filter
Rainbow Filter
Red Filter
Blur Filter
Reset Image


Warehouse
- Introduction
- Attributes
- Model
- Create a new entity
- Update an entity
- Remove an entity
- Handle the result
- Querying
- Authorization
- Schema
- Validator
- Authorizer
- Serializer
- Faker
- Errors
- Permissions
Introduction
To access the data, you can either use the manager or directly the Eloquent model.
If you wish to extend any class, remember to update the configuration.
You can publish the configuration through the command php artisan vendor:publish
Let's first check the list of all attributes
Attributes
| Name | Fillable | Required | Unique | Default | Comment |
|---|---|---|---|---|---|
| id | No | No | No | / | Indentify the entity |
| name | Yes | Yes | Yes | null | |
| description | Yes | No | No | null | |
| created_at | No | No | No | / | Indicate the date when the record was created |
| updated_at | No | No | No | / | Indicate the date when the record was last updated |
| deleted_at | No | No | No | / | Indicate the date when the record was soft-deleted |
Model
Base class Amethyst\Models\Warehouse
You can extends the class like the following example in app/Models/Warehouse
namespace App\Models;
use Amethyst\Models\Warehouse as Model;
class Warehouse extends Model {
// ...
}
Remember to update the configuration with new class.
Manager
Base class Amethyst\Managers\WarehouseManager
The manager is the main class to access and manipulate your model.
Why use the manager instead of the model? Because the manager handle all the boring stuff like validation and authorization for you. Remember that the manager return always a Result.
You can extends the class like the following example in app/Managers/WarehouseManager
namespace App\Managers;
use Amethyst\Managers\WarehouseManager as Manager;
class WarehouseManager extends Manager {
// ...
}
Remember to update the configuration with new class.
Create a new entity
First you have to define a new instance of the Manager
use Amethyst\Managers\WarehouseManager;
$manager = new WarehouseManager();
Now you can use the method create
to create a new a new entity
$params = [
"name" => "Miss Bridie Williamson",
"description" => "Quia commodi rerum qui dolorum. Rem ut eos quo inventore sed similique. In nemo totam molestias fuga voluptas veniam iusto aspernatur."
];
$result = $manager->create($params);
Check the result of the operation
if ($result->ok()) {
// All ok
} else {
// Something goes wrong
}
Retrieve the entity from the result
$entity = $result->getResource();
Throw an exception immediately if the operation fails
use Railken\Lem\Exceptions\Exception;
$params = [
"name" => "Miss Bridie Williamson",
"description" => "Quia commodi rerum qui dolorum. Rem ut eos quo inventore sed similique. In nemo totam molestias fuga voluptas veniam iusto aspernatur."
];
try {
$result = $manager->createOrFail($params);
} catch (Exception $e) {
// ...
}
Update
Define a new instance of the Manager
use Amethyst\Managers\WarehouseManager;
$manager = new WarehouseManager();
Retrieve an entity using the repository
$entity = $manager->getRepository()->findOneById(1);
Update an existent entity
$params = [
"name" => "Miss Bridie Williamson",
"description" => "Quia commodi rerum qui dolorum. Rem ut eos quo inventore sed similique. In nemo totam molestias fuga voluptas veniam iusto aspernatur."
];
$result = $manager->update($entity, $params);
Remove
Define a new instance of the Manager
use Amethyst\Managers\WarehouseManager;
$manager = new WarehouseManager();
$entity = $manager->getRepository()->findOneById(1);
$result = $manager->remove($entity);
Result
Once you've got the result you should always check if an error has occurred, if not, retrieve the resource.
use Amethyst\Managers\WarehouseManager;
$manager = new WarehouseManager();
$result = $manager->create([
"name" => "Miss Bridie Williamson",
"description" => "Quia commodi rerum qui dolorum. Rem ut eos quo inventore sed similique. In nemo totam molestias fuga voluptas veniam iusto aspernatur."
]);
if ($result->ok()) {
$resource = $result->getResource();
} else {
// Loop through all errors
$result->getErrors()->map(function($error) {
return $error->toArray();
}))
// Retrieve an array of all errors
$result->getSimpleErrors();
/* The result is something like this:
[0] => Array
(
[code] => FIELD_NOT_DEFINED
[label] => field
[message] => The field is required
[value] =>
)
*/
}
Schema
Base class Amethyst\Schemas\WarehouseSchema
The schema is used to define the structure of the attributes. All the $attributes in the model and in the manager are initialized by the schema.
You can extends the class like the following example in app/Schemas/WarehouseSchema
namespace App\Schemas;
use Amethyst\Schemas\WarehouseSchema as Schema;
class WarehouseSchema extends Schema {
// ...
}
Remember to update the configuration with new class.
Repository
Base class Amethyst\Repositories\WarehouseRepository
The repository is the class used to perform queries.
use Amethyst\Managers\WarehouseManager;
$manager = new WarehouseManager();
$repository = $manager->getRepository();
Retrieving an entity
$repository->findOneBy(['id' => 1]);
$repository->findOneById(1);
Retrieving all entities
$repository->findAll();
Performing a query using \Illuminate\DataBase\Eloquent\Builder
$repository->newQuery()->where('id', 1)->first();
You can extends the class like the following example in app/Repositories/WarehouseRepository
namespace App\Repositories;
use Amethyst\Repositories\WarehouseRepository as Repository;
class WarehouseRepository extends Repository {
// ...
}
Remember to update the configuration with new class.
Serializer
Base class Amethyst\Serializers\WarehouseSerializer
The serializer is used to serialize an entity, you can retrieve it from the data.
use Amethyst\Managers\WarehouseManager;
$manager = new WarehouseManager();
$serializer = $manager->getSerializer();
And use it so serialize an entity Retrieving an entity
$entity = $repository->findOneById(1);
$serializer->serialize($entity)->toArray(); // Returns an array
You can extends the class like the following example in app/Serializers/WarehouseSerializer
namespace App\Serializers;
use Amethyst\Serializers\WarehouseSerializer as Serializer;
class WarehouseSerializer extends Serializer {
// ...
}
Remember to update the configuration with new class.
Faker
Base class Amethyst\Fakers\WarehouseFaker
The faker can be used for testing or seeding.
Create a new entity using the faker
use Amethyst\Fakers\WarehouseFaker;
$result = $manager->create(WarehouseFaker::make()->parameters());
You can extends the class like the following example in app/Fakers/WarehouseFaker
namespace App\Fakers;
use Amethyst\Fakers\WarehouseFaker as Faker;
class WarehouseFaker extends Faker {
// ...
}
Remember to update the configuration with new class.
Permissions
List of all permissions.
| Code |
|---|
| warehouse.create |
| warehouse.update |
| warehouse.show |
| warehouse.remove |
| warehouse.attributes.id.write |
| warehouse.attributes.id.read |
| warehouse.attributes.name.write |
| warehouse.attributes.name.read |
| warehouse.attributes.description.write |
| warehouse.attributes.description.read |
| warehouse.attributes.created_at.write |
| warehouse.attributes.created_at.read |
| warehouse.attributes.updated_at.write |
| warehouse.attributes.updated_at.read |
| warehouse.attributes.deleted_at.write |
| warehouse.attributes.deleted_at.read |
Errors
List of all errors.
| Code | Message |
|---|---|
| WAREHOUSE_NAME_NOT_DEFINED | The NAME is required |
| WAREHOUSE_NAME_NOT_VALID | The NAME is not valid |
| WAREHOUSE_NAME_NOT_AUTHORIZED | You're not authorized, missing NAME permission |
| WAREHOUSE_NAME_NOT_UNIQUE | The NAME is not unique |
| WAREHOUSE_DESCRIPTION_NOT_VALID | The DESCRIPTION is not valid |
| WAREHOUSE_DESCRIPTION_NOT_AUTHORIZED | You're not authorized, missing DESCRIPTION permission |


See
A Psychedelic Western
Some quick example text to build on the card title and make up the bulk of the card's content.
Watch Bacurau on MubiListen
Loreum ipsum lorem ipsum
Joyce & Donato's Aquarius (2010). "Injecting pure-quality jazz into bossa nova, old-school Brazilian samba and laid back Cuban vibes, ‘Aquarius’ is intricate yet endlessly listenable."
Listen to Aquarius on BandcampTaste
Title
Some quick example text to build on the card title and make up the bulk of the card's content.
Card link


---
layout: post
title: There have been five mass extinctions in Earth’s history. Now we’re facing
a sixth.
date: '2014-07-31T13:18:49+01:00'
tags:
- Random
tumblr_url: http://www.iamthemangosteen.com/post/93417037794/there-have-been-five-mass-extinctions-in-earths
excerpt: The world's species already seem to be vanishing at an unnaturally rapid rate. And humans are altering the Earth's landscape in far-reaching ways...We've hunted animals like the great auk to extinction. We've cleared away broad swaths of rain forest. We've transported species from their natural habitats to new continents. We've pumped billions of tons of carbon-dioxide into the atmosphere and oceans, transforming the climate
---
There have been five mass extinctions in Earth’s history. Now we’re facing a sixth.


Module: ActiveRecord::Encryption::ExtendedDeterministicQueries
| Relationships & Source Files | |
| Namespace Children | |
|
Modules:
| |
|
Classes:
| |
| Defined in: | activerecord/lib/active_record/encryption/extended_deterministic_queries.rb |
Overview
Automatically expand encrypted arguments to support querying both encrypted and unencrypted data
Active Record Encryption supports querying the db using deterministic attributes. For example:
Contact.find_by(email_address<EMAIL_ADDRESS>The value<EMAIL_ADDRESS>will get encrypted automatically to perform the query. But there is a problem while the data is being encrypted. This won’t work. During that time, you need these queries to be:
Contact.find_by(email_address: [<EMAIL_ADDRESS>"<encrypted<EMAIL_ADDRESS>])
This patches ::ActiveRecord
to support this automatically. It addresses both:
-
::ActiveRecord::Base
- Used inContact.find_by_email_address(...)
-
::ActiveRecord::Relation
- Used inContact.internal.find_by_email_address(...)
::ActiveRecord::Base
relies on ::ActiveRecord::Relation
(ActiveRecord::QueryMethods) but it does some prepared statements caching. That’s why we need to intercept ::ActiveRecord::Base
as soon as it’s invoked (so that the proper prepared statement is cached).
When modifying this file run performance tests in test/performance/extended_deterministic_queries_performance_test.rb
to
make sure performance overhead is acceptable.
We will extend this to support previous “encryption context” versions in future iterations
Class Method Summary
Class Method Details
.install_support
[ GitHub ]# File 'activerecord/lib/active_record/encryption/extended_deterministic_queries.rb', line 34
def self.install_support ActiveRecord::Relation.prepend(RelationQueries) ActiveRecord::Base.include(CoreQueries) ActiveRecord::Encryption::EncryptedAttributeType.prepend(ExtendedEncryptableType) Arel::Nodes::HomogeneousIn.prepend(InWithAdditionalValues) end


| Class | Description |
|---|---|
| AppendingParquetOutputFormat |
TODO: this will be able to append to directories it created itself, not necessarily
to imported ones.
|
| CatalystArrayContainsNullConverter |
A
parquet.io.api.GroupConverter that converts a single-element groups that
match the characteristics of an array contains null (see
ParquetTypesConverter ) into an
ArrayType . |
| CatalystArrayConverter |
A
parquet.io.api.GroupConverter that converts a single-element groups that
match the characteristics of an array (see
ParquetTypesConverter ) into an
ArrayType . |
| CatalystConverter | |
| CatalystGroupConverter |
A
parquet.io.api.GroupConverter that is able to convert a Parquet record
to a Row object. |
| CatalystMapConverter |
A
parquet.io.api.GroupConverter that converts two-element groups that
match the characteristics of a map (see
ParquetTypesConverter ) into an
MapType . |
| CatalystNativeArrayConverter |
A
parquet.io.api.GroupConverter that converts a single-element groups that
match the characteristics of an array (see
ParquetTypesConverter ) into an
ArrayType . |
| CatalystPrimitiveConverter |
A
parquet.io.api.PrimitiveConverter that converts Parquet types to Catalyst types. |
| CatalystPrimitiveRowConverter |
A
parquet.io.api.GroupConverter that is able to convert a Parquet record
to a Row object. |
| CatalystStructConverter |
This converter is for multi-element groups of primitive or complex types
that have repetition level optional or required (so struct fields).
|
| DefaultSource |
Allows creation of parquet based tables using the syntax
CREATE TEMPORARY TABLE ... |
| FileSystemHelper | |
| FilteringParquetRowInputFormat |
We extend ParquetInputFormat in order to have more control over which
RecordFilter we want to use.
|
| InsertIntoParquetTable |
:: DeveloperApi ::
Operator that acts as a sink for queries on RDDs and can be used to
store the output inside a directory of Parquet files.
|
| MutableRowWriteSupport | |
| ParquetFilters | |
| ParquetRelation |
Relation that consists of data stored in a Parquet columnar format.
|
| ParquetRelation2 |
An alternative to
ParquetRelation that plugs in using the data sources API. |
| ParquetTableScan |
:: DeveloperApi ::
Parquet table scan operator.
|
| ParquetTestData | |
| ParquetTypeInfo |
A class representing Parquet info fields we care about, for passing back to Parquet
|
| ParquetTypesConverter | |
| Partition | |
| RowReadSupport |
A
parquet.hadoop.api.ReadSupport for Row objects. |
| RowRecordMaterializer |
A
parquet.io.api.RecordMaterializer for Rows. |
| RowWriteSupport |
A
parquet.hadoop.api.WriteSupport for Row ojects. |
| TestGroupWriteSupport |


HTML Imports: All Results
Test files
: 4;
Total subtests
: 0
Per UA
UC10
0/0 (NaN%)
Test Files
/html-imports/document/document-method-changes.html
/html-imports/fetching/already-in-import-map.html
/html-imports/fetching/loading-attempt.html
/html-imports/html-link-element/import-attribute.html
Test
UC10
/html-imports/document/document-method-changes.html
OK
/html-imports/fetching/already-in-import-map.html
OK
/html-imports/fetching/loading-attempt.html
TIMEOUT
/html-imports/html-link-element/import-attribute.html
OK


Maharashtra govt formation: Congress-NCP discuss common minimum programme blueprint in meeting in Delhi
Congress-NCP leaders seem to be finalising key agendas, keeping their respective manifestos in mind.
by Mausami SinghSenior leaders of the Congress and the Nationalist Congress Party (NCP) held talks at the residence of NCP chief Sharad Pawar in New Delhi on Tuesday. The meeting was to take a shot at government formation in Maharashtra.
Jairam Ramesh was present at the meeting. Sources have informed India Today that Jairam Ramesh has been tasked with drawing the blueprint of the alliance.
Congress-NCP leaders seem to be finalising key agendas, keeping their respective manifestos in mind.
The meeting took place at the residence of Sharad Pawar. Congress leaders Ahmed Patel, Jairam Ramesh, Mallikarjun Kharge, Prithviraj Chavan, KC Venugopal and Balasaheb Thorat attended the meeting.
Those representing the NCP included Supriya Sule, Ajit Pawar, Jayant Patil and Nawab Malik.
WATCH | Congress-NCP meeting at Sharad Pawar's residence in Delhi
SONIA GANDHI GIVES NOD TO ALLIANCE WITH SHIV SENA
Interim Congress president Sonia Gandhi on Wednesday gave in-principle approval to an alliance with the Shiv Sena to form a government in Maharashtra.
The decision, sources in the NCP told India Today, was taken during her meeting with Nationalist Congress Party chief Sharad Pawar on Monday.
Sharad Pawar, whose meeting with Sonia Gandhi was being billed as a major step towards a tie-up with the Shiv Sena for government formation in the state, had said that there was no discussion on a common minimum programme (CMP) during the talks.
Keeping his cards close to his chest, Sharad Pawar had said that he had only discussed the political situation in Maharashtra with Sonia Gandhi and the two parties will hold talks with their other allies before making a decision on government formation in the state.
Now, the sources have confirmed that the decision was taken by Sonia Gandhi on Monday itself.
(With inputs from PTI and Sahil Joshi in Mumbai)
LIVE | Follow updates here


Application Settings
Weekdays
Check days to use as business days
{{label}}
External Calendars
Name
URL
Remove
Add
Popup
Default span for calculation
Business Day(s)
/
Day(s)
Save


{{< layout}} {{$pageTitle}}HMPO Prototypes{{/pageTitle}} {{$propositionHeader}}{{/propositionHeader}} {{$content}}
The user journey closest to the live website.
Latest prototypeEmail templates
HMPO contacts applicantContains changes we tested and signed off from DPS
Start page


HTML Element Inspector
This is a library of core HTML elements influenced only by the CSS stylesheets in this page. Use the dropdown at the top of this page to help you identify these 'opinionated' styles from different frameworks such as Evo, Bootstrap, and Foundation. There's even an option for 'none' so you can see what your browser defaults to. Note that no additional padding or margin spaces have been applied, so you may see the HTML elements colide into one another. This is so we don't mask any opinionated margins or padding that a particular framework applies automatically.
How is this useful? Did you know that CSS frameworks are 'opinionated' and will enforce design styling upon basic HTML element tags. Even CSS 'resets' such as Normalize are opinionated for some colors and sizes. As you perform design QA on your website, you may wonder why your text is gray instead of black. Could be because of Bootstrap's styles? Check out the Bootstrap elements page from the dropdown above, and you'll notice that most of the text is a subtle gray color. Problem identified!

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Link text: Pack my box with five dozen liquor jugs.

Pack my box with five dozen liquor jugs.

Pack my box with five dozen liquor jugs.

Pack my box with five dozen liquor jugs.

Pack my box with five dozen liquor jugs.

Pack my box with five dozen liquor jugs.

Pack my box with five dozen liquor jugs.
This sentence has no html tag and no css class, other than the
and
tags.

Experience Design Made Simple for living design systems
<q>
Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Experience Design Made Simple for living design systems

Item 1- Item 2
- Item 3

Item 1- Item 2
- Item 3
<button>

| First | Last | Age |
|---|---|---|
| Kevin | Stark | 44 |
| Emily | Smith | 34 |
Simple table with header
| First name | Last name |
|---|---|
| John | Doe |
| Jane | Doe |
Table with thead, tfoot, and tbody
| Header content 1 | Header content 2 |
|---|---|
| Footer content 1 | Footer content 2 |
| Body content 1 | Body content 2 |
Table with colgroup
| Countries | Capitals | Population | Language |
|---|---|---|---|
| USA | Washington D.C. | 309 million | English |
| Sweden | Stockholm | 9 million | Swedish |
Table with colgroup and col
| Lime | Lemon | Orange |
|---|---|---|
| Green | Yellow | Orange |
Simple table with caption
| Awesome data |


1.15.0 (Pending)¶
Changes¶
access loggers: added GRPC_STATUS operator on logging format.
access loggers: applied existing buffer limits to the non-google gRPC access logs, as well as stats for logged / dropped logs.
access loggers: extened specifier for FilterStateFormatter to output unstructured log string.
config: added version_text stat that reflects xDS version.
dynamic forward proxy: added SNI based dynamic forward proxy support.
fault: added support for controlling the percentage of requests that abort, delay and response rate limits faults are applied to using HTTP headers to the HTTP fault filter.
fault: added support for specifying grpc_status code in abort faults using HTTP header or abort fault configuration in HTTP fault filter.
filter: add upstram_rq_time stats to the GPRC stats filter. Disabled by default and can be enabled via enable_upstream_stats.
grpc-json: added support for streaming response using google.api.HttpBody.
gzip filter: added option to set zlib’s next output buffer size.
health checks: allow configuring health check transport sockets by specifying transport socket match criteria.
http: fixed a bug where in some cases slash was moved from path to query string when merging of adjacent slashes is enabled.
http: fixed a bug where the upgrade header was not cleared on responses to non-upgrade requests. Can be reverted temporarily by setting runtime feature envoy.reloadable_features.fix_upgrade_response to false.
http: remove legacy connection pool code and their runtime features: envoy.reloadable_features.new_http1_connection_pool_behavior and envoy.reloadable_features.new_http2_connection_pool_behavior.
listener: added in place filter chain update flow for tcp listener update which doesn’t close connections if the corresponding network filter chain is equivalent during the listener update. Can be disabled by setting runtime feature envoy.reloadable_features.listener_in_place_filterchain_update to false. Also added additional draining filter chain stat for listener manager to track the number of draining filter chains and the number of in place update attempts.
logger: added –log-format-prefix-with-location command line option to prefix ‘%v’ with file path and line number.
network filters: added a postgres proxy filter.
network filters: added a rocketmq proxy filter.
prometheus stats: fix the sort order of output lines to comply with the standard.
request_id: added to always_set_request_id_in_response setting to set x-request-id header in response even if tracing is not forced.
router: allow retries of streaming or incomplete requests. This removes stat rq_retry_skipped_request_not_complete.
router: allow retries by default when upstream responds with x-envoy-overloaded.
stats: added the option to report counters as deltas to the metrics service stats sink.
tracing: tracing configuration has been made fully dynamic and every HTTP connection manager can now have a separate tracing provider.
upstream: fixed a bug where Envoy would panic when receiving a GRPC SERVICE_UNKNOWN status on the health check.
Deprecated¶
Tracing provider configuration as part of bootstrap config has been deprecated in favor of configuration as part of HTTP connection manager.


Another quite basic Pie chart that is predominantly a pinkish theme. All of the colors
are defined using rgb
values instead of hex
values or named colors.
The linewidth
is set to 2 so the resultant effect is a small amount of segment
separation.

It's quite a basic example of a Pie chart but the resulting aesthetic is quite nice. This goes to show that your charts don't need to be fancy to look good!
<script src="RGraph.common.core.js"></script> <script src="RGraph.pie.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="550" height="450"> [No canvas support] </canvas>This is the code that generates the chart - it should be placed AFTER the
canvas
tag(s):


Securely upload and store evidence in a FIPS compliant cloud storage.
Colleagues can instantly access uploaded evidence.
Take photos from any device and add them to case files
Conduct interviews, record evidence and add to case files.
Developed by law enforcement officers, iCrimeFighter is a mobile evidence management solution bringing true mobility to officers’ everyday work life. iCrimeFighter’s mission is to make evidence collection and investigative collaboration easier and more efficient.


Once you start working with probabilities, you quickly realize that the assumption of all possible outcomes being equally likely isn't always reasonable. For example, if you think a coin is biased then you won't want to assume that it lands heads with the same chance as tails.
To deal with settings in which some outcomes have a higher chance than others, a more general theory is needed. In the 1930's, the Russian mathematician Andrey Kolmogorov (1903-1987) formulated some ground rules, known as axioms, that covered a rich array of settings and became the foundation of modern probability theory.
The axioms start out with an outcome space $\Omega$. We will assume $\Omega$ to be finite for now. Probability is a function $P$ defined on events, which as you know are subsets of $\Omega$. The first two axioms just set the scale of measurement: they define probabilites to be numbers between 0 and 1.
The third and final axiom is the key to probability being a "measure" of an event. We will study it after we have developed some relevant terminology.


Revature Mailing Address: 11730 Plaza America Dr #205 Reston, VA 20190 *Submitting the form provided will send a request to our team who will respond as soon as possible via email.
Revature Mailing Address:
11730 Plaza America Dr #205 Reston, VA 20190
*Submitting the form provided will send a request to our team who will respond as soon as possible via email.


My Work
About Me
Contact Me
Instagram
Chris 04
My Gallery Space
This is Title
This is Title
This is Title
This is Title
This is Title
This is Title
This is Title


Concraft sees bright prospects for 1Q20 amid strong demand for TWS devices
by Ninelu Tu, Taipei; Steve Shen, DIGITIMESAcoustic component maker Concraft is set to land more windfall orders in the first quarter of 2020 as current market demand for true wireless stereo (TWS) devices launched by its clients has outpaced supply, according to company CFO Joe Huang.
The entire TWS supply chain has been benefiting from the spillover effect of strong sales of Apple's AirPods Pro since its launch at the end of October, Huang said.
Concraft has clear order visibility for TWS components extending to the first half of 2020, and it expects robust results in the fourth quarter of 2019 and the first quarter of 2020, Huang said at the company's latest investors meeting.
Despite strong sales of TWS devices at the moment, Concraft has no plans to further expand its production lines for acoustic components on concerns of maintaining a balance between supply and demand, Huang noted.
However, the company will kick off trial volume production of related automotive components - which have been verified - in December, paving the way for commercial shipments in January 2020, Huang revealed.
It will also roll out new injection optical components at the end of the first quarter of 2020 at the earliest.
The company also disclosed that it posted net profit of NT$217 million (US$7.115 million) on revenues of NT$3.331 billion in the first three quarters of 2019. Gross margin for the nine-month period stood at 32.2%.


Police seek information on missing one-year-old boy in Ondo
by Agency ReportThe Nigeria Police Force in Ondo State have called on the public to give useful information to the command that could lead to the rescue of a one-year-old boy, Kolawole Gold, who went missing in a church in Akure.
Mr Femi Joseph, the Police Public Relations Officer made the call in a statement on Thursday in Akure.
“The Ondo State Police Command wishes to inform the general public, especially the good people of Ondo State, about the sudden and unfortunate disappearance of a little boy by name Kolawole Gold.
“Gold was last seen in a church programme holding at Sotitobire Church, Oshinle Quarters Akure with his parents, Mr and Mrs Kolawole, on November 10 at around 11.30 a.m.
“The boy, who is one-year-old and light-skinned, can speak and understand Yoruba and English languages,’’ Joseph stated.
According to the PPRO, the command has since launched an investigation into the incident.
“We urged anyone with useful information that could lead the Police to where the boy could be found or rescued to quickly inform the nearest police station or call any of the following phone numbers:<PHONE_NUMBER>0,<PHONE_NUMBER>3,<PHONE_NUMBER>1 and 0806015 9998,’’ Joseph said.
(NAN)


Bijay Pathak
About
Blog
Blog Posts
Scala Substitution Model
June 12, 2016
Python and Vim
November 29, 2015
Spark Shuffle Behaviour
May 16, 2015
Human Activity Recognition
September 21, 2014