# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains simple statistical algorithms that are straightforwardly
implemented as a single python function (or family of functions).
This module should generally not be used directly. Everything in `__all__` is
imported into `astropy.stats`, and hence that package should be used for
access.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
from ..extern.six.moves import xrange
__all__ = ['binom_conf_interval', 'binned_binom_proportion',
'median_absolute_deviation', 'biweight_location',
'biweight_midvariance', 'signal_to_noise_oir_ccd', 'bootstrap',
'mad_std', 'gaussian_fwhm_to_sigma', 'gaussian_sigma_to_fwhm']
__doctest_skip__ = ['binned_binom_proportion']
__doctest_requires__ = {'binom_conf_interval': ['scipy.special']}
gaussian_sigma_to_fwhm = 2.0 * np.sqrt(2.0 * np.log(2.0))
"""
Factor with which to multiply Gaussian 1-sigma standard deviation(s) to
convert them to full width at half maximum(s).
"""
gaussian_fwhm_to_sigma = 1. / gaussian_sigma_to_fwhm
"""
Factor with which to multiply Gaussian full width at half maximum(s) to
convert them to 1-sigma standard deviation(s).
"""
# TODO Note scipy dependency
[docs]def binom_conf_interval(k, n, conf=0.68269, interval='wilson'):
r"""Binomial proportion confidence interval given k successes,
n trials.
Parameters
----------
k : int or numpy.ndarray
Number of successes (0 <= ``k`` <= ``n``).
n : int or numpy.ndarray
Number of trials (``n`` > 0). If both ``k`` and ``n`` are arrays,
they must have the same shape.
conf : float in [0, 1], optional
Desired probability content of interval. Default is 0.68269,
corresponding to 1 sigma in a 1-dimensional Gaussian distribution.
interval : {'wilson', 'jeffreys', 'flat', 'wald'}, optional
Formula used for confidence interval. See notes for details. The
``'wilson'`` and ``'jeffreys'`` intervals generally give similar
results, while 'flat' is somewhat different, especially for small
values of ``n``. ``'wilson'`` should be somewhat faster than
``'flat'`` or ``'jeffreys'``. The 'wald' interval is generally not
recommended. It is provided for comparison purposes. Default is
``'wilson'``.
Returns
-------
conf_interval : numpy.ndarray
``conf_interval[0]`` and ``conf_interval[1]`` correspond to the lower
and upper limits, respectively, for each element in ``k``, ``n``.
Notes
-----
In situations where a probability of success is not known, it can
be estimated from a number of trials (N) and number of
observed successes (k). For example, this is done in Monte
Carlo experiments designed to estimate a detection efficiency. It
is simple to take the sample proportion of successes (k/N)
as a reasonable best estimate of the true probability
:math:`\epsilon`. However, deriving an accurate confidence
interval on :math:`\epsilon` is non-trivial. There are several
formulas for this interval (see [1]_). Four intervals are implemented
here:
**1. The Wilson Interval.** This interval, attributed to Wilson [2]_,
is given by
.. math::
CI_{\rm Wilson} = \frac{k + \kappa^2/2}{N + \kappa^2}
\pm \frac{\kappa n^{1/2}}{n + \kappa^2}
((\hat{\epsilon}(1 - \hat{\epsilon}) + \kappa^2/(4n))^{1/2}
where :math:`\hat{\epsilon} = k / N` and :math:`\kappa` is the
number of standard deviations corresponding to the desired
confidence interval for a *normal* distribution (for example,
1.0 for a confidence interval of 68.269%). For a
confidence interval of 100(1 - :math:`\alpha`)%,
.. math::
\kappa = \Phi^{-1}(1-\alpha/2) = \sqrt{2}{\rm erf}^{-1}(1-\alpha).
**2. The Jeffreys Interval.** This interval is derived by applying
Bayes' theorem to the binomial distribution with the
noninformative Jeffreys prior [3]_, [4]_. The noninformative Jeffreys
prior is the Beta distribution, Beta(1/2, 1/2), which has the density
function
.. math::
f(\epsilon) = \pi^{-1} \epsilon^{-1/2}(1-\epsilon)^{-1/2}.
The justification for this prior is that it is invariant under
reparameterizations of the binomial proportion.
The posterior density function is also a Beta distribution: Beta(k
+ 1/2, N - k + 1/2). The interval is then chosen so that it is
*equal-tailed*: Each tail (outside the interval) contains
:math:`\alpha`/2 of the posterior probability, and the interval
itself contains 1 - :math:`\alpha`. This interval must be
calculated numerically. Additionally, when k = 0 the lower limit
is set to 0 and when k = N the upper limit is set to 1, so that in
these cases, there is only one tail containing :math:`\alpha`/2
and the interval itself contains 1 - :math:`\alpha`/2 rather than
the nominal 1 - :math:`\alpha`.
**3. A Flat prior.** This is similar to the Jeffreys interval,
but uses a flat (uniform) prior on the binomial proportion
over the range 0 to 1 rather than the reparametrization-invariant
Jeffreys prior. The posterior density function is a Beta distribution:
Beta(k + 1, N - k + 1). The same comments about the nature of the
interval (equal-tailed, etc.) also apply to this option.
**4. The Wald Interval.** This interval is given by
.. math::
CI_{\rm Wald} = \hat{\epsilon} \pm
\kappa \sqrt{\frac{\hat{\epsilon}(1-\hat{\epsilon})}{N}}
The Wald interval gives acceptable results in some limiting
cases. Particularly, when N is very large, and the true proportion
:math:`\epsilon` is not "too close" to 0 or 1. However, as the
later is not verifiable when trying to estimate :math:`\epsilon`,
this is not very helpful. Its use is not recommended, but it is
provided here for comparison purposes due to its prevalence in
everyday practical statistics.
References
----------
.. [1] Brown, Lawrence D.; Cai, T. Tony; DasGupta, Anirban (2001).
"Interval Estimation for a Binomial Proportion". Statistical
Science 16 (2): 101-133. doi:10.1214/ss/1009213286
.. [2] Wilson, E. B. (1927). "Probable inference, the law of
succession, and statistical inference". Journal of the American
Statistical Association 22: 209-212.
.. [3] Jeffreys, Harold (1946). "An Invariant Form for the Prior
Probability in Estimation Problems". Proc. R. Soc. Lond.. A 24 186
(1007): 453-461. doi:10.1098/rspa.1946.0056
.. [4] Jeffreys, Harold (1998). Theory of Probability. Oxford
University Press, 3rd edition. ISBN<PHONE_NUMBER>682
Examples
--------
Integer inputs return an array with shape (2,):
>>> binom_conf_interval(4, 5, interval='wilson')
array([ 0.57921724, 0.92078259])
Arrays of arbitrary dimension are supported. The Wilson and Jeffreys
intervals give similar results, even for small k, N:
>>> binom_conf_interval([0, 1, 2, 5], 5, interval='wilson')
array([[ 0. , 0.07921741, 0.21597328, 0.83333304],
[ 0.16666696, 0.42078276, 0.61736012, 1. ]])
>>> binom_conf_interval([0, 1, 2, 5], 5, interval='jeffreys')
array([[ 0. , 0.0842525 , 0.21789949, 0.82788246],
[ 0.17211754, 0.42218001, 0.61753691, 1. ]])
>>> binom_conf_interval([0, 1, 2, 5], 5, interval='flat')
array([[ 0. , 0.12139799, 0.24309021, 0.73577037],
[ 0.26422963, 0.45401727, 0.61535699, 1. ]])
In contrast, the Wald interval gives poor results for small k, N.
For k = 0 or k = N, the interval always has zero length.
>>> binom_conf_interval([0, 1, 2, 5], 5, interval='wald')
array([[ 0. , 0.02111437, 0.18091075, 1. ],
[ 0. , 0.37888563, 0.61908925, 1. ]])
For confidence intervals approaching 1, the Wald interval for
0 < k < N can give intervals that extend outside [0, 1]:
>>> binom_conf_interval([0, 1, 2, 5], 5, interval='wald', conf=0.99)
array([[ 0. , -0.26077835, -0.16433593, 1. ],
[ 0. , 0.66077835, 0.96433593, 1. ]])
"""
if conf < 0. or conf > 1.:
raise ValueError('conf must be between 0. and 1.')
alpha = 1. - conf
k = np.asarray(k).astype(np.int)
n = np.asarray(n).astype(np.int)
if (n <= 0).any():
raise ValueError('n must be positive')
if (k < 0).any() or (k > n).any():
raise ValueError('k must be in {0, 1, .., n}')
if interval == 'wilson' or interval == 'wald':
from scipy.special import erfinv
kappa = np.sqrt(2.) * min(erfinv(conf), 1.e10) # Avoid overflows.
k = k.astype(np.float)
n = n.astype(np.float)
p = k / n
if interval == 'wilson':
midpoint = (k + kappa ** 2 / 2.) / (n + kappa ** 2)
halflength = (kappa * np.sqrt(n)) / (n + kappa ** 2) * \
np.sqrt(p * (1 - p) + kappa ** 2 / (4 * n))
conf_interval = np.array([midpoint - halflength,
midpoint + halflength])
# Correct intervals out of range due to floating point errors.
conf_interval[conf_interval < 0.] = 0.
conf_interval[conf_interval > 1.] = 1.
else:
midpoint = p
halflength = kappa * np.sqrt(p * (1. - p) / n)
conf_interval = np.array([midpoint - halflength,
midpoint + halflength])
elif interval == 'jeffreys' or interval == 'flat':
from scipy.special import betaincinv
if interval == 'jeffreys':
lowerbound = betaincinv(k + 0.5, n - k + 0.5, 0.5 * alpha)
upperbound = betaincinv(k + 0.5, n - k + 0.5, 1. - 0.5 * alpha)
else:
lowerbound = betaincinv(k + 1, n - k + 1, 0.5 * alpha)
upperbound = betaincinv(k + 1, n - k + 1, 1. - 0.5 * alpha)
# Set lower or upper bound to k/n when k/n = 0 or 1
# We have to treat the special case of k/n being scalars,
# which is an ugly kludge
if lowerbound.ndim == 0:
if k == 0:
lowerbound = 0.
elif k == n:
upperbound = 1.
else:
lowerbound[k == 0] = 0
upperbound[k == n] = 1
conf_interval = np.array([lowerbound, upperbound])
else:
raise ValueError('Unrecognized interval: {0:s}'.format(interval))
return conf_interval
# TODO Note scipy dependency (needed in binom_conf_interval)
[docs]def binned_binom_proportion(x, success, bins=10, range=None, conf=0.68269,
interval='wilson'):
"""Binomial proportion and confidence interval in bins of a continuous
variable ``x``.
Given a set of datapoint pairs where the ``x`` values are
continuously distributed and the ``success`` values are binomial
("success / failure" or "true / false"), place the pairs into
bins according to ``x`` value and calculate the binomial proportion
(fraction of successes) and confidence interval in each bin.
Parameters
----------
x : list_like
Values.
success : list_like (bool)
Success (`True`) or failure (`False`) corresponding to each value
in ``x``. Must be same length as ``x``.
bins : int or sequence of scalars, optional
If bins is an int, it defines the number of equal-width bins
in the given range (10, by default). If bins is a sequence, it
defines the bin edges, including the rightmost edge, allowing
for non-uniform bin widths (in this case, 'range' is ignored).
range : (float, float), optional
The lower and upper range of the bins. If `None` (default),
the range is set to ``(x.min(), x.max())``. Values outside the
range are ignored.
conf : float in [0, 1], optional
Desired probability content in the confidence
interval ``(p - perr[0], p + perr[1])`` in each bin. Default is
0.68269.
interval : {'wilson', 'jeffreys', 'flat', 'wald'}, optional
Formula used to calculate confidence interval on the
binomial proportion in each bin. See `binom_conf_interval` for
definition of the intervals. The 'wilson', 'jeffreys',
and 'flat' intervals generally give similar results. 'wilson'
should be somewhat faster, while 'jeffreys' and 'flat' are
marginally superior, but differ in the assumed prior.
The 'wald' interval is generally not recommended.
It is provided for comparison purposes. Default is 'wilson'.
Returns
-------
bin_ctr : numpy.ndarray
Central value of bins. Bins without any entries are not returned.
bin_halfwidth : numpy.ndarray
Half-width of each bin such that ``bin_ctr - bin_halfwidth`` and
``bin_ctr + bins_halfwidth`` give the left and right side of each bin,
respectively.
p : numpy.ndarray
Efficiency in each bin.
perr : numpy.ndarray
2-d array of shape (2, len(p)) representing the upper and lower
uncertainty on p in each bin.
See Also
--------
binom_conf_interval : Function used to estimate confidence interval in
each bin.
Examples
--------
Suppose we wish to estimate the efficiency of a survey in
detecting astronomical sources as a function of magnitude (i.e.,
the probability of detecting a source given its magnitude). In a
realistic case, we might prepare a large number of sources with
randomly selected magnitudes, inject them into simulated images,
and then record which were detected at the end of the reduction
pipeline. As a toy example, we generate 100 data points with
randomly selected magnitudes between 20 and 30 and "observe" them
with a known detection function (here, the error function, with
50% detection probability at magnitude 25):
>>> from scipy.special import erf
>>> from scipy.stats.distributions import binom
>>> def true_efficiency(x):
... return 0.5 - 0.5 * erf((x - 25.) / 2.)
>>> mag = 20. + 10. * np.random.rand(100)
>>> detected = binom.rvs(1, true_efficiency(mag))
>>> bins, binshw, p, perr = binned_binom_proportion(mag, detected, bins=20)
>>> plt.errorbar(bins, p, xerr=binshw, yerr=perr, ls='none', marker='o',
... label='estimate')
.. plot::
import numpy as np
from scipy.special import erf
from scipy.stats.distributions import binom
import matplotlib.pyplot as plt
from astropy.stats import binned_binom_proportion
def true_efficiency(x):
return 0.5 - 0.5 * erf((x - 25.) / 2.)
np.random.seed(400)
mag = 20. + 10. * np.random.rand(100)
np.random.seed(600)
detected = binom.rvs(1, true_efficiency(mag))
bins, binshw, p, perr = binned_binom_proportion(mag, detected, bins=20)
plt.errorbar(bins, p, xerr=binshw, yerr=perr, ls='none', marker='o',
label='estimate')
X = np.linspace(20., 30., 1000)
plt.plot(X, true_efficiency(X), ls='-', color='r',
label='true efficiency')
plt.ylim(0., 1.)
plt.title('Detection efficiency vs magnitude')
plt.xlabel('Magnitude')
plt.ylabel('Detection efficiency')
plt.legend()
plt.show()
The above example uses the Wilson confidence interval to calculate
the uncertainty ``perr`` in each bin (see the definition of various
confidence intervals in `binom_conf_interval`). A commonly used
alternative is the Wald interval. However, the Wald interval can
give nonsensical uncertainties when the efficiency is near 0 or 1,
and is therefore **not** recommended. As an illustration, the
following example shows the same data as above but uses the Wald
interval rather than the Wilson interval to calculate ``perr``:
>>> bins, binshw, p, perr = binned_binom_proportion(mag, detected, bins=20,
... interval='wald')
>>> plt.errorbar(bins, p, xerr=binshw, yerr=perr, ls='none', marker='o',
... label='estimate')
.. plot::
import numpy as np
from scipy.special import erf
from scipy.stats.distributions import binom
import matplotlib.pyplot as plt
from astropy.stats import binned_binom_proportion
def true_efficiency(x):
return 0.5 - 0.5 * erf((x - 25.) / 2.)
np.random.seed(400)
mag = 20. + 10. * np.random.rand(100)
np.random.seed(600)
detected = binom.rvs(1, true_efficiency(mag))
bins, binshw, p, perr = binned_binom_proportion(mag, detected, bins=20,
interval='wald')
plt.errorbar(bins, p, xerr=binshw, yerr=perr, ls='none', marker='o',
label='estimate')
X = np.linspace(20., 30., 1000)
plt.plot(X, true_efficiency(X), ls='-', color='r',
label='true efficiency')
plt.ylim(0., 1.)
plt.title('The Wald interval can give nonsensical uncertainties')
plt.xlabel('Magnitude')
plt.ylabel('Detection efficiency')
plt.legend()
plt.show()
"""
x = np.ravel(x)
success = np.ravel(success).astype(np.bool)
if x.shape != success.shape:
raise ValueError('sizes of x and success must match')
# Put values into a histogram (`n`). Put "successful" values
# into a second histogram (`k`) with identical binning.
n, bin_edges = np.histogram(x, bins=bins, range=range)
k, bin_edges = np.histogram(x[success], bins=bin_edges)
bin_ctr = (bin_edges[:-1] + bin_edges[1:]) / 2.
bin_halfwidth = bin_ctr - bin_edges[:-1]
# Remove bins with zero entries.
valid = n > 0
bin_ctr = bin_ctr[valid]
bin_halfwidth = bin_halfwidth[valid]
n = n[valid]
k = k[valid]
p = k / n
bounds = binom_conf_interval(k, n, conf=conf, interval=interval)
perr = np.abs(bounds - p)
return bin_ctr, bin_halfwidth, p, perr
[docs]def biweight_location(a, c=6.0, M=None):
"""Compute the biweight location for an array.
Returns the biweight location for the array elements.
The biweight is a robust statistic for determining the central
location of a distribution.
The biweight location is given by the following equation
.. math::
C_{bl}= M+\\frac{\Sigma_{\|u_i\|<1} (x_i-M)(1-u_i^2)^2}
{\Sigma_{\|u_i\|<1} (1-u_i^2)^2}
where M is the sample mean or if run iterative the initial guess,
and u_i is given by
.. math::
u_{i} = \\frac{(x_i-M)}{cMAD}
where MAD is the median absolute deviation.
For more details, see Beers, Flynn, and Gebhardt, 1990, AJ, 100, 32B
Parameters
----------
a : array-like
Input array or object that can be converted to an array.
c : float
Tuning constant for the biweight estimator. Default value is 6.0.
M : float, optional
Initial guess for the biweight location.
Returns
-------
biweight_location : float
Returns the biweight location for the array elements.
Examples
--------
This will generate random variates from a Gaussian distribution and return
the median absolute deviation for that distribution::
>>> from astropy.stats.funcs import biweight_location
>>> from numpy.random import randn
>>> randvar = randn(10000)
>>> cbl = biweight_location(randvar)
See Also
--------
median_absolute_deviation, biweight_midvariance
"""
a = np.array(a, copy=False)
if M is None:
M = np.median(a)
# set up the difference
d = a - M
# set up the weighting
u = d / c / median_absolute_deviation(a)
# now remove the outlier points
mask = np.abs(u) < 1
u = (1 - u ** 2) ** 2
return M + (d[mask] * u[mask]).sum() / u[mask].sum()
[docs]def biweight_midvariance(a, c=9.0, M=None):
"""Compute the biweight midvariance for an array.
Returns the biweight midvariance for the array elements.
The biweight midvariance is a robust statistic for determining
the midvariance (i.e. the standard deviation) of a distribution.
The biweight location is given by the following equation
.. math::
C_{bl}= (n')^{1/2} \\frac{[\Sigma_{|u_i|<1} (x_i-M)^2(1-u_i^2)^4]^{0.5}}
{|\Sigma_{|u_i|<1} (1-u_i^2)(1-5u_i^2)|}
where :math:`u_i` is given by
.. math::
u_{i} = \\frac{(x_i-M)}{cMAD}
where MAD is the median absolute deviation.
:math:`n'` is the number of data for which :math:`|u_i| < 1` holds, while the
summations are over all i up to n:
.. math::
n' = \Sigma_{|u_i|<1}^n 1
This is slightly different than given in the reference below, but
results in a value closer to the true midvariance.
The midvariance parameter c is typically 9.0.
For more details, see Beers, Flynn, and Gebhardt, 1990, AJ, 100, 32B
Parameters
----------
a : array-like
Input array or object that can be converted to an array.
c : float
Tuning constant for the biweight estimator. Default value is 9.0.
M : float, optional
Initial guess for the biweight location.
Returns
-------
biweight_midvariance : float
Returns the biweight midvariance for the array elements.
Examples
--------
This will generate random variates from a Gaussian distribution and return
the median absolute deviation for that distribution::
>>> from astropy.stats.funcs import biweight_midvariance
>>> from numpy.random import randn
>>> randvar = randn(10000)
>>> scl = biweight_midvariance(randvar)
See Also
--------
median_absolute_deviation, biweight_location
"""
a = np.array(a, copy=False)
if M is None:
M = np.median(a)
# set up the difference
d = a - M
# set up the weighting
u = d / c / median_absolute_deviation(a)
# now remove the outlier points
mask = np.abs(u) < 1
u = u ** 2
n = mask.sum()
return n ** 0.5 * (d[mask] * d[mask] * (1 - u[mask]) ** 4).sum() ** 0.5\
/ np.abs(((1 - u[mask]) * (1 - 5 * u[mask])).sum())
[docs]def signal_to_noise_oir_ccd(t, source_eps, sky_eps, dark_eps, rd, npix,
gain=1.0):
"""Computes the signal to noise ratio for source being observed in the
optical/IR using a CCD.
Parameters
----------
t : float or numpy.ndarray
CCD integration time in seconds
source_eps : float
Number of electrons (photons) or DN per second in the aperture from the
source. Note that this should already have been scaled by the filter
transmission and the quantum efficiency of the CCD. If the input is in
DN, then be sure to set the gain to the proper value for the CCD.
If the input is in electrons per second, then keep the gain as its
default of 1.0.
sky_eps : float
Number of electrons (photons) or DN per second per pixel from the sky
background. Should already be scaled by filter transmission and QE.
This must be in the same units as source_eps for the calculation to
make sense.
dark_eps : float
Number of thermal electrons per second per pixel. If this is given in
DN or ADU, then multiply by the gain to get the value in electrons.
rd : float
Read noise of the CCD in electrons. If this is given in
DN or ADU, then multiply by the gain to get the value in electrons.
npix : float
Size of the aperture in pixels
gain : float
Gain of the CCD. In units of electrons per DN.
Returns
----------
SNR : float or numpy.ndarray
Signal to noise ratio calculated from the inputs
"""
signal = t * source_eps * gain
noise = np.sqrt(t * (source_eps * gain + npix *
(sky_eps * gain + dark_eps)) + npix * rd ** 2)
return signal / noise
[docs]def bootstrap(data, bootnum=100, samples=None, bootfunc=None):
"""Performs bootstrap resampling on numpy arrays.
Bootstrap resampling is used to understand confidence intervals of sample
estimates. This function returns versions of the dataset resampled with
replacement ("case bootstrapping"). These can all be run through a function
or statistic to produce a distribution of values which can then be used to
find the confidence intervals.
Parameters
----------
data : numpy.ndarray
N-D array. The bootstrap resampling will be performed on the first
index, so the first index should access the relevant information
to be bootstrapped.
bootnum : int
Number of bootstrap resamples
samples : int
Number of samples in each resample. The default `None` sets samples to
the number of datapoints
bootfunc : function
Function to reduce the resampled data. Each bootstrap resample will
be put through this function and the results returned. If `None`, the
bootstrapped data will be returned
Returns
-------
boot : numpy.ndarray
Bootstrapped data. Each row is a bootstrap resample of the data.
"""
if samples is None:
samples = data.shape[0]
# make sure the input is sane
assert samples > 0, "samples cannot be less than one"
assert bootnum > 0, "bootnum cannot be less than one"
if bootfunc is None:
resultdims = (bootnum,) + (samples,) + data.shape[1:]
boot = np.empty(resultdims)
else:
resultdims = (bootnum,)
boot = np.empty(resultdims)
for i in xrange(bootnum):
bootarr = np.random.randint(low=0, high=data.shape[0], size=samples)
if bootfunc is None:
boot[i] = data[bootarr]
else:
boot[i] = bootfunc(data[bootarr])
return boot
[docs]def mad_std(data):
"""
Calculate a robust standard deviation using the `median absolute
deviation (MAD)
<http://en.wikipedia.org/wiki/Median_absolute_deviation>`_.
The standard deviation estimator is given by:
.. math::
\\sigma \\approx \\frac{\\textrm{MAD}}{\Phi^{-1}(3/4)} \\approx 1.4826 \ \\textrm{MAD}
where :math:`\Phi^{-1}(P)` is the normal inverse cumulative
distribution function evaluated at probability :math:`P = 3/4`.
Parameters
----------
data : array-like
Data array or object that can be converted to an array.
Returns
-------
result : float
The robust standard deviation of the data.
Examples
--------
>>> from astropy.stats import mad_std
>>> from astropy.utils import NumpyRNGContext
>>> from numpy.random import normal
>>> with NumpyRNGContext(12345):
... data = normal(5, 2, size=(100, 100))
... mad_std(data) # doctest: +FLOAT_CMP
2.02327646594
"""
# NOTE: 1. / scipy.stats.norm.ppf(0.75) = 1.482602218505602
return median_absolute_deviation(data) * 1.482602218505602


Global Configuration Options¶
PyQtGraph has several global configuration options that allow you to change its
default behavior. These can be accessed using the setConfigOptions()
and
getConfigOption()
functions:
| Option | Type | Default | |
| leftButtonPan | bool | True | If True, dragging the left mouse button over a ViewBox causes the view to be panned. If False, then dragging the left mouse button draws a rectangle that the ViewBox will zoom to. |
| foreground | See mkColor() |
‘d’ | Default foreground color for text, lines, axes, etc. |
| background | See mkColor() |
‘k’ | Default background for GraphicsView . |
| antialias | bool | False | Enabling antialiasing causes lines to be drawn with smooth edges at the cost of reduced performance. |
| imageAxisOrder | str | ‘col-major’ | For ‘row-major’, image data is expected in the standard row-major (row, col) order. For ‘col-major’, image data is expected in reversed column-major (col, row) order. The default is ‘col-major’ for backward compatibility, but this may change in the future. |
| editorCommand | str or None | None | Command used to invoke code editor from ConsoleWidget. |
| exitCleanup | bool | True | Attempt to work around some exit crash bugs in PyQt and PySide. |
| useWeave | bool | False | Use weave to speed up some operations, if it is available. |
| weaveDebug | bool | False | Print full error message if weave compile fails. |
| useOpenGL | bool | False | Enable OpenGL in GraphicsView. This can have unpredictable effects on stability and performance. |
| enableExperimental | bool | False | Enable experimental features (the curious can search for this key in the code). |
| crashWarning | bool | False | If True, print warnings about situations that may result in a crash. |


{{global.greetMessage}}
Why @rxweb/translate?
- Simple, Maintainable and Readable Translation Code 🌈.
- Lazy Load Translation Content Component Wise with Angular PreLoadModule Stratergy.
- Language Translation By URL or Code .
- Automatic FormControl Error Message Translation.
- Powerful CLI with the features of Key Extraction, Optimize JSON, etc.


Introduction
Twisted is currently being ported to work with Python 3.3. This document covers Twisted-specific issues in porting your code to Python 3.
API Differences
twisted.python.failure
Failure.trap
raises itself (i.e. a Failure
) in Python 2. In Python 3,
the wrapped exception will be re-raised.
Byte Strings and Text Strings
Several APIs which on Python 2 accepted or produced byte strings
(instances of str
, sometimes just called bytes) have
changed to accept or produce text strings (instances of str
,
sometimes just called text or unicode) on Python 3.
From twisted.internet.address
, the IPv4Address
and IPv6Address
classes have had two attributes change from
byte strings to text strings: type
and host
.
twisted.python.log
has shifted significantly towards text
strings from byte strings. Logging events, particular those produced by a
call like msg("foo")
, must now be text strings. Consequently,
on Python 3, event dictionaries passed to log observes will contain text
strings where they previously contained byte strings.
twisted.python.runtime.platformType
and the return value
from twisted.python.runtime.Platform.getType
are now both text
strings.
twisted.python.filepath.FilePath
has not changed.
It supports only byte strings. This will probably require applications to
update their usage of FilePath
, at least to pass explicit byte
string literals rather than "native" string literals (which are text on
Python 3).
reactor.addSystemEventTrigger
arguments that were
previously byte strings are now native strings.
twisted.names.dns
deals with strings with a wide range of
meanings, often several for each DNS record type. Most of these strings
have remained as byte strings, which will probably require application
updates (for the reason given in the FilePath
section above).
Some strings have changed to text strings, though. Any string representing
a human readable address (for
example, Record_A
's address
parameter) is now a
text string. Additionally, time-to-live (ttl) values given as strings must
now be given as text strings.
twisted.web.resource.IResource
continues to deal with URLs
and all URL-derived values as byte strings.
twisted.web.resource.ErrorPage
has several string attributes
(template
, brief
, and detail
) which
were previously byte strings. On Python 3 only, these must now be text
strings.


Make the following sentences into one sentence:
Your solution:
Remember, here is what you do to compose a compound sentence:
- Change the period at the end of the first sentence into a comma.
- Add a conjunction."And" is a conjunction--and so are "but" and "or."
- Make sure you don't have unnecessary capitals in your sentence.
- In a compound sentence that shows a contrast, the comma goes before the word "but."


You can log in with this session information on the Common Sense platform to see what data has been sent to the server. Of course, change the credentials, as soon as you want to start the Sense services for yourself.
First start session


Today I’ve visited BRUG meetup and want to share my experience from it.
First of all I want to thank the organizers. You’ve done a great job guys! Secondly, the speakers. I didn’t feel bored at anytime. Furthermore, lot of tricky parts were discussed there. @leopard_me (Alexey Vasiliev) came to us from Kyiv and @akirill0v (Alexandr Kirillov) - from Moskov. It almost 500 miles for both! Guys, your talks were awesome.
I want to leave here some lines about each talk just for myself. So, here we go.


Log out
Welcome, {{user}}
Upload your CSV files here
{% for suggestion in subjects %} {%if suggestion != "none none none none none"%} {% endif %} {% endfor %}
Select a CSV file
Download PDF version of Attendance
{% for suggestion in subjects %} {%if suggestion != "none none none none none"%} {% endif %} {% endfor %}


FINAL FANTASY: THE SPIRITS WITHIN (a film review by Mark R. Leeper)
CAPSULE: This very dark sci-fi fantasy is magnificent visually but it has a nearly incoherent plot. FINAL FANTASY is a Japanese-American co-production entirely animated but with a very real three-dimensional look and with very real-looking characters. In the year 2065 aliens that appear to us as translucent images, but still very deadly creatures, have invaded Earth. Saving the Earth requires resorting to semi-mystical means to understand and halt the enemy. If this film had been done in live-action the scenes more spectacular than those of BLADERUNNER would have been hailed as a triumph. Rating: 6 (0 to 10), high +1 (-4 to +4)
The art of the animated film continues to evolve before our eyes at an incredible rate. It seems that one animated film after another is released and advances the art of animation. I personally was very impressed with the visual images created in TITAN A.E. But there are images in FINAL FANTASY that go well beyond the power of that film's animation. The one problem is that if I applaud this film it will have to be mostly on the imagination of the concepts and on the visuals. I don't think the story was a very good one. And the uncertain terms in which I say that are intentional. The telling of the story and the explanation of what is going on lies somewhere in the range between terse and incoherent. I frequently had no idea what was happening in the plot, thought FINAL FANTASY was never failed to be an enjoyable film to watch.
The greatest part of what was remarkable about the film was the animation work. The entire film is done in a three-dimensional technique. Every single image is as three-dimensional as a live action film. Of course, I am afraid one could always distinguish the images from real live action. And that is (intentionally) praising the animation with faint criticism. The computer- generated images were almost photographic. And what images they were! There were planet-scapes and futuristic battlefields. There were alien monsters of towering height. There were things that cannot be described; they have to be seen.
The story opens in 2065, with the Earth already mostly destroyed and conquered by a diaphanous life form from space. Well, not just one diaphanous life form, but a whole class of gossamer life forms. There are things that are insect-like and things that look like floating dragons. It is like a whole planet of creatures are cooperating and taking part in the invasion. Why? Dr. Sid (voiced by Donald Sutherland) and his protege Dr. Aki Ross (Ming- Na) want to find out. The creatures seem to burrow into the ground then attack with deadly potency. Humans have reacted by retreating to force-field protected cities. A guard of power- suited soldiers protects these cities and what is left of the human race. Dr. Sid believes in the Gaia theory that planets are like a living organism with self-protection mechanisms. Perhaps they can be triggered to protect the planet. But Sid and Aki have to act fast. Aki's body has been invaded by one form of the aliens' essence. AIDS-like it will prove deadly if the nature of the aliens is not better understood soon. Hironobu Sakaguchi, who is connected with the Final Fantasy video games wrote the story for this film as well as directed and acted as executive producer. Jeff Vintar and Al Reinert wrote the screenplay. Generally in an animated film of this sort, I complain that any starving actor could have gotten a good job doing the voice of an animated character. It usually seems wasteful and useless to give these voice roles to established and successful actors. In this film it really did serve a purpose. The animation technique makes the characters realistic and even gives them some marvelous facial expression, but it leaves them seeming cold and without much personality. That makes it hard to keep straight who is who. One thing that helped was that I found it easy to track four of the characters because they spoke with voices I immediately recognized. Those were Alec Baldwin, Steve Buscemi, Donald Sutherland, and James Woods. I probably should have recognized the voice of Ving Rhames, but did not. The main character is played by Ming-Na best known for her roles in THE JOY LUCK CLUB and in the various Disney productions in which she plays the Chinese historic figure Mulan. What is a little disconcerting is not that the voices are familiar, but that the faces do not resemble those of the actors. Dr. Sid may have unmistakably sounded like Donald Sutherland, but he looked very different. I kept expecting to see Dr. Sid with the Sutherland face.
This film from Square Pictures (whose logo is a rectangle) is animated to be just one step from live action. The viewer may come away not understanding the story or the future Earth on which is it set, but he will have seen some marvelous images set to the tune of some really terrible music. I rate the film a 6 on the 0 to 10 scale and a high +1 on the -4 to +4 scale.
Mark R. Leeper<EMAIL_ADDRESS>Copyright 2001 Mark R. Leeper
========== X-RAMR-ID: 28836 X-Language: en X-RT-ReviewID: 236432 X-RT-TitleID: 1108683 X-RT-AuthorID: 1426 X-RT-RatingText: 6/10
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


Plugins¶
iocage plugins are a simple and very fast method to get application containers installed and configured. At its core, a plugin is a jail specifically running one program. Popular programs can be installed repeatedly with one line. Additionally, plugins are easily extended by users, offering a high level of customizability and functionality.
In structure, a plugin consists of .json
manifest and
.png
icon files.
See what’s available
To see a list of all currently available plugins, open a command line and type iocage list -PR or iocage list --plugins --remote. The full iocage plugin list is also available on GitHub.
Check which plugins are installed on the system with iocage list --plugins or iocage list -P.
Getting started with plugins
Note
iocage needs to be activated before plugins can be installed or modified!
To get started, open a command line and type iocage fetch --plugins ip4_addr="IF|IP". This initial fetch also supports dhcp in the same manner as iocage create. The IP listed for the plugin needs to be a valid IP not already in use. Use the - -name flag to easily fetch a specific plugin:
$ iocage fetch --plugins --name plexmediaserver ip4_addr="igb0|<IP_ADDRESS>"
If available, plugins can also be fetched locally with iocage fetch -P the/path/to/plugin.json ip4_addr="re0|<IP_ADDRESS>"
Tip
Using iocage fetch locally is very useful when testing an in-development plugin.
After fetching a plugin, view of all its properties with iocage get -a NAME|UUID | less. Individual properties are found with iocage get PROPERTY:
$ iocage get type quasselcore
Adjust the plugin properties with iocage set:
$ iocage set PROPERTY quasselcore
iocage set is used to configure that plugin. In this example, a complete Quasselcore plugin is installed to a FreeNAS system, then the note of the plugin is changed:
[root@freenas ~]# iocage fetch --plugins --name quasselcore ip4_addr="em0|<IP_ADDRESS>"
[root@freenas ~]# iocage set notes="Hello world" quasselcore
[root@freenas ~]# iocage get notes quasselcore
Hello world
Upgrading and updating plugins
The process for upgrading and updating plugins is exactly the same as normal jails. See Updating Jails or Upgrading Jails .


This spec has moved to a new home. See https://github.com/decentralized-identity/peer-did-method-spec for the code, or https://identity.foundation/peer-did-method-spec/ for the rendered HTML. The final version of the spec as it existed in this repo is tagged as version 1.0 in the new location.


Topic README.md
Toribio: a Embedded Robotics Library.
Toribio is a library for developing robotics applications. It is based on Lumen cooperative scheduler, and allows to write coroutine, signal and callback based applications. Toribio provides a mechanism for easily accessing hardware, and is geared towards low end hardware, such as Single-Board Computers.
Description
Using Toribio consists of writing Toribio tasks. These tasks are started automatically. When writing these tasks, the programmer have easy access to available devices and to an asynchronous socket and file server. The tasks use Lumen as a cooperative scheduler, and thus can be synchronized exchanging signals. Signals also serve to exchange information between tasks. In any case, Lumen is a shared memory environment and all tasks live in the same VM, so tasks can declare global variables, etc.
Toribio provides the concept of Device. A Device is an object that represents, f.e. a motor, the mouse or a distance sensor. Devices provide methods that allow to manipulate them. Also, Devices can emit signals: for example, there could be a signal emitted when a button is pressed. These signals can be used trough callbacks: just register a function with Toribio to attend a signal from a Device.
Dependencies
Toribio runs on Lua 5.1 or LuaJIT. Compatibility with Lua 5.2 is planned.
The only external dependency is the nixio library.
Additionally, for automatically managing devices on file creation and removal the
inotifywait
program must be installed.
Tutorial
A tutorial is available here
Contents
- toribio.lua
The main library. This is the library that will be require'd by tasks to get access to devices, etc.
- toribio-go.lua
The launch script. Uses a configuration file to start tasks and provide them parameters.
- toribio-go.conf and sample-confs/
Configuration files. Will be available to tasks trough toribio library. Also determines what tasks to start.
- /deviceloaders/*
Here go tasks that are able to discover new devices and instantiate new Device objects. You may want to add tasks there to extend Toribio with support for new hardware
- /tasks/*
Here go user tasks, that implement the behaviour of the robot. A task can implement some intelligence, or be a remote control server, or just be a data logger, etc.
- /docs/*
Full API reference and additional documentation.
- Lumen/
The Lumen scheduler.
License
Same as Lua, see COPYRIGHT.
Who?
Copyright (C) 2012 Jorge Visca<EMAIL_ADDRESS>MINA Group, University of the Republic, Uruguay


5th International Conference on Advanced Production and Industrial Engineering (ICAPIE 2020) is being organized by CAPIER DTU during 15-17 December, 2020 at Singapore. The International Conference ICAPIE 2020, provides a forum to the best talents from the academia & research institutions, industry experts, designers, management professionals, engineers and executives to collaborate and address the current challenges, in order to explore new windows for discovery, innovation and advancements, promoting the contribution of Production and Industrial Engineering & Technology for a sustainable future. The conference is also aimed to promote synergetic partnership between academia and industry and also to show case the growth of cutting edge technology developed in the field of Production and Industrial Engineering in recent past. All full paper submissions will be peer-reviewed and evaluated based on originality, technical and/or research content/depth, correctness, relevance to conference, contributions, and readability.
Abstract submission starts:05 January 2020
Last date for Submission of Abstract: 05 July 2020
Notification for Decision: 15 July 2020
Last date for Submission of Full-length Papers:05 August 2020
Notification for Full-Length Papers: 15 August 2020
Last date for Registration: 05 September 2020
Conference Dates: 15-17 December 2020
ICAPIE 2020 proceedings consisting of peer-reviewed papers will be
published in
Scopus Indexed Journals
Selected Extended papers will be invited for submission to SCI / ESCI
Indexed Journals
| REGISTRATION FEE | INTERNATIONAL | INDIAN |
|---|---|---|
| Practitioners / Industrialists | USD 500/- | Rs. 36,000/- |
| Academicians | USD 400/- | Rs. 29,000/- |
| Students (Ph. D./ MTech / M.E / MBA /M. Sc.) | USD 350/- | Rs. 25,000/- |
| Co-authors / Attendees / Listeners | USD 300/- | Rs. 22,000/- |
EMail<EMAIL_ADDRESS>Facebook : https://www.facebook.com/icapie.delhi
Linkedin : in.linkedin.com/in/ICAPIE
Contact No. : +91-9654528868,<PHONE_NUMBER>0
We look forward to welcome you and also express our gratitude for your
kind consideration.
Best Regards,
Conference Chair
Dr. Ranganath M.
Singari , DTU, Delhi, India


The java.util.concurrent
package contains two new interfaces and four new classes:
CompletableFuture.AsynchronousCompletionTask
: A marker interface identifying asynchronous tasks produced by async methods.
CompletionStage<T>
: A stage of a possibly asynchronous computation, that performs an action or computes a value when another CompletionStage
completes.
CompletableFuture<T>
: A Future
that may be explicitly completed (setting its value and status), and may be used as a CompletionStage
, supporting dependent functions and actions that trigger upon its completion.
ConcurrentHashMap.KeySetView<K,V>
: A view of a ConcurrentHashMap
as a Set
of keys, in which additions may optionally be enabled by mapping to a common value.
CountedCompleter<T>
: A ForkJoinTask
with a completion action performed when triggered and there are no remaining pending actions.
CompletionException
: Exception thrown when an error or other exception is encountered in the course of completing a result or task.
The Collections Framework has undergone a major revision in Java 8 to add aggregate operations based on the newly added streams facility and lambda expressions. As a result, the ConcurrentHashMap
class introduces over 30 new methods in this release. These include various forEach
methods (forEach
, forEachKey
, forEachValue
, and forEachEntry
), search methods (search
, searchKeys
, searchValues
, and searchEntries
) and a large number of reduction methods (reduce
, reduceToDouble
, reduceToLong
etc.)
Other miscellaneous methods (mappingCount
and newKeySet
) have been added as well. As a result of the JDK 8 changes, ConcurrentHashMap
s (and classes built from them) are now more useful as caches. These changes include methods to compute values for keys when they are not present, plus improved support for scanning (and possibly evicting) entries, as well as better support for maps with large numbers of elements.
For complete details, see the
java.util.concurrent.ConcurrentHashMap
API specification.
Maintaining a single count, sum, etc. that is updated by possibly many threads
is a common scalability problem. This release introduces scalable updatable variable
support through
a small set of new classes (DoubleAccumulator
, DoubleAdder
, LongAccumulator
, LongAdder
), which internally employ contention-reduction techniques that provide huge throughput improvements as compared to Atomic
variables. This is made possible by relaxing atomicity guarantees in a way that is acceptable in most applications.
DoubleAccumulator
: One or more variables that together maintain a running double value updated using a supplied function.
DoubleAdder
: One or more variables that together maintain an initially zero double sum.
LongAccumulator
: One or more variables that together maintain a running long value updated using a supplied function.
LongAdder
: One or more variables that together maintain an initially zero long sum.
A static commonPool()
method is now available and appropriate for most applications. The common pool is used by any ForkJoinTask
that is not explicitly submitted to a specified pool. Using the common pool normally reduces resource usage (its threads are slowly reclaimed during periods of non-use, and reinstated upon subsequent use).
Two new methods (getCommonPoolParallelism()
and commonPool()
) have been added, which return the targeted parallelism level of the common pool, or the common pool instance, respectively.
A new StampedLock
class adds a capability-based lock with three modes for controlling read/write access (writing, reading, and optimistic reading). This class also supports methods that conditionally provide conversions across the three modes.
For complete details, see the java.util.concurrent.StampedLock
API documentation.


AP Top News at 10 p.m. EDT
WASHINGTON (AP) -- President Clinton is standing back and leaving decisions
in the Elian Gonzalez custody case to Attorney General Janet Reno. ''The
attorney general is leading the effort,'' presidential spokesman Joe Lockhart
said. Clinton said today that the boy should be promptly reunited with his
father, now that a federal court has ruled that Elian must stay in the United
States until the court decides whether he should get an asylum hearing. A
hearing was set for May 11.
South Korean Wartime Killings Documented
DOKCHON, South Korea (AP) -- South Korean soldiers and police, observed at
times by U.S. Army officers, executed more than 2,000 political prisoners
without trial in the early weeks of the Korean War, according to declassified
U.S. military documents and witnesses. Supreme commander Gen. Douglas MacArthur
became aware of at least one of the mass shootings, according to documents
originally classified ''top secret.'' The new information, detailed in reporting
by The Associated Press and a Korean researcher, substantiates what some
historians have long believed: Large numbers of South Korean leftists arrested
by the right-wing regime were secretly killed.
Service Marks Columbine Anniversary
LITTLETON, Colo. (AP) -- Coloradans fell silent while a church bell tolled 13
times in memory of the first anniversary of the nation's deadliest school
shooting. The bell tolled 13 times at 11:21 a.m. today, the precise moment two
teen-agers opened fire in Columbine High School on April 20, 1999. At private
ceremonies and public remembrances all day and into the night today, students,
staff, survivors and strangers came together to mark the moment that Dylan
Klebold and Eric Harris began the bloodbath, killing 12 students and a teacher
and wounding 26 before taking their own lives.
Ex-Cops Sentenced in Alcohol Killing
MEXICO CITY (AP) -- Six former Mexico City policemen convicted of the robbery
and murder by alcohol poisoning of an American student have been sentenced to up
to 98 years in prison. Frederick McPhail, 27, was found in his parked car
Chapultepec Park in Mexico City in November 1998. For their roles in the death,
Francisco Leon Gonzalez received 99 years in prison and Lucio Tapia Galindo
received 85 years, the daily newspaper Reforma reported Thursday. The two were
active police officers at the time of the crime. Their four accomplices had
retired from the force when McPhail died. Three of them received sentences of 79
years, while a fourth received 68 years, Reforma said.
Survey: Overweight Need More Exercise
ATLANTA (AP) -- The vast majority of overweight adults trying to shed pounds
aren't getting enough exercise, the government said today. A 1998 national
survey by the Centers for Disease Control and Prevention found that 53.8 percent
of American adults reported being overweight and that half of them were trying
to lose weight. Most of those trying to lose weight -- 62.7 percent -- were
exercising, but only 28 percent said they exercised 30 minutes a day at least
five days a week, the minimum government recommendation.


AlphaVantage API - GET Request
src
|
readme
Authentication Key
Keys are free of charge and simply require sign-up on
https://www.alphavantage.co/
.
request


{% extends "layout.html" %} {% block content %}
Looks like you haven't logged any swims yet - get to it!
{% else %}| Date | Swim Type | Stroke | Distance (in yards) | Time (in seconds) |
|---|---|---|---|---|
| {{ session.session_date }} | {{ session.swim_type }} | {{ session.swim_stroke }} | {{ session.swim_distance }} | {{ session.swim_time }} |


SFFocusViewLayout
open class SFFocusViewLayout: UICollectionViewLayout
SFFocusViewLayout
is a subclass of UICollectionViewLayout
for displaying focused content on UICollectionView which is
the largest cell of all.
By default, this UICollectionViewLayout has initialize a set of properties to work as designed.
-
Standard height for collapsed cells.
By default, this property is set to
100
.Parameter
Parameter standardHeight: The collapsed heightWarning
this property must be smaller than focusedHeightDeclaration
Swift
@IBInspectable open var standardHeight: CGFloat = 100
Parameters
standardHeight
The collapsed height
-
Featured height for focused cell.
By default, this property is set to
280
.Parameter
Parameter focusedHeight: The expanded heightWarning
this property must be greater than standardHeightDeclaration
Swift
@IBInspectable open var focusedHeight: CGFloat = 280
Parameters
focusedHeight
The expanded height
-
Drag Offset is the amount the user needs to scroll before the featured cell changes.
By default, this property is set to
180
.Parameter
Parameter dragOffset: The amount user needs to change cellDeclaration
Swift
@IBInspectable open var dragOffset: CGFloat = 180
Parameters
dragOffset
The amount user needs to change cell
-
Return the size of all the content in the collection view
Declaration
Swift
override open var collectionViewContentSize : CGSize
-
Return true so that the layout is continuously invalidated as the user scrolls
Declaration
Swift
override open func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool
-
Return the content offset of the nearest cell which achieves the nice snapping effect, similar to a paged UIScrollView
Declaration
Swift
open override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint
-
Return all attributes in the cache whose frame intersects with the rect passed to the method
Declaration
Swift
override open func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]?
-
Perform whatever calculations are needed to determine the position of the cells and views in the layout
Declaration
Swift
override open func prepare()
-
Returns the layout attributes for the item at the specified index path.
Declaration
Swift
override open func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes?


CM4 Details (outdated)¶
In cloudmesh, we are using the Python tool to implement a program that could remotely control cloud nodes provided by different organizations and run experiments in parallel.
The goal of cloudmesh
is to provide a platform that users could
directly control the nodes they have, like AWS, Azure, and OPENSTACK
instances. Users could decide to start, stop, destroy, create, resume,
and suspend different nodes without accessing the Console interfaces
of providers. Then users could install experiment environment, software,
and other required tools in these running nodes. Finally, an experiment
could be executed in running nodes by sending the commands from
cloudmesh
platform. Meanwhile, we embed the NoSQL database
cloudmesh
platform. Meanwhile, we embed the NoSQL database
MongoDB into cloudmesh for managing the nodes and experiments.
Getting the config object¶
from cloudmesh.cloud.configuration.config import Config
config = Config().data["cloudmesh"]
Getting values¶
To get values from the configurations, you can call level by level from top-down config.
MONGO_HOST = config["data.mongo.MONGO_HOST"]
Using the Counter file¶
CM4 keeps track of all the VMs running using counters for each VM. The counter file is located at
~/.cloudmesh/counter.yaml
Using the counter¶
from cloudmesh.cloud.configuration.counter import Counter
counter = Counter()
Data Scheme in MongoDB¶
There are three types of documents in MongoDB:
Node information in
cloud
collection. Different cloud service providers would return different schemas of node information. It is hard to manipulate different nodes’ information into same schema, so we decide to dump the return mesaage into MongoDB without any changes.Node’s experiment status in
status
collection. The document instatus
collection is going to save the information of experiments executed in a node.{'_id': node_id, 'status': status, 'currentJob': job_id, 'history' : the history of executed experiments in this node}
Experiment information in
job
collection.{'_id': experiment_id 'name': name, 'status': status, 'input': input_info, 'output': output_info, 'description': description, 'commands': commands}
Group information in
group
collection.{'cloud': cloud, 'name': name, 'size': size, 'vms': list_vms}
The Virtual Machine Provider¶
In cloudmesh
, we developed the cloudmesh-cloud/vm/Vm.py
class to
implement the operations for different virtual machines from AWS, Azure,
and Chameleon by using the python library Apache
Libcloud to interact with cloud service
providers.
The basic functions are:
- start(vm_name)
start the virtual machine with specified name
- stop(vm_name, deallocate)
stop the virtual machine with specified name
- resume(vm_name)
resume the suspended virtual machine with specified name
- suspend(vm_name)
suspend the running virtual machine with specified name
- destroy(vm_name)
destroy the virtual machine with specified name
- list()
list all virtual machine in your cloud service account
- status(vm_name)
show the working status of virtual machine with specified name
- info(vm_name)
show all information about the virtual machine with specified name
- get_public_ips(vm_name)
return the public ip of the virtual machine with specified name
- set_public_ip(vm_name, public_ip)
set the public ip for the virtual machine with specified name
- remove_public_ip(vm_name)
remove the public ip from virtual machine with specified name
Next we list some sample of running these functions for virtual machines in AWS, Azure and Openstack.
AWS VM Operations (Yu)¶
Before using the AWS Vm code, user has to update their AWS information
into cloudmesh.yaml
file in etc folder.
The Libcloud library has enough methods to support the operations for
managing virtual machines in AWS. We use a cloudmesh-cloud/vm/Aws.py
to create the driver based on the configuration to connect to AWS.
Inherit the Libcloud library, we did some modifications on
AWSDriver
to extend the operation. The create_node
method would
create a virtual machine in AWS based on the configuration of
cloudmesh.yaml
file
Here are some samples for running these operations by using
cloudmesh-cloud
:
First, user would create the virtual machine in AWS.
$ cms vm create
Collection(Database(MongoClient(host=['<IP_ADDRESS>:27017'],
document_class=dict, tz_aware=False, connect=True),
'cloudmesh'), 'cloud')
Thread: updating the status of node
Created base-cloudmesh-yuluo-4
PING <IP_ADDRESS> (<IP_ADDRESS>): 56 data bytes
--- <IP_ADDRESS> ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
VM Refactoring¶
In addition, in order to offer more flexibilities to our users, we also
developed vmrefactor (cloudmesh-cloud/vm/VmRefactor.py
) to allow
users to customize the flavors of their running instances and services
in different providers.
- resize(vm_name, size)
resize the virtual machine with specified size object
- confirm_resize(vm_name)
some providers requires confirmation message to complete resize() operation
- revert(vm_name)
revert a resize operation. Revert the virtual machine to previous status
- rename(vm_name, newname)
rename the virtual machine
- rebuild(vm_name, image)
rebuild the virtual machine to another image/OS with image object.
Currently, major providers usually charge users according to their usage. It might be finacially wise sometimes to shift between different service size to reduce unnecessary cost. VmRefactor is designed based on this idea to help users to achieve higher cost efficiency. VmRefactor can also help users navigate thier management tasks especially when they have many different tasks on the run=.


Why didn't I ever do this?
Recently I was working on a javascript project that someone else created. I needed to fix a few things and add a new feature. The person previously created this little log function that was part of the main object.
Now I know it's the simplest thing but totally takes care of having to delete console.log()
on code going to a production site. I know it's the little things but this is something I'm going to include in all my projects going forward.
- Previous: Hacking Code to Help a Friend
- Next: Taking Chances with No Regrets


Loading Spinner Template will allows to customize the data loading spinner as desired. to enable this option it is
mandatory to enable the showLoadingSpinner
property in grid table level configuration. Further
information can be found upon this topic in Data
Loading Spinner section.
As same as the all other templates, we can bind a specific property #ngDataTableLoadingSpinner
into
ng-template to indicates we are going to define a template by overriding Data Loading Spinner for indicates the
on-going data fetch operation.
The following example code block demonstrate the way of data table loading spinner template can be using. In here we uses simple text to override the native loading functionality.
Apart from the predefined format, users are facilitated with to define their own template as desired as below.


-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.
-
Friend Username
Wishlist update
Custom text from friend.  Check out this game. You should add this one to your wishlist too.


CONCEPT LAB is a dedicated time & space to foster innovation. Each month we focus on bringing together a group of creatives, the tech savvy, and the big dreamers, to develop or work on existing ideas. This isn't a place to necessarily land a job, or create one (but if you do, awesome!), this an environment to create without the bounderies of our day to day life and expectations. Lets work on ideas and products, small, weird, all shapes and sizes, all concepts and thoughts, without the worry of it being an actual job, an actual life savings on a start up... lets just create for the sake of creating.
Lorem ipsum dolor sit amet, diam accusamus eam te, dicta vocent duo ne. Sit id ullum lobortis expetendis. Alia tacimates principes id sit, nec ferri aliquam euripidis ex, ea convenire ullamcorper vix. Te nec zril euismod perpetua. Pri ad enim eros omittam, ex est summo bonorum dolores. Eu eum mundi percipit ocurreret, elit delicata quo id. Te nominavi inimicus sea.
 Alia tacimates principes id sit, nec ferri aliquam euripidis ex, ea convenire ullamcorper vix. Te nec zril euismod perpetua. Pri ad enim eros omittam, ex est summo bonorum dolores. Eu eum mundi percipit ocurreret, elit delicata quo id.
Our templates are updated regularly so they don't break.
You can use this theme as is, or you can make changes!
We update dependencies to keep things fresh.
You have to make your websites with love these days!
Click below to learn more about the collaborations that started with Concept Lab.
If you have any questions or would like to contribute as a speaker, host an event in your space, etc, we are here to chat! Give us a call or send us an email and we will get back to you as soon as possible!
7045078130


|
||||||||
| PREV NEXT | FRAMES NO FRAMES |
| self.philbrown.* |
|---|
| self.philbrown.cssparser.FontFace | ||
|---|---|---|
public static final int |
FONT_WEIGHT_BOLD |
1 |
public static final int |
FONT_WEIGHT_NORMAL |
0 |
| self.philbrown.cssparser.ParserConstants | ||
|---|---|---|
public static final int |
ACTIVE |
3 |
public static final int |
AFTER |
10 |
public static final int |
AT |
123 |
public static final int |
AT_RULE |
137 |
public static final int |
BEFORE |
9 |
public static final int |
CARET |
124 |
public static final int |
CARET_EQUAL |
120 |
public static final int |
CHECKED |
26 |
public static final int |
COLON |
104 |
public static final int |
COMMA |
103 |
public static final int |
COMMENT |
133 |
public static final boolean |
DEBUG |
false |
public static final int |
DISABLED |
25 |
public static final int |
DOLLAR |
125 |
public static final int |
DOLLAR_EQUAL |
121 |
public static final int |
DOT |
101 |
public static final int |
DOUBLE_COLON |
134 |
public static final int |
DOUBLE_QUOTE |
136 |
public static final int |
EMPTY |
22 |
public static final int |
ENABLED |
24 |
public static final char |
EOF |
1000 |
public static final char |
EOFCHAR |
65535 |
public static final int |
EQUAL |
117 |
public static final int |
FIRST_CHILD |
8 |
public static final int |
FIRST_LETTER |
6 |
public static final int |
FIRST_LINE |
7 |
public static final int |
FIRST_OF_TYPE |
12 |
public static final int |
FOCUS |
5 |
public static final int |
GT |
112 |
public static final int |
HASH |
102 |
public static final int |
HOVER |
4 |
public static final int |
IDENTIFIER |
127 |
public static final int |
LANG |
11 |
public static final int |
LAST_CHILD |
20 |
public static final int |
LAST_OF_TYPE |
13 |
public static final int |
LEFT_CURLY_BRACKET |
128 |
public static final int |
LEFTPAREN |
109 |
public static final int |
LEFTSQ |
106 |
public static final int |
LINK |
1 |
public static final int |
LT |
113 |
public static final int |
MINUS |
108 |
public static final int |
NOT |
27 |
public static final int |
NOT_EQUAL |
116 |
public static final int |
NTH_CHILD |
16 |
public static final int |
NTH_LAST_CHILD |
17 |
public static final int |
NTH_LAST_OF_TYPE |
19 |
public static final int |
NTH_OF_TYPE |
18 |
public static final int |
NULL |
140 |
public static final int |
NUMBER |
126 |
public static final int |
ONLY_CHILD |
15 |
public static final int |
ONLY_OF_TYPE |
14 |
public static final int |
OR |
114 |
public static final int |
OR_EQUAL |
118 |
public static final int |
PERCENT |
138 |
public static final int |
PLUS |
115 |
public static final int |
RIGHT_CURLY_BRACKET |
129 |
public static final int |
RIGHTPAREN |
110 |
public static final int |
RIGHTSQ |
107 |
public static final int |
ROOT |
21 |
public static final int |
SELECTION |
28 |
public static final int |
SEMICOLON |
105 |
public static final int |
SINGLE_QUOTE |
135 |
public static final int |
SLASH |
132 |
public static final int |
SLASH_STAR |
130 |
public static final int |
SPACE |
139 |
public static final int |
STAR_SLASH |
131 |
public static final int |
TARGET |
23 |
public static final int |
TIMES |
111 |
public static final int |
TIMES_EQUAL |
119 |
public static final int |
VISITED |
2 |
|
||||||||
| PREV NEXT | FRAMES NO FRAMES |


Animals
Select an
animal
you want to know more about
Lion
Tiger
Zebra
Cheetah
Info
Animal
Habitat
Lifespan
Endangered
Lion
Africa
10-14 years
No
Tiger
Asia
20-26 years
Yes
Zebra
Africa
20-30 years
No
Cheetah
Africa
10-12 years
Yes


The icon module allows direct access to the Skin iconography via inline SVG or background SVG.
NOTE: inline SVG will inherit the color of it's containing element; this behaviour can be useful when crafting custom buttons and controls.
To avoid gigantic SVG icons when in a non-CSS (edge-case) state, we use the SVG width and height attributes to override the default 300x150 size.
See the @ebay/skin/svg module for instructions on how to import SVG symbols, and yes, we will be adding more icons in an upcoming release!
Background SVGs have a fixed stroke colour. This colour cannot be changed via CSS.


Tracking Paenibacillus vortex bacteria in time-lapse microscopy images @ openFIESTA
Optical Flow & Particle Filter.
Several bacterial species can form complicated growth patterns on a wide variety of environmental conditions. Because the development of such complex structures requires self-organization and cooperative behavior of individual cells, the study of microbial pattern formation has been a basis for understanding intricate biological and social phenomena such as multicellularity.
P. vortex generates swarming patterns with leading groups of cells containing tens to thousands of bacteria that cooperatively whirl around a common center. These vortices expand in size and move outward as a unit, leaving behind a trail -the vortex branch-. Although vortices are easy to identify, its dynamics are quite complicated and include attraction, repulsion, merging, and splitting; hence the task of tracking these moving structures imposes a challenge that is interdisciplinary at its core.
This project aims to explore the use of optical flow to identify swarming structures in spatial time series data of microbial dynamics, which are then sequentially mapped to statistical models that can help us to develop some understanding of these bacteria’s motility.
The Swarm @ biotexturas
DAO, biotic games, OSH, and beyond.
The Swarm is a decentralized and diverse research group that study microbes, not in an ordinary way, but through building open-source hardware (e.g. HomeScope, an open-source robotic microscope) and playing My Swarm, a (biotic) game that operates on the biological process of adaptation and computation of swarming bacteria living in complex habitats.
In the gamified context of the project, The Swarm is a group of researchers-players who build their HomeScope, a microscope turned into a game console, along with the game cartridges (simple microfluidic devices) where soil bacteria grow, develop and expand over its surface. In these cell-ecosystem machines, computer vision and machine learning algorithms abstract living biological structures and map them into game elements that make up My Swarm, which creates a virtual ecology where real bacterial cultures living in different HomeScope consoles can compete and play, providing an ecological context for the directed evolution of game-winner strains.
Our vision is deeply motivated by the idea of making science accessible for everyone and decentralized, which is why we are learning how to run My Swarm on a blockchain’s virtual machine and tokenize observations of natural history (strain’s data) made by people.
HomeScope 🔬
An open-source microscope with a robotized XYZ stage.
Homemade RaspiCam/Arduino-based digital microscope system capable of recording video and image capture (time-lapse microscopy) while robotically scanning a sample. The HomeScope as a whole package is not only a DIY biologist solution for developing robotic microscopy capabilities for the home laboratory but also a means to learn (and teach) subjects across disciplines.
This open-source project is being developed collectively by biotexturas and collaborators.


--- layout: page title: Track Zoom Configuration lead: Set an array of zoom levels in samples per pixel. Multiple canvas elements are used to avoid maximum dimension limits. excerpt: Set an array of zoom levels in samples per pixel. Multiple canvas elements are used to avoid maximum dimension limits. permalink: track-zoom.html javascript: track-zoom.js audio_title: Starlight audio_artist: Muse ---


In today’s heated cellular market, companies must engineer new features to keep them from falling behind competitors. Company flagships are often released within the same time-bracket of others. Today we’ll be looking at Samsung’s new titan upgraded from last year’s galaxy line up, the s7 edge and Apple's famous iPhone which has long dominated the market.
The Samsung s7 specs:
The iPhone 7 specs:
          These two products are made to compete against the others directly but in entirely different ways. Both designed to be part of their respective flagship phones' line up. Both are the most expensive of the phones the market. The first difference is in the hardware. The iPhone 7 plus is larger but both have the same screen size at 5.5 inches. Both have distinguishing features, s7 with its edge capabilities and apple with its 3D touch. The stereo speakers on the iPhone are not only louder but more immersive. But the s7 soars with a higher rating of waterproofing at ip68 rating higher than iPhone’s ip67 giving excuse to its weak speakers. In battery life, the s7 has double the battery life of the iPhone. But they burn at the same pace because of the added pixel density on the s7. The edge also pulls ahead with the new Qualcomm Quick Charge 2.0 technology charging at a much higher rate than the iPhone’s lightning port. Their cameras are very similar at 12 megapixels and both phones have amazing color saturation and contrast in the day time. The s7 only has a 1.1 aperture while the iPhone has a 1.7 aperture. The iPhone can capture many more details then the s7 with its telephoto lenses. The s7 makes up with its laser focusing, focusing almost the instant an object is introduced. If you value looks, design, memory expandability and a plethora of features the s7 is the way to go. Otherwise go with the iPhone’s camera, reliability, consistency and smoothness of the iPhones software.
          In conclusion, the Samsung Galaxy s7 emerges victorious. Frankly, it is just a better made phone. It is designed with better features, cheaper and has an audio jack. Clearly, the Samsung Galaxy s7 is better.


This is my first webpage.
Isn't it nice!
Here are some things I'm going to learn about coding:
Here is a link to my favorite things.


Communities
MSG communities are a great place to find other people that share your passions! Make friends, learn tips & tricks, and more!
{% extends "communities/layout.html" %} {% block pre_community_content %}
MSG communities are a great place to find other people that share your passions! Make friends, learn tips & tricks, and more!


Navigation
index
modules
|
Knowledge mining with python 0.0.1 documentation
»
Index
Index
A
|
E
|
G
|
K
|
M
|
O
|
R
|
S
|
T
A
add_result_to_database() (knowmine.OutputfileGenerator.Output method)
add_result_to_excel() (knowmine.OutputfileGenerator.Output method)
E
extract_relevant_sentences() (in module knowmine)
ExtractKeywords() (in module knowmine.KeywordsExtractor)
G
get_file_names() (in module knowmine.FilesReader)
get_relevant_sentences() (knowmine.RelevantSentencesExtractor.RelevantSentences method)
get_sentences() (in module knowmine)
(knowmine.AllSentencesExtractor.SentencesExtraction method)
getText() (knowmine.TextExtractor.TextExtraction method)
K
knowmine
module
knowmine.AllSentencesExtractor
module
knowmine.FilesReader
module
knowmine.KeywordsExtractor
module
knowmine.OutputfileGenerator
module
knowmine.RelevantSentencesExtractor
module
knowmine.TextExtractor
module
M
module
knowmine
knowmine.AllSentencesExtractor
knowmine.FilesReader
knowmine.KeywordsExtractor
knowmine.OutputfileGenerator
knowmine.RelevantSentencesExtractor
knowmine.TextExtractor
O
Output (class in knowmine.OutputfileGenerator)
R
RelevantSentences (class in knowmine.RelevantSentencesExtractor)
S
SentencesExtraction (class in knowmine.AllSentencesExtractor)
T
TextExtraction (class in knowmine.TextExtractor)
Quick search
Navigation
index
modules
|
Knowledge mining with python 0.0.1 documentation
»
Index


{% extends 'base.html' %} {% load static %} {% block content %}
Food is cooked in hygienic conditions to ensure good health.
Your food will be delivered at your doorstep. To ensure contactless delivery, the food parcel is kept at your doorstep.
The temperature of the delivery boy is checked and ensured if he is in good health
Shop By Restaurants
{{message}}
{% endfor %}


{{ notification.notification }}
You're getting this email because you've signed up for email updates.unsubscribe here.


This form is for testing purposes. On success the services returns a 201 response (which you don't see).
User Name
Password
Email
Get name of user currently logged in
Force Log-In


Archive information window consist of
fourteen labels and one button.
| Item | Description |
| Archive | File name. |
| Files count | Inside archive. |
| Source size | Source files size before compression. |
| Compress size | Compression size. |
| Ratio | Compression ratio. |
| Encryption | Encryption state of files. |
| Preprocess | Bigraph preprocessing state of files. |
| Method | Compression method. |
| Level | Compression level. |
| Dictionary | Dictionary size. |
| Match | Minimum and maximum search match length. |
| Threads | Compression threads number. |


All (good) relationships are dependant on trust. This becomes obvious when trying to build relationships, but its maintenance can be more easily overlooked. This chapter made me think more about maintaining good relationships through trust, but I have not gone out of my way to test or practice the proposed techniques.
Mindful and empathic listening are things I practice more often now, mostly only during informal conversation. It is usually triggered by realisations that I may be talking too much, and so decided to step back and focus on listening to the other person. This is a good habit.
The loving kindness meditation can alter your negative perceptions of a person. It was challenging holding onto feelings of love and kindness while visualising someone I did not like, but found that making the effort was beneficial in releasing negative feelings toward that person.
The month is September, a very busy time for students in their last semester of an undergraduate art degree. Official art history and theory lectures have been replaced at this time with less formal lectures hosted by guests from outside of the university, with varying successes and experiences in the art world network. Only one tutor has been tasked with conducting and organising this course. They have done a really great job, getting a diverse group of interesting people to talk weekly to students about their working-world experience. The last lecture will be given by a somewhat recent graduate and daughter of another tutor. Their father is overwhelmingly proud of them, and is definitely not missing their academic debut. The potential hundreds of other recently graduated, practicing artists who would be thrilled for this opportunity are not contacted, as this is more convienient.
I can't believe I'm going to sit through this, everyone else is boycotting this lecture and now I fully understand why. A ten minute late start, we've never waited this long on account of not everyone having arrived yet. The speaker spends these ten minutes talking to my tutor openly about another artist's work which they describe as 'trendy', as in not authentic or something. They assume no one else in this room knows who they are speaking of. The artist in question is my friend and I am getting upset, this is trash and unprofessional.
The power-point consists of their miraculously linear progression from art school; 'heres some work I made in first, second and third year'. I hate this kind of painting. 'Then I went to New York less than a summer later'. Her father continuously interjects with his own stories about their trip. He's a tutor and this is crossing way too many boundaries. Other students are looking on with fear and inadequecy, some of us are stuggling to afford to eat and I very much doubt any of us are making it to New York.
The lecture continues with 'then I did this show which my father organised', 'then we went to Venice and other parts of Europe because Documenta, and the Venice Biennale coincide this year and we really recommend going in 2027 when they are in alignment again', and then 'I got a studio which I charge other artists exorbitant rent for'.
 This is gross. A friend and myself put together an email outlining our discomforts and the overall hostility of the experience; I am exhausted, already dealing with the university on other accounts and now have to face this head-on in an ethics meeting.
Tutor A: I have had to depend on my own resources and contacts to put together this course with not much help from the university. Resources are stretched and this makes it harder to do my job, for example; late-notice cancellations are just one of the things I solely had to troubleshoot during this programme. I may very be feeling quite ready for this course to be over. This is the finale lecture, so thought student's could hear from someone closer to their situation. I know this speaker quite well and can trust that they will commit their time. I've asked them to speak about their experiences post-art school, but these are only loose guidelines. It's not required that we approve or check the lecture content beforehand.
Speaker: I'm excited to be offered this position to speak to students and assume a role-model position. Assuming these students want the same successes as myself, I will share them and offer advice. Having the support of my father and Tutor A feels great. Tutor A is a family friend, but is also very successful, so making our closeness known makes me too feel important. There are family expectations that I do well in painting, it is assumed that my talents are a birth-right and so I worry that others may out perform me. I may be feeling defensive as some people assume I have not had to work as hard as others for my success. These insecurities may manifest in me denying my privilege and belittling others to regain feelings of power. I may not be accurately portraying myself in this setting because of these feelings.
The above political awareness exercise was cathartic, but I'm feeling bad for it. I felt that crossing into the space of psychologising, not empathising, was too easy and this felt hurtful.


SpotSpot
Spotify mini-player for macOS
SpotSpot is an open-source (MIT license), always on-top, mini-player for controlling Spotify in macOS. It is an Electron-based app, and utilises André Haveman’s excellent Spotify-Node-Applescript package.
SpotSpot is not affiliated with Apple, Spotify or Muse and these are the trademarks of the respective parties.


|
| static Quaternion | CreateLookAtRotation (Vector3< float > const &from, Vector3< float > const &to, Vector3< float > const &up) |
| |
|
static Quaternion | Rotate (Quaternion const &source, float angle, Vector3< float > const &axis) |
| |
|
static Quaternion | Mix (Quaternion const &a, Quaternion const &b, float f) |
| |
| static Quaternion | Lerp (Quaternion const &a, Quaternion const &b, float f) |
| |
| static Quaternion | Slerp (Quaternion const &a, Quaternion const &b, float f) |
| |
| static Quaternion | Bilerp (Quaternion const &q00, Quaternion const &q10, Quaternion const &q01, Quaternion const &q11, float x, float y) |
| |
| Ocular::Math::Quaternion::Quaternion |
( |
float |
angle, |
|
|
Vector3< float > const & |
axis |
|
) |
| |
- Parameters
-
| [in] | angle | Angle to rotate in degrees |
| [in] | axis | Axis to rotate around |
Performs bilinear quaternion interpolation and returns the result quaternion.
- Parameters
-
| [in] | q00 | "Lower-left" starting point for interpolation (x == 0.0 && y == 0.0) |
| [in] | q10 | "Lower-right" ending point for interpolation (x == 1.0) |
| [in] | q01 | "Upper-left" ending point for interpolation (y == 1.0) |
| [in] | q11 | "Upper-right" ending point for interpolation (x == 1.0 && y == 1.0) |
- Returns
- The resulting Quaternion (not normalized).
Creates a LookAt Quaternion rotation.
- Note
- The result may need to be reversed depending on end use-case (see getConjugate)
- Parameters
-
| [in] | from | Point in space to be looking from (aka eye point) |
| [in] | to | Point in spaceto be looking towards |
| [in] | up | The up vector. In most cases, this is the World up vector (Matrix3f::Up()) |
| Quaternion Ocular::Math::Quaternion::getConjugate |
( |
| ) |
const |
For internal use only. Only modify this pointer if you want your application to crash.
| Quaternion Ocular::Math::Quaternion::getInverse |
( |
| ) |
const |
| Quaternion Ocular::Math::Quaternion::getNormalized |
( |
| ) |
const |
| void Ocular::Math::Quaternion::inverse |
( |
| ) |
|
Performs linear quaternion interpolation and returns the resulting quaternion.
- Parameters
-
| [in] | a | The starting Quaternion (result == a when t == 0.0). |
| [in] | b | The ending Quaternion (result == b when t == 1.0). |
| [in] | f | Fractional value [0.0, 1.0] |
- Returns
- The resulting Quaternion (not normalized).
| void Ocular::Math::Quaternion::normalize |
( |
| ) |
|
Performs spherical interpolation and returns the resulting quaternion.
- Parameters
-
| [in] | a | The starting Quaternion (result == a when t == 0.0) |
| [in] | b | The ending Quaternion (result == b when t == 1.0) |
| [in] | f | Fractional value [0.0, 1.0] |
- Returns
- The resulting Quaternion (not normalized).
The documentation for this class was generated from the following files:
- C:/Projects/OcularEngine/OcularCore/include/Math/Quaternion.hpp
- C:/Projects/OcularEngine/OcularCore/src/Math/Quaternion.cpp


Fylo stores your most important files in one secure location
Access them wherever you need, share and collabrate with
friends, family and co-workers.
The ability to use a smartphone, tablet, or computer
to access your account means your files follow you
everywhere
2-factor authentication and user-controlled encryption are
just a couple of the securityfeatures we allow to help
secure your files
The ability to use a smartphone, tablet, or computer
to access your account means your files follow you
everywhere
The ability to use a smartphone, tablet, or computer
to access your account means your files follow you
everywhere
Never let location be an issue when accessing your files. Fylo has you
covered for all of your file storage needs.
Securely share files and folders with friends , family and collegeaues for live
collabration. No email attachments required.
Fylo has improved our team productivity by
an order of magnitude. Since making the
switch our team has become a well-oiled
collabration machine
Sumukh VR
Fylo has improved our team productivity by
an order of magnitude. Since making the
switch our team has become a well-oiled
collabration machine
Sumukh VR
Fylo has improved our team productivity by
an order of magnitude. Since making the
switch our team has become a well-oiled
collabration machine
Sumukh VR
It only takes a minute to sign up and our free starter tier is extremely generous. If you have any
questions, our support team woulld be happy to help you


Reese Witherspoon revealed that she turned down reprising her ‘Friends’ role because she was ‘too scared’ of the live audience
by Olivia Singh- Reese Witherspoon said that she turned down an offer to return to “Friends” as Jill Green because she was “too nervous” to film in front of a live studio audience.
- “I was too scared,” Witherspoon said during an interview with “The Morning Show” costar Jennifer Aniston, who played older sibling Rachel Green on “Friends,” for the Associated Press.
- Visit Insider’s homepage for more stories.
Reese Witherspoon says that she declined an offer to return to “Friends” as Jill Green because she was “too nervous” to film in front of a live studio audience.
“Did you know they asked me back and I said I can’t do it? I was too scared,” Witherspoon said during an interview with “The Morning Show” costar Jennifer Aniston for the Associated Press.
In response, Aniston, who played older sister Rachel Green on NBC’s “Friends,” appeared surprised and jokingly said: “How dare. You got scared?”
Witherspoon went on to say that her nerves got the better of her and she finds shows with live audiences like NBC’s “Saturday Night Live,” which she hosted once in 2015, “terrifying.”
 Witherspoon shared similar compliments during an interview with Natalie Portman for Harper’s Bazaar.
“She was so sweet to me,” Witherspoon said of meeting Aniston while playing her sibling for two episodes during season six of “Friends.”
“I was really nervous, and she was like, ‘Oh, my gosh – don’t worry about it!'” Witherspoon added.  They would change all the lines and she was just so effortlessly affable, bubbly, and sunny. We’ve been friends ever since.”
Watch the video below.
- Read more:
- Reese Witherspoon taught Jimmy Fallon a popular TikTok move that her 16-year-old son showed her
- Jennifer Aniston and Reese Witherspoon recreated the Green sisters’ iconic moment from ‘Friends’
- Reese Witherspoon recalls first meeting Jennifer Aniston while nervously taping ‘Friends’: ‘She was so sweet to me’