pyemu package¶
Subpackages¶
Submodules¶
pyemu.en module¶
-
class
pyemu.en.
Ensemble
(*args, **kwargs)[source]¶ Bases:
pandas.core.frame.DataFrame
- The base class type for handling parameter and observation ensembles.
- It is directly derived from pandas.DataFrame. This class should not be instantiated directly.
Parameters: - *args (list) – positional args to pass to pandas.DataFrame()
- **kwargs (dict) – keyword args to pass to pandas.DataFrame(). Must contain ‘columns’ and ‘mean_values’
Returns: Ensemble
Return type: -
as_pyemu_matrix
(typ=<class 'pyemu.mat.mat_handler.Matrix'>)[source]¶ Create a pyemu.Matrix from the Ensemble.
Parameters: typ (pyemu.Matrix or derived type) – the type of matrix to return Returns: pyemu.Matrix Return type: pyemu.Matrix
-
drop
(arg)[source]¶ overload of pandas.DataFrame.drop()
Parameters: arg (iterable) – argument to pass to pandas.DataFrame.drop() Returns: Ensemble Return type: Ensemble
-
dropna
(*args, **kwargs)[source]¶ overload of pandas.DataFrame.dropna()
Parameters: - *args (list) – positional args to pass to pandas.DataFrame.dropna()
- **kwargs (dict) – keyword args to pass to pandas.DataFrame.dropna()
Returns: Ensemble
Return type:
-
draw
(cov, num_reals=1, names=None)[source]¶ - draw random realizations from a multivariate
- Gaussian distribution
Parameters: - cov (pyemu.Cov) – covariance structure to draw from
- num_reals (int) – number of realizations to generate
- names (list) – list of columns names to draw for. If None, values all names are drawn
-
plot
(bins=10, facecolor='0.5', plot_cols=None, filename='ensemble.pdf', func_dict=None, **kwargs)[source]¶ plot ensemble histograms to multipage pdf
Parameters: - bins (int) – number of bins
- facecolor (str) – color
- plot_cols (list of str) – subset of ensemble columns to plot. If None, all are plotted. Default is None
- filename (str) – pdf filename. Default is “ensemble.pdf”
- func_dict (dict) – a dict of functions to apply to specific columns (e.g., np.log10)
- **kwargs (dict) – keyword args to pass to plot_utils.ensemble_helper()
Returns: Return type: None
-
classmethod
from_dataframe
(**kwargs)[source]¶ class method constructor to create an Ensemble from a pandas.DataFrame
Parameters: **kwargs (dict) – optional args to pass to the Ensemble Constructor. Expects ‘df’ in kwargs.keys() that must be a pandas.DataFrame instance Returns: Ensemble Return type: Ensemble
-
class
pyemu.en.
ObservationEnsemble
(pst, **kwargs)[source]¶ Bases:
pyemu.en.Ensemble
Ensemble derived type for observations. This class is primarily used to generate realizations of observation noise. These are typically generated from the weights listed in the control file. However, a general covariance matrix can be explicitly used.
Note
Does not generate noise realizations for observations with zero weight
-
copy
()[source]¶ overload of Ensemble.copy()
Returns: ObservationEnsemble Return type: ObservationEnsemble
-
names
¶ property decorated method to get current non-zero weighted column names. Uses ObservationEnsemble.pst.nnz_obs_names
Returns: list – non-zero weight observation names Return type: list
-
mean_values
¶ property decorated method to get mean values of observation noise. This is a zero-valued pandas.Series
Returns: mean_values Return type: pandas Series
-
draw
(cov, num_reals)[source]¶ draw realizations of observation noise and add to mean_values Note: only draws noise realizations for non-zero weighted observations zero-weighted observations are set to mean value for all realizations
Parameters: - cov (pyemu.Cov) – covariance matrix that describes the support volume around the mean values.
- num_reals (int) – number of realizations to draw
-
nonzero
¶ property decorated method to get a new ObservationEnsemble of only non-zero weighted observations
Returns: ObservationEnsemble Return type: ObservationEnsemble
-
classmethod
from_id_gaussian_draw
(pst, num_reals)[source]¶ this is an experiemental method to help speed up independent draws for a really large (>1E6) ensemble sizes.
Parameters: - pst (pyemu.Pst) – a control file instance
- num_reals (int) – number of realizations to draw
Returns: ObservationEnsemble
Return type:
-
to_binary
(filename)[source]¶ write the observation ensemble to a jco-style binary file. The ensemble is transposed in the binary file so that the 20-char obs names are carried
Parameters: filename (str) – the filename to write Returns: Return type: None Note
The ensemble is transposed in the binary file
-
classmethod
from_binary
(pst, filename)[source]¶ instantiate an observation obsemble from a jco-type file
Parameters: - pst (pyemu.Pst) – a Pst instance
- filename (str) – the binary file name
Returns: oe
Return type:
-
phi_vector
¶ property decorated method to get a vector of L2 norm (phi) for the realizations. The ObservationEnsemble.pst.weights can be updated prior to calling this method to evaluate new weighting strategies
Returns: pandas.DataFrame Return type: pandas.DataFrame
-
-
class
pyemu.en.
ParameterEnsemble
(pst, istransformed=False, **kwargs)[source]¶ Bases:
pyemu.en.Ensemble
- Ensemble derived type for parameters
- implements bounds enforcement, log10 transformation, fixed parameters and null-space projection Note: uses the parnme attribute of Pst.parameter_data from column names and uses the parval1 attribute of Pst.parameter_data as mean values
Parameters: - pst (pyemu.Pst) – The ‘columns’ and ‘mean_values’ args need for Ensemble are derived from the pst.parameter_data.parnme and pst.parameter_data.parval1 items, respectively
- istransformed (bool) – flag indicating the transformation status (log10) of the arguments be passed
- **kwargs (dict) – keyword arguments to pass to Ensemble constructor.
- bound_tol (float) – fractional amount to reset bounds transgression within the bound. This has been shown to be very useful for the subsequent recalibration because it moves parameters off of their bounds, so they are not treated as frozen in the upgrade calculations. defaults to 0.0
Returns: ParameterEnsemble
Return type: -
dropna
(*args, **kwargs)[source]¶ overload of pandas.DataFrame.dropna()
Parameters: - *args (list) – positional args to pass to pandas.DataFrame.dropna()
- **kwargs (dict) – keyword args to pass to pandas.DataFrame.dropna()
Returns: Ensemble
Return type:
-
copy
()[source]¶ overload of Ensemble.copy()
Returns: ParameterEnsemble Return type: ParameterEnsemble
-
istransformed
¶ property decorated method to get the current transformation status of the ParameterEnsemble
Returns: istransformed Return type: bool
-
mean_values
¶ the mean value vector while respecting log transform
Returns: mean_values Return type: pandas.Series
-
names
¶ Get the names of the parameters in the ParameterEnsemble
Returns: list – parameter names Return type: list
-
adj_names
¶ Get the names of adjustable parameters in the ParameterEnsemble
Returns: list – adjustable parameter names Return type: list
-
ubnd
¶ the upper bound vector while respecting log transform
Returns: ubnd Return type: pandas.Series
-
lbnd
¶ the lower bound vector while respecting log transform
Returns: lbnd Return type: pandas.Series
-
log_indexer
¶ indexer for log transform
Returns: log_indexer Return type: pandas.Series
-
fixed_indexer
¶ indexer for fixed status
Returns: fixed_indexer Return type: pandas.Series
-
draw
(cov, num_reals=1, how='normal', enforce_bounds=None)[source]¶ draw realizations of parameter values
Parameters: - cov (pyemu.Cov) – covariance matrix that describes the support around the mean parameter values
- num_reals (int) – number of realizations to generate
- how (str) – distribution to use to generate realizations. Options are ‘normal’ or ‘uniform’. Default is ‘normal’. If ‘uniform’, cov argument is ignored
- enforce_bounds (str) – how to enforce parameter bound violations. Options are ‘reset’ (reset individual violating values), ‘drop’ (drop realizations that have one or more violating values. Default is None (no bounds enforcement)
-
classmethod
from_uniform_draw
(pst, num_reals)[source]¶ this is an experiemental method to help speed up uniform draws for a really large (>1E6) ensemble sizes. WARNING: this constructor transforms the pe argument
Parameters: - pst (pyemu.Pst) – a control file instance
- num_reals (int) – number of realizations to generate
Returns: ParameterEnsemble
Return type:
-
classmethod
from_sparse_gaussian_draw
(pst, cov, num_reals)[source]¶ instantiate a parameter ensemble from a sparse covariance matrix. This is an advanced user method that assumes you know what you are doing - few guard rails…
Parameters: - pst (pyemu.Pst) – a control file instance
- cov ((pyemu.SparseMatrix)) – sparse covariance matrix to use for drawing
- num_reals (int) – number of realizations to generate
Returns: ParameterEnsemble
Return type:
-
classmethod
from_gaussian_draw
(pst, cov, num_reals=1, use_homegrown=True, group_chunks=False, fill_fixed=True, enforce_bounds=False)[source]¶ instantiate a parameter ensemble from a covariance matrix
Parameters: - pst (pyemu.Pst) – a control file instance
- cov ((pyemu.Cov)) – covariance matrix to use for drawing
- num_reals (int) – number of realizations to generate
- use_homegrown (bool) – flag to use home-grown full cov draws…much faster than numpy…
- group_chunks (bool) – flag to break up draws by par groups. Only applies to homegrown, full cov case. Default is False
- fill_fixed (bool) – flag to fill in fixed parameters from the pst into the ensemble using the parval1 from the pst. Default is True
- enforce_bounds (bool) – flag to enforce parameter bounds from the pst. realized parameter values that violate bounds are simply changed to the value of the violated bound. Default is False
Returns: ParameterEnsemble
Return type:
-
classmethod
from_binary
(pst, filename)[source]¶ instantiate an parameter obsemble from a jco-type file
Parameters: - pst (pyemu.Pst) – a Pst instance
- filename (str) – the binary file name
Returns: pe
Return type:
-
project
(projection_matrix, inplace=True, log=None, enforce_bounds='reset')[source]¶ project the ensemble using the null-space Monte Carlo method
Parameters: - projection_matrix (pyemu.Matrix) – projection operator - must already respect log transform
- inplace (bool) – project self or return a new ParameterEnsemble instance
- log (pyemu.Logger) – for logging progress
- enforce_bounds (str) – parameter bound enforcement flag. ‘drop’ removes offending realizations, ‘reset’ resets offending values
Returns: ParameterEnsemble – if inplace is False
Return type:
-
enforce
(enforce_bounds='reset')[source]¶ entry point for bounds enforcement. This gets called for the draw method(s), so users shouldn’t need to call this
Parameters: enforce_bounds (str) – can be ‘reset’ to reset offending values or ‘drop’ to drop offending realizations
-
enfore_scale
()[source]¶ enforce parameter bounds on the ensemble by finding the scaling factor needed to bring the most violated parameter back in bounds
Note
this method not fully implemented.
Raises: NotImplementedError if called.
-
enforce_reset
()[source]¶ enforce parameter bounds on the ensemble by resetting violating vals to bound
-
read_parfiles_prefix
(prefix)[source]¶ thin wrapper around read_parfiles using the pnulpar prefix concept. Used to fill ParameterEnsemble from PEST-type par files
Parameters: prefix (str) – the par file prefix
-
read_parfiles
(parfile_names)[source]¶ read the ParameterEnsemble realizations from par files. Used to fill the ParameterEnsemble with realizations from PEST-type par files
Parameters: parfile_names (list) – list of par files to load Note
log transforms after loading according and possibly resets self.__istransformed
-
classmethod
from_parfiles
(pst, parfile_names, real_names=None)[source]¶ create a parameter ensemble from parfiles. Accepts parfiles with less than the parameters in the control (get NaNs in the ensemble) or extra parameters in the parfiles (get dropped)
Parameters: - pst – pyemu.Pst
- parfile_names – list of str par file names
- real_names – str optional list of realization names. If None, a single integer counter is used
Returns: pyemu.ParameterEnsemble
-
to_csv
(*args, **kwargs)[source]¶ overload of pandas.DataFrame.to_csv() to account for parameter transformation so that the saved ParameterEnsemble csv is not in Log10 space
Parameters: - *args (list) – positional arguments to pass to pandas.DataFrame.to_csv()
- **kwrags (dict) – keyword arguments to pass to pandas.DataFrame.to_csv()
Note
this function back-transforms inplace with respect to log10 before writing
-
to_binary
(filename)[source]¶ write the parameter ensemble to a jco-style binary file
Parameters: filename (str) – the filename to write Returns: Return type: None Note
this function back-transforms inplace with respect to log10 before writing
pyemu.ev module¶
module for error variance analysis, using FOSM assumptions.
-
class
pyemu.ev.
ErrVar
(jco, **kwargs)[source]¶ Bases:
pyemu.la.LinearAnalysis
Derived class for error variance analysis. Supports 2-term and 3-term error variance analysis. Inherits from pyemu.LinearAnalysis.
Parameters: - **kwargs (dict) – keyword args to pass to the LinearAnalysis base constructor.
- omitted_parameters (list) – list of parameters to treat as “omitted”. Passing this argument activates 3-term error variance analysis.
- omitted_parcov (varies) – argument that can be cast to a parcov for the omitted parameters. If None, omitted_parcov will be formed by extracting from the LinearAnalsis.parcov attribute.
- omitted_predictions (varies) – argument that can be cast to a “predictions” attribute for prediction sensitivity vectors WRT omitted parameters. If None, these vectors will be extracted from the LinearAnalysis.predictions attribute
- kl (bool) – flag to perform KL scaling on the jacobian before error variance calculations
Note
There are some additional keyword args that can be passed to active the 3-term error variance calculation
-
omitted_predictions
¶ get the omitted prediction sensitivity vectors (stored as a pyemu.Matrix)
Returns: omitted_predictions – a matrix of prediction sensitivity vectors (column wise) to omitted parameters Return type: pyemu.Matrix Note
returns a reference
if ErrorVariance.__omitted_predictions is not set, then dynamically load the attribute before returning
-
omitted_jco
¶ get the omitted jco
Returns: omitted_jco Return type: pyemu.Jco Note
returns a reference
if ErrorVariance.__omitted_jco is None, then dynamically load the attribute before returning
-
omitted_parcov
¶ get the omitted prior parameter covariance matrix
Returns: omitted_parcov Return type: pyemu.Cov Note
returns a reference
If ErrorVariance.__omitted_parcov is None, attribute is dynamically loaded
-
get_errvar_dataframe
(singular_values=None)[source]¶ - get a pandas dataframe of error variance results indexed
- on singular value and (prediction name,<errvar term>)
Parameters: singular_values (list) – singular values to test. defaults to range(0,min(nnz_obs,nadj_par) + 1) Returns: pandas.DataFrame – multi-indexed pandas dataframe Return type: pandas.DataFrame
-
get_identifiability_dataframe
(singular_value=None, precondition=False)[source]¶ get the parameter identifiability as a pandas dataframe
Parameters: - singular_value (int) – the singular spectrum truncation point. Defaults to minimum of non-zero-weighted observations and adjustable parameters
- precondition (bool) – flag to use the preconditioned hessian (xtqt + sigma_theta^-1). Default is False
Returns: pandas.DataFrame – A pandas dataframe of the V_1**2 Matrix with the identifiability in the column labeled “ident”
Return type: pandas.DataFrame
-
variance_at
(singular_value)[source]¶ get the error variance of all three terms at a singluar value
Parameters: singular_value (int) – singular value to test Returns: dict – dictionary of (err var term,prediction_name), standard_deviation pairs Return type: dict
-
R
(singular_value)[source]¶ get resolution Matrix (V_1 * V_1^T) at a singular value
Parameters: singular_value (int) – singular value to calc R at Returns: R – resolution matrix at singular_value Return type: pyemu.Matrix
-
I_minus_R
(singular_value)[source]¶ get I - R at singular value
Parameters: singular_value (int) – singular value to calc R at Returns: I - R – identity matrix minus resolution matrix at singular_value Return type: pyemu.Matrix
-
G
(singular_value)[source]¶ - get the parameter solution Matrix at a singular value
- V_1 * S_1^(_1) * U_1^T
Parameters: singular_value (int) – singular value to calc R at Returns: G – parameter solution matrix at singular value Return type: pyemu.Matrix
-
first_prediction
(singular_value)[source]¶ - get the null space term (first term) contribution to prediction error variance
- at a singular value. used to construct error variance dataframe
Parameters: singular_value (int) – singular value to calc first term at Returns: dict – dictionary of (“first”,prediction_names),error variance pairs at singular_value Return type: dict
-
first_parameter
(singular_value)[source]¶ - get the null space term (first term) contribution to parameter error variance
- at a singular value
Parameters: singular_value (int) – singular value to calc first term at Returns: first_term – first term contribution to parameter error variance Return type: pyemu.Cov
-
second_prediction
(singular_value)[source]¶ - get the solution space contribution to predictive error variance
- at a singular value (y^t * G * obscov * G^T * y). Used to construct error variance dataframe
Parameters: singular_value (int) – singular value to calc second term at Returns: dict – dictionary of (“second”,prediction_names), error variance Return type: dict
-
second_parameter
(singular_value)[source]¶ - get the solution space contribution to parameter error variance
- at a singular value (G * obscov * G^T)
Parameters: singular_value (int) – singular value to calc second term at Returns: second_parameter – second term contribution to parameter error variance Return type: pyemu.Cov
-
third_prediction
(singular_value)[source]¶ - get the omitted parameter contribution to prediction error variance
- at a singular value. used to construct error variance dataframe
Parameters: singular_value (int) – singular value to calc third term at Returns: dict – dictionary of (“third”,prediction_names),error variance Return type: dict
-
third_parameter
(singular_value)[source]¶ - get the omitted parameter contribution to parameter error variance
- at a singular value (G * omitted_jco * Sigma_(omitted_pars) * omitted_jco^T * G^T)
Parameters: singular_value (int) – singular value to calc third term at Returns: third_parameter – 0.0 if need_omitted is False Return type: pyemu.Cov
pyemu.la module¶
This module contains the LinearAnalysis object, which is the base class for all other pyemu analysis objects (Schur, ErrVar, MonteCarlo, and EnsembleSmoother).
-
class
pyemu.la.
LinearAnalysis
(jco=None, pst=None, parcov=None, obscov=None, predictions=None, ref_var=1.0, verbose=False, resfile=False, forecasts=None, sigma_range=4.0, scale_offset=True, **kwargs)[source]¶ Bases:
object
The super class for linear analysis. Can be used directly, but for prior uncertainty analyses only. The derived types (pyemu.Schur, pyemu.ErrVar, pyemu.MonteCarlo, pyemu.EnsembleSmoother) are for different forms of posterior uncertainty analyses. This class tries hard to not load items until they are needed; all arguments are optional
Parameters: - jco ((varies)) – something that can be cast or loaded into a pyemu.Jco. Can be a str for a filename or pyemu.Matrix/pyemu.Jco object.
- pst ((varies)) – something that can be cast into a pyemu.Pst. Can be an str for a filename or an existing pyemu.Pst. If None, a pst filename is sought with the same base name as the jco argument (if passed)
- parcov ((varies)) – prior parameter covariance matrix. If str, a filename is assumed and the prior parameter covariance matrix is loaded from a file using the file extension. If None, the prior parameter covariance matrix is constructed from the parameter bounds in the control file represented by the pst argument. Can also be a pyemu.Cov instance
- obscov ((varies)) – observation noise covariance matrix. If str, a filename is assumed and the observation noise covariance matrix is loaded from a file using the file extension. If None, the observation noise covariance matrix is constructed from the weights in the control file represented by the pst argument. Can also be a pyemu.Cov instance
- predictions ((varies)) – prediction (aka forecast) sensitivity vectors. If str, a filename is assumed and predictions are loaded from a file using the file extension. Can also be a pyemu.Matrix instance, a numpy.ndarray or a collection of pyemu.Matrix or numpy.ndarray.
- ref_var ((float)) – reference variance
- verbose ((either bool or string)) –
- controls log file / screen output. If str, a filename is assumed and
- and log file is written to verbose
- sigma_range (float) – defines range of upper bound - lower bound in terms of standard deviation (sigma). For example, if sigma_range = 4, the bounds represent 4 * sigma. Default is 4.0, representing approximately 95% confidence of implied normal distribution. This arg is only used if constructing parcov from parameter bounds.
- scale_offset (True) – flag to apply parameter scale and offset to parameter bounds when calculating prior parameter covariance matrix from bounds. This arg is onlyused if constructing parcov from parameter bounds.Default is True.
Note
the class makes heavy use of property decorator to encapsulate private attributes
-
forecast_names
¶ get the forecast (aka prediction) names
Returns: forecast_names – list of forecast names Return type: list
-
parcov
¶ get the prior parameter covariance matrix attribute
Returns: parcov – a reference to the parcov attribute Return type: pyemu.Cov Note
returns a reference
if LinearAnalysis.__parcov is not set, the dynamically load the parcov attribute before returning
-
obscov
¶ get the observation noise covariance matrix attribute
Returns: obscov – a reference to the obscov attribute Return type: pyemu.Cov Note
returns a reference
if LinearAnalysis.__obscov is not set, the dynamically load the obscov attribute before returning
-
nnz_obs_names
¶ wrapper around pyemu.Pst.nnz_obs_names for listing non-zero observation names
Returns: nnz_obs_names – pyemu.Pst.nnz_obs_names Return type: list
-
adj_par_names
()[source]¶ wrapper around pyemu.Pst.adj_par_names for list adjustable parameter names
Returns: adj_par_names – pyemu.Pst.adj_par_names Return type: list
-
jco
¶ get the jacobian matrix attribute
Returns: jco – the jacobian matrix attribute Return type: pyemu.Jco Note
returns a reference
if LinearAnalysis.__jco is not set, the dynamically load the jco attribute before returning
-
predictions
¶ get the predictions (aka forecasts) attribute
Returns: predictions – a matrix of prediction sensitivity vectors (column wise) Return type: pyemu.Matrix Note
returns a reference
- if LinearAnalysis.__predictions is not set, the dynamically load the
- predictions attribute before returning
-
predictions_iter
¶ property decorated prediction iterator
Returns: iterator – iterator on prediction sensitivity vectors (matrix) Return type: iterator
-
forecasts_iter
¶ synonym for LinearAnalysis.predictions_iter()
-
forecasts
¶ synonym for LinearAnalysis.predictions
-
pst
¶ get the pyemu.Pst attribute
Returns: pst Return type: pyemu.Pst Note
returns a references
If LinearAnalysis.__pst is None, then the pst attribute is dynamically loaded before returning
-
fehalf
¶ get the KL parcov scaling matrix attribute. Create the attribute if it has not yet been created
Returns: fehalf Return type: pyemu.Matrix
-
qhalf
¶ get the square root of the cofactor matrix attribute. Create the attribute if it has not yet been created
Returns: qhalf Return type: pyemu.Matrix
-
qhalfx
¶ get the half normal matrix attribute. Create the attribute if it has not yet been created
Returns: qhalfx Return type: pyemu.Matrix
-
xtqx
¶ get the normal matrix attribute. Create the attribute if it has not yet been created
Returns: xtqx Return type: pyemu.Matrix
-
mle_covariance
¶ get the maximum likelihood parameter covariance matrix.
Returns: pyemu.Matrix Return type: pyemu.Matrix
-
prior_parameter
¶ the prior parameter covariance matrix. Just a wrapper around LinearAnalysis.parcov
Returns: prior_parameter Return type: pyemu.Cov
-
prior_forecast
¶ thin wrapper for prior_prediction
Returns: prior_forecast – a dictionary of forecast name, prior variance pairs Return type: dict
-
mle_parameter_estimate
¶ get the maximum likelihood parameter estimate.
Returns: post_expt – the maximum likelihood parameter estimates Return type: pandas.Series
-
prior_prediction
¶ get a dict of prior prediction variances
Returns: prior_prediction – dictionary of prediction name, prior variance pairs Return type: dict
-
apply_karhunen_loeve_scaling
()[source]¶ apply karhuene-loeve scaling to the jacobian matrix.
Note
This scaling is not necessary for analyses using Schur’s complement, but can be very important for error variance analyses. This operation effectively transfers prior knowledge specified in the parcov to the jacobian and reset parcov to the identity matrix.
-
reset_pst
(arg)[source]¶ reset the LinearAnalysis.pst attribute
Parameters: arg ((str or matrix)) – the value to assign to the pst attribute
-
reset_parcov
(arg=None)[source]¶ reset the parcov attribute to None
Parameters: arg (str or pyemu.Matrix) – the value to assign to the parcov attribute. If None, the private __parcov attribute is cleared but not reset
-
reset_obscov
(arg=None)[source]¶ reset the obscov attribute to None
Parameters: arg (str or pyemu.Matrix) – the value to assign to the obscov attribute. If None, the private __obscov attribute is cleared but not reset
-
get
(par_names=None, obs_names=None, astype=None)[source]¶ method to get a new LinearAnalysis class using a subset of parameters and/or observations
Parameters: - par_names (list) – par names for new object
- obs_names (list) – obs names for new object
- astype (pyemu.Schur or pyemu.ErrVar) – type to cast the new object. If None, return type is same as self
Returns: new
Return type:
-
adjust_obscov_resfile
(resfile=None)[source]¶ reset the elements of obscov by scaling the implied weights based on the phi components in res_file so that the total phi is equal to the number of non-zero weights.
Parameters: resfile (str) – residual file to use. If None, residual file with case name is sought. default is None Note
calls pyemu.Pst.adjust_weights_resfile()
-
get_par_css_dataframe
()[source]¶ get a dataframe of composite scaled sensitivities. Includes both PEST-style and Hill-style.
Returns: css Return type: pandas.DataFrame
-
get_cso_dataframe
()[source]¶ get a dataframe of composite observation sensitivity, as returned by PEST in the seo file.
Note that this formulation deviates slightly from the PEST documentation in that the values are divided by (npar-1) rather than by (npar).
The equation is cso_j = ((Q^1/2*J*J^T*Q^1/2)^1/2)_jj/(NPAR-1) Returns: cso : pandas.DataFrame
pyemu.logger module¶
module for logging pyemu progress
-
class
pyemu.logger.
Logger
(filename, echo=False)[source]¶ Bases:
object
- a basic class for logging events during the linear analysis calculations
- if filename is passed, then a file handle is opened.
Parameters: - filename (str) – Filename to write logged events to. If False, no file will be created, and logged events will be displayed on standard out.
- echo (bool) – Flag to cause logged events to be echoed to the screen.
-
items
¶ dict – Dictionary holding events to be logged. If a log entry is not in items, then it is treated as a new entry with the string being the key and the datetime as the value. If a log entry is in items, then the end time and delta time are written and the item is popped from the keys.
pyemu.mc module¶
pyEMU Monte Carlo module. Supports easy Monte Carlo and GLUE analyses. The MonteCarlo class inherits from pyemu.LinearAnalysis
-
class
pyemu.mc.
MonteCarlo
(**kwargs)[source]¶ Bases:
pyemu.la.LinearAnalysis
LinearAnalysis derived type for monte carlo analysis
Parameters: **kwargs (dict) – dictionary of keyword arguments. See pyemu.LinearAnalysis for complete definitions -
parensemble
¶ pyemu.ParameterEnsemble – pyemu object derived from a pandas dataframe, the ensemble of parameters from the PEST control file with associated starting value and bounds. Object also exposes methods relevant to the dataframe and parameters– see documentation.
-
obsensemble
¶ pyemu.ObservationEnsemble – pyemu object derived from a pandas dataframe, the ensemble of observations from the PEST control file with associated starting weights. Object also exposes methods relevant to the dataframe and observations– see documentation.
Returns: pyEMU MonteCarlo object Return type: MonteCarlo Example
>>>import pyemu
>>>mc = pyemu.MonteCarlo(pst="pest.pst")
-
num_reals
¶ get the number of realizations in the parameter ensemble
Returns: num_real Return type: int
-
get_nsing
(epsilon=0.0001)[source]¶ get the number of solution space dimensions given a ratio between the largest and smallest singular values
Parameters: epsilon (float) – singular value ratio Returns: nsing – number of singular components above the epsilon ratio threshold Return type: float Note
If nsing == nadj_par, then None is returned
-
get_null_proj
(nsing=None)[source]¶ get a null-space projection matrix of XTQX
Parameters: nsing (int) – optional number of singular components to use If Nonte, then nsing is determined from call to MonteCarlo.get_nsing() Returns: v2_proj – the null-space projection matrix (V2V2^T) Return type: pyemu.Matrix
-
draw
(num_reals=1, par_file=None, obs=False, enforce_bounds=None, cov=None, how='gaussian')[source]¶ - draw stochastic realizations of parameters and
- optionally observations, filling MonteCarlo.parensemble and optionally MonteCarlo.obsensemble.
Parameters: - num_reals (int) – number of realization to generate
- par_file (str) – parameter file to use as mean values. If None, use MonteCarlo.pst.parameter_data.parval1. Default is None
- obs (bool) – add a realization of measurement noise to observation values, forming MonteCarlo.obsensemble.Default is False
- enforce_bounds (str) – enforce parameter bounds based on control file information. options are ‘reset’, ‘drop’ or None. Default is None
- how (str) – type of distribution to draw from. Must be in [“gaussian”,”uniform”] default is “gaussian”.
Example
>>>import pyemu
>>>mc = pyemu.MonteCarlo(pst="pest.pst")
>>>mc.draw(1000)
-
project_parensemble
(par_file=None, nsing=None, inplace=True, enforce_bounds='reset')[source]¶ perform the null-space projection operations for null-space monte carlo
Parameters: - par_file (str) – an optional file of parameter values to use
- nsing (int) – number of singular values to in forming null subspace matrix
- inplace (bool) – overwrite the existing parameter ensemble with the projected values
- enforce_bounds (str) – how to enforce parameter bounds. can be None, ‘reset’, or ‘drop’. Default is None
Returns: par_en – if inplace is False, otherwise None
Return type: pyemu.ParameterEnsemble
Note
to use this method, the MonteCarlo instance must have been constructed with the
jco
argument.Example
>>>import pyemu
>>>mc = pyemu.MonteCarlo(jco="pest.jcb")
>>>mc.draw(1000)
>>>mc.project_parensemble(par_file="final.par",nsing=100)
-
write_psts
(prefix, existing_jco=None, noptmax=None)[source]¶ - write parameter and optionally observation realizations
- to a series of pest control files
Parameters: - prefix (str) – pest control file prefix
- existing_jco (str) – filename of an existing jacobian matrix to add to the pest++ options in the control file. This is useful for NSMC since this jco can be used to get the first set of parameter upgrades for free! Needs to be the path the jco file as seen from the location where pest++ will be run
- noptmax (int) – value of NOPTMAX to set in new pest control files
Example
>>>import pyemu
>>>mc = pyemu.MonteCarlo(jco="pest.jcb")
>>>mc.draw(1000, obs=True)
>>>mc.write_psts("mc_", existing_jco="pest.jcb", noptmax=1)
-
pyemu.sc module¶
module for FOSM-based uncertainty analysis using a linearized form of Bayes equation known as the Schur compliment
-
class
pyemu.sc.
Schur
(jco, **kwargs)[source]¶ Bases:
pyemu.la.LinearAnalysis
derived type for prior and posterior uncertainty and data-worth analysis using Schur compliment
Parameters: **kwargs (dict) – keyword arguments to pass to the LinearAnalysis constructor. See LinearAnalysis definition for argument types Note
Same call signature as the base LinearAnalysis class
Example
>>>import pyemu
>>>sc = pyemu.Schur(jco="pest.jcb")
-
pandas
¶ get a pandas dataframe of prior and posterior for all predictions
Returns: - pandas.DataFrame
- a dataframe with prior and posterior uncertainty estimates for all forecasts (predictions)
Return type: pandas.DataFrame
-
posterior_parameter
¶ get the posterior parameter covariance matrix. If Schur.__posterior_parameter is None, the posterior parameter covariance matrix is calculated via Schur compliment before returning
Returns: posterior_parameter – the posterior parameter covariance matrix Return type: pyemu.Cov Note
returns a reference
Example
>>>import pyemu
>>>sc = pyemu.Schur(jco="pest.jcb")
>>>post_cov = sc.posterior_parameter
>>>post_cov.to_ascii("post.cov")
-
map_parameter_estimate
¶ get the posterior expectation for parameters using Bayes linear estimation
Returns: post_expt – a dataframe with prior and posterior parameter expectations Return type: pandas.DataFrame
-
map_forecast_estimate
¶ get the prior and posterior forecast (prediction) expectations.
Returns: pandas.DataFrame – dataframe with prior and posterior forecast expected values Return type: pandas.DataFrame
-
posterior_forecast
¶ thin wrapper around posterior_prediction
-
posterior_prediction
¶ get posterior forecast (prediction) variances
Returns: dict – a dictionary of forecast names, posterior variance pairs Return type: dict Note
This method is not as easy to use as Schur.get_forecast_summary(), please use it instead
-
get_parameter_summary
(include_map=False)[source]¶ get a summary of the parameter uncertainty
Parameters: include_map (bool) – if True, add the prior and posterior expectations and report standard deviation instead of variance Returns: pandas.DataFrame – dataframe of prior,posterior variances and percent uncertainty reduction of each parameter Return type: pandas.DataFrame Note
this is the primary method for accessing parameter uncertainty estimates - use this!
Example
>>>import matplotlib.pyplot as plt
>>>import pyemu
>>>sc = pyemu.Schur(jco="pest.jcb")
>>>sc = pyemu.Schur(jco="pest.jcb",forecasts=["fore1","fore2"])
>>>par_sum = sc.get_parameter_summary()
>>>par_sum.plot(kind="bar")
>>>plt.show()
-
get_forecast_summary
(include_map=False)[source]¶ get a summary of the forecast uncertainty
Parameters: include_map (bool) – if True, add the prior and posterior expectations and report standard deviation instead of variance Returns: pandas.DataFrame – dataframe of prior,posterior variances and percent uncertainty reduction of each parameter Return type: pandas.DataFrame Note
this is the primary method for accessing forecast uncertainty estimates - use this!
Example
>>>import matplotlib.pyplot as plt
>>>import pyemu
This usage assumes you have set the
++forecasts()
argument in the control file:>>>sc = pyemu.Schur(jco="pest.jcb")
or, you can pass the forecasts directly, assuming the forecasts are names of zero-weight observations:
>>>sc = pyemu.Schur(jco="pest.jcb",forecasts=["fore1","fore2"])
>>>fore_sum = sc.get_forecast_summary()
>>>fore_sum.plot(kind="bar")
>>>plt.show()
-
get_conditional_instance
(parameter_names)[source]¶ get a new Schur instance that includes conditional update from some parameters becoming known perfectly
Parameters: parameter_names (list) – parameters that are to be treated as notionally perfectly known Returns: la_cond – a new Schur instance conditional on perfect knowledge of some parameters Return type: Schur Note
this method is used by the get_parameter_contribution() method - don’t call this method directly
-
get_par_contribution
(parlist_dict=None)[source]¶ get a dataframe the prior and posterior uncertainty reduction as a result of some parameter becoming perfectly known
Parameters: parlist_dict (dict) – a nested dictionary-list of groups of parameters that are to be treated as perfectly known. key values become row labels in returned dataframe. If None, each adjustable parameter is sequentially treated as known and the returned dataframe has row labels for each adjustable parameter Returns: pandas.DataFrame – a dataframe that summarizes the parameter contribution analysis. The dataframe has index (row labels) of the keys in parlist_dict and a column labels of forecast names. The values in the dataframe are the posterior variance of the forecast conditional on perfect knowledge of the parameters in the values of parlist_dict Return type: pandas.DataFrame Example
>>>import pyemu
>>>sc = pyemu.Schur(jco="pest.jcb")
>>>df = sc.get_par_contribution()
-
get_par_group_contribution
()[source]¶ get the forecast uncertainty contribution from each parameter group. Just some sugar for get_contribution_dataframe() - this method automatically constructs the parlist_dict argument where the keys are the group names and the values are the adjustable parameters in the groups
Returns: pandas.DataFrame – a dataframe that summarizes the parameter contribution analysis. The dataframe has index (row labels) that are the parameter groups and a column labels of forecast names. The values in the dataframe are the posterior variance of the forecast conditional on perfect knowledge of the adjustable parameters in each parameter groups Return type: pandas.DataFrame
-
get_added_obs_importance
(obslist_dict=None, base_obslist=None, reset_zero_weight=False)[source]¶ get a dataframe fo the posterior uncertainty as a results of added some observations
Parameters: - obslist_dict (dict) – a nested dictionary-list of groups of observations that are to be treated as gained. key values become row labels in returned dataframe. If None, then every zero-weighted observation is tested sequentially. Default is None
- base_obslist (list) – observation names to treat as the “existing” observations. The values of obslist_dict will be added to this list during each test. If None, then the values in obslist_dict will be treated as the entire calibration dataset. That is, there are no existing data. Default is None. Standard practice would be to pass this argument as Schur.pst.nnz_obs_names.
- reset_zero_weight ((boolean or float)) – a flag to reset observations with zero weight in either obslist_dict or base_obslist. The value of reset_zero_weights can be cast to a float,then that value will be assigned to zero weight obs. Otherwise, zero weight obs will be given a weight of 1.0. Default is False.
Returns: pandas.DataFrame – dataframe with row labels (index) of obslist_dict.keys() and columns of forecast_name. The values in the dataframe are the posterior variance of the forecasts resulting from notional inversion using the observations in obslist_dict[key value] plus the observations in base_obslist (if any)
Return type: pandas.DataFrame
Note
all observations listed in obslist_dict and base_obslist with zero weights will be dropped unless reset_zero_weight is set
Example
>>>import pyemu
>>>sc = pyemu.Schur(jco="pest.jcb")
>>>df = sc.get_added_obs_importance(base_obslist=sc.pst.nnz_obs_names,reset_zero=True)
-
get_removed_obs_importance
(obslist_dict=None, reset_zero_weight=False)[source]¶ get a dataframe the posterior uncertainty as a result of losing some observations
Parameters: - obslist_dict (dict) – dictionary of groups of observations that are to be treated as lost. key values become row labels in returned dataframe. If None, then test every (nonzero weight - see reset_zero_weight) observation
- reset_zero_weight (bool or float) – a flag to reset observations with zero weight in obslist_dict. If the value of reset_zero_weights can be cast to a float, then that value will be assigned to zero weight obs. Otherwise, zero weight obs will be given a weight of 1.0
Returns: pandas.DataFrame – a dataframe with index of obslist_dict.keys() and columns of forecast names. The values in the dataframe are the posterior variances of the forecasts resulting from losing the information contained in obslist_dict[key value]
Return type: pandas.DataFrame
Note
all observations listed in obslist_dict with zero weights will be dropped unless reset_zero_weight is set
Example
>>>import pyemu
>>>sc = pyemu.Schur(jco="pest.jcb")
df = sc.get_removed_obs_importance()
-
next_most_important_added_obs
(forecast=None, niter=3, obslist_dict=None, base_obslist=None, reset_zero_weight=False)[source]¶ find the most important observation(s) by sequentially evaluating the importance of the observations in obslist_dict. The most important observations from each iteration is added to base_obslist and removed obslist_dict for the next iteration. In this way, the added observation importance values include the conditional information from the last iteration.
Parameters: - forecast (str) – name of the forecast to use in the ranking process. If more than one forecast has been listed, this argument is required
- niter (int) – number of sequential iterations
- dict (obslist_dict) – nested dictionary-list of groups of observations that are to be treated as gained. key values become row labels in result dataframe. If None, then test every observation individually
- base_obslist (list) – observation names to treat as the “existing” observations. The values of obslist_dict will be added to this list during testing. If None, then each list in the values of obslist_dict will be treated as an individual calibration dataset.
- reset_zero_weight ((boolean or float)) – a flag to reset observations with zero weight in either obslist_dict or base_obslist. If the value of reset_zero_weights can be cast to a float,then that value will be assigned to zero weight obs. Otherwise, zero weight obs will be given a weight of 1.0
Returns: pandas.DataFrame – DataFrame with columns of best obslist_dict key for each iteration. Columns of forecast variance percent reduction for this iteration, (percent reduction compared to initial base case)
Return type: pandas.DataFrame
Example
>>>import pyemu
>>>sc = pyemu.Schur(jco="pest.jcb")
>>>df = sc.next_most_added_importance_obs(forecast="fore1",
>>> base_obslist=sc.pst.nnz_obs_names,reset_zero=True
-
next_most_par_contribution
(niter=3, forecast=None, parlist_dict=None)[source]¶ find the largest parameter(s) contribution for prior and posterior forecast by sequentially evaluating the contribution of parameters in parlist_dict. The largest contributing parameters from each iteration are treated as known perfectly for the remaining iterations. In this way, the next iteration seeks the next most influential group of parameters.
Parameters: - forecast (str) – name of the forecast to use in the ranking process. If more than one forecast has been listed, this argument is required
- parlist_dict (dict) – a nested dictionary-list of groups of parameters that are to be treated as perfectly known. key values become row labels in dataframe
Returns: pandas.DataFrame – a dataframe with index of iteration number and columns of parlist_dict keys. The values are the results of the knowing each parlist_dict entry expressed as posterior variance reduction
Return type: pandas.DataFrame
-
pyemu.smoother module¶
this is a prototype ensemble smoother based on the LM-EnRML algorithm of Chen and Oliver 2013. It requires the pest++ “sweep” utility to propagate the ensemble forward.
-
class
pyemu.smoother.
Phi
(em)[source]¶ Bases:
object
Container class for dealing with ensemble residuals and phi vectors
Parameters: em (EnsembleMethod) – -
phi_vec_dict
¶
-
-
class
pyemu.smoother.
EnsembleMethod
(pst, parcov=None, obscov=None, num_slaves=0, use_approx_prior=True, submit_file=None, verbose=False, port=4004, slave_dir='template')[source]¶ Bases:
object
Base class for ensemble-type methods. Should not be instantiated directly
Parameters: - pst (pyemu.Pst or str) – a control file instance or filename
- parcov (pyemu.Cov or str) – a prior parameter covariance matrix or filename. If None, parcov is constructed from parameter bounds (diagonal)
- obscov (pyemu.Cov or str) – a measurement noise covariance matrix or filename. If None, obscov is constructed from observation weights.
- num_slaves (int) – number of slaves to use in (local machine) parallel evaluation of the parmaeter ensemble. If 0, serial evaluation is used. Ignored if submit_file is not None
- submit_file (str) – the name of a HTCondor submit file. If not None, HTCondor is used to evaluate the parameter ensemble in parallel by issuing condor_submit as a system command
- port (int) – the TCP port number to communicate on for parallel run management
- slave_dir (str) – path to a directory with a complete set of model files and PEST interface files
-
class
pyemu.smoother.
EnsembleSmoother
(pst, parcov=None, obscov=None, num_slaves=0, submit_file=None, verbose=False, port=4004, slave_dir='template', drop_bad_reals=None, save_mats=False)[source]¶ Bases:
pyemu.smoother.EnsembleMethod
an implementation of the GLM iterative ensemble smoother
Parameters: - pst (pyemu.Pst or str) – a control file instance or filename
- parcov (pyemu.Cov or str) – a prior parameter covariance matrix or filename. If None, parcov is constructed from parameter bounds (diagonal)
- obscov (pyemu.Cov or str) – a measurement noise covariance matrix or filename. If None, obscov is constructed from observation weights.
- num_slaves (int) – number of slaves to use in (local machine) parallel evaluation of the parmaeter ensemble. If 0, serial evaluation is used. Ignored if submit_file is not None
- use_approx_prior (bool) – a flag to use the MLE (approx) upgrade solution. If True, a MAP solution upgrade is used
- submit_file (str) – the name of a HTCondor submit file. If not None, HTCondor is used to evaluate the parameter ensemble in parallel by issuing condor_submit as a system command
- port (int) – the TCP port number to communicate on for parallel run management
- slave_dir (str) – path to a directory with a complete set of model files and PEST interface files
- drop_bad_reals (float) – drop realizations with phi greater than drop_bad_reals. If None, all realizations are kept. Default is None
Example
>>>import pyemu
>>>es = pyemu.EnsembleSmoother(pst="pest.pst")
-
initialize
(num_reals=1, init_lambda=None, enforce_bounds='reset', parensemble=None, obsensemble=None, restart_obsensemble=None, regul_factor=0.0, use_approx_prior=True, build_empirical_prior=False)[source]¶ Initialize the iES process. Depending on arguments, draws or loads initial parameter observations ensembles and runs the initial parameter ensemble
Parameters: - num_reals (int) – the number of realizations to draw. Ignored if parensemble/obsensemble are not None
- init_lambda (float) – the initial lambda to use. During subsequent updates, the lambda is updated according to upgrade success
- enforce_bounds (str) – how to enfore parameter bound transgression. options are reset, drop, or None
- parensemble (pyemu.ParameterEnsemble or str) – a parameter ensemble or filename to use as the initial parameter ensemble. If not None, then obsenemble must not be None
- obsensemble (pyemu.ObservationEnsemble or str) – an observation ensemble or filename to use as the initial observation ensemble. If not None, then parensemble must not be None
- restart_obsensemble (pyemu.ObservationEnsemble or str) – an observation ensemble or filename to use as an evaluated observation ensemble. If not None, this will skip the initial parameter ensemble evaluation - user beware!
- regul_factor (float) – the regularization penalty fraction of the composite objective. The Prurist, MAP solution would be regul_factor = 1.0, yielding equal parts measurement and regularization to the composite objective function. Default is 0.0, which means only seek to minimize the measurement objective function
- use_approx_prior (bool) – a flag to use the inverse, square root of the prior ccovariance matrix for scaling the upgrade calculation. If True, this matrix is not used. Default is True
- build_empirical_prior (bool) – flag to build the prior parameter covariance matrix from an existing parensemble. If True and parensemble is None, an exception is raised
Example
>>>import pyemu
>>>es = pyemu.EnsembleSmoother(pst="pest.pst")
>>>es.initialize(num_reals=100)
-
get_localizer
()[source]¶ get an empty/generic localizer matrix that can be filled
Returns: localizer – matrix with nnz obs names for rows and adj par names for columns Return type: pyemu.Matrix
-
update
(lambda_mults=[1.0], localizer=None, run_subset=None, use_approx=True, calc_only=False)[source]¶ update the iES one GLM cycle
Parameters: - lambda_mults (list) – a list of lambda multipliers to test. Each lambda mult value will require evaluating (a subset of) the parameter ensemble.
- localizer (pyemu.Matrix) – a jacobian localizing matrix
- run_subset (int) – the number of realizations to test for each lambda_mult value. For example, if run_subset = 30 and num_reals=100, the first 30 realizations will be run (in parallel) for each lambda_mult value. Then the best lambda_mult is selected and the remaining 70 realizations for that lambda_mult value are run (in parallel).
- use_approx (bool) – a flag to use the MLE or MAP upgrade solution. True indicates use MLE solution
- calc_only (bool) – a flag to calculate the upgrade matrix only (not run the ensemble). This is mostly for debugging and testing on travis. Default is False
Example
>>>import pyemu
>>>es = pyemu.EnsembleSmoother(pst="pest.pst")
>>>es.initialize(num_reals=100)
>>>es.update(lambda_mults=[0.1,1.0,10.0],run_subset=30)
Module contents¶
pyEMU: python modules for Environmental Model Uncertainty analyses. These modules are designed to work directly and seamlessly with PEST and PEST++ model independent interface. pyEMU can also be used to setup this interface.
Several forms of uncertainty analyses are support including FOSM-based analyses (pyemu.Schur and pyemu.ErrVar), Monte Carlo (including GLUE and null-space Monte Carlo) and a prototype iterative Ensemble Smoother


This is a simple voltage-frequency-controller. The amplitude of
the voltage is linear dependent (VNominal/fNominal
) on
the frequency (input signal u
), but limited by
VNominal
(nominal RMS voltage per phase). An
m
quasi static phasor signal is provided as output
signal y
, representing complex voltages. The output
voltages may serve as inputs for complex voltage sources with phase
input. Symmetrical voltages are assumed.


{% extends "wagtailadmin/base.html" %} {% load i18n %} {% block titletag %}{% trans "CDN Manager" %}{% endblock %} {% block content %} {% include "wagtailadmin/shared/header.html" with title="CDN Manager" icon="tag" %}
CDN management is not currently enabled on this server. Please see your administrator if you have any questions.


Tumblr-like tag overflow Click and drag the overflowing tags to see more. Inspired by Tumblr and how they deal with an excess of tags. venenatis vitae ultricies phasellus accumsan morbi consectetur pellentesque


{{ kit.owner.username }} {{ kit.category }} {% for tag in kit.tags %} {{ tag.tag }} {% endfor %} {{ kit.title }} Confirm deletion × Are you sure you want to delete this kit? You won't be able to recover it.


Ion Basic Sliders
Ion.RangeSlider. Is an easy, flexible and responsive range slider with tons of options. For more info please check out the official documentation
Simple start and customising basic params
Start without params
Set min value, max value and start point
Set type to double and specify range, also showing grid and adding prefix "$"
Set up range and step
Set type to double and specify range, also showing grid and adding prefix "$"
Using step 250
Set up range with fractional values, using fractional step
Ion Advanced Sliders
Lock handles
Sometimes you want to forbid dragging one or both handles. Try to move left handle, you can't.
You can even lock both handles
Movement limits
Sometimes you may want to show user full slider, but restict him from using it for 100%. The limits is the tool for you. Try to drag slider, you will see, it has invisible borders on 10 and 50.
You can also highlight this zone:
One more example with limits:
Disable the slider
You can lock your slider, by using disable option:
After first focus, you can control slider by keyboard (arrow keys and WSAD):
Also you can set up keyboard step (in percents):
Working with dates and time, using moment.js
You can use native Date object if you wish, but moment.js is better!
Example with 12 hours time format
Example with 24 hours time format and localisation to russian:


-
All Our Patent Are Belong To You | Blog | Tesla Motors
www.teslamotors.com
Yesterday, there was a wall of Tesla patents in the lobby of our Palo Alto headquarters. That is no longer the case. They have been removed, in the ...
-
Flight: Twitter's Mobile Developer Conference
www.twitterflight.com
Flight is a gathering built by developers, for developers. You'll be right at home if you live, breathe and occasionally dream in Java, Objective-C, ...
-
M6.0 - 6km NW of American Canyon, California (BETA) 2014-08-24 10:20:44 UTC
comcat.cr.usgs.gov
USGS Earthquake Hazards Program, responsible for monitoring, reporting, and researching earthquakes and earthquake hazards
-
Top Companies for Culture and Values
www.glassdoor.com
As part of Glassdoor's online company review survey, employees voluntarily and anonymously share what their job and company is like when it comes to ...
-
Twitter / Recherche - #worldcup
twitter.com
Le meilleur des derniers Tweets à propos de #worldcup. Lisez ce que les gens disent et rejoignez la conversation.
-
Programming Sucks
stilldrinking.org
E very friend I have with a job that involves picking up something heavier than a laptop more than twice a week eventually finds a way to slip ...
-
Troy Hunt: Everything you need to know about the Shellshock Bash bug
www.troyhunt.com
Observations, musings and conjecture about the world of software and technology
-
Shellshock DHCP RCE Proof of Concept -
www.trustedsec.com
DHCP bash shellshock POC: 1) Just about any DHCP string value should work for the exploit. Value 114 is URL, which is a string and should be reliable ...
-
Apple - Privacy
www.apple.com
At Apple, we respect your privacy and protect it with strong encryption, plus strict policies that govern how all data is handled.
-
Apple - Privacy - Government Information Requests
www.apple.com
Our commitment to customer privacy doesn’t stop because of a government information request.
-
NASA SELECTS SPACEX TO BE PART OF AMERICA’S HUMAN SPACEFLIGHT PROGRAM
www.spacex.com
Today, NASA selected SpaceX’s Falcon 9 launch vehicle and Dragon spacecraft to fly American astronauts to the International Space Station under the ...
-
Interface Animations Workshop, BlendConf 2014
markgeyer.com
Interface Animations Workshop for BlendConf 2014.
-
WikiLeaks - SpyFiles 4
wikileaks.org
Through FinFisher's support and feedback platform, customers could provide feedback, open support request and obtain updates to the products they ...
-
Apple
www.apple.com
Apple designs and creates the iPhone, iPad, Mac notebooks and desktop computers, iOS 8, OS X, iPod and iTunes, and the new Apple Watch.
-
If programming languages were weapons • Bjorn Tipling
bjorn.tipling.com
C is an M1 Garand standard issue rifle, old but reliable. C++ is a set of nunchuks, powerful and impressive when wielded but takes many years of pain ...
-
White House names Google’s Megan Smith the next Chief Technology Officer ...
www.washingtonpost.com
Former Twitter lawyer Alex Macgillivray will serve as deputy U.S. CTO.
-
The Relative Cost of Bandwidth Around the World
blog.cloudflare.com
Over the last few months, there’s been increased attention on networks and how they interconnect . CloudFlare runs a large network that interconnects ...
-
KernelMode.info • View topic - Windows 8.1 UAC Bypass
www.kernelmode.info
A forum for kernel-mode exploration.
-
Continuing our fight for more #transparency | Twitter Blogs
blog.twitter.com
Each successive release of our Transparency Report aims to provide more meaningful and constructive insight into the global government and copyright ...
-
Verizon made an enemy tonight
iamnotaprogrammer.com
On a flight back to New York I read Level 3’s assessment of the latest round of the Netflix vs Internet Provider debacle .
-
Meet 'Project Zero,' Google's Secret Team of Bug-Hunting Hackers | WIRED
www.wired.com
Today Google plans to publicly reveal the team, known as Project Zero, a group of top Google security researchers who will be given the sole mission ...
-
Challenging the access ban in Turkey | Twitter Blogs
blog.twitter.com
It’s now been six days since the Turkish government blocked access to Twitter. Throughout this time, we’ve been engaged in discussion with Turkish ...
-
Humble Bundle: PC and Android 11
www.humblebundle.com
10 games for your PC and Android in one bundle! Pay what you want for Humble Bundle: PC and Android 11.


Please input your name
Please select your gender
Please select language
Mouseover and Picture change
Mouseover and Visibility


Practical Confidentiality
created: 2018-01-09;
status: draft;
tagged:
A full name, physical address, or telephone number, if disclosed, could wreck havoc on someone’s life. This is an outline of practical confidentiality for volunteers, interns, and work-studies at shelter.
Recommended Policy
From Model Protocol on Confidentiality when Working with Battered Women
It is [recommended] policy to hold confidential all communications, observations and information made by, between or about program participants. This includes all program participant, service and administrative records resulting from telephone contacts, and any other work related to recipients of service.
Communications are confidential whether made by adults or children, and whether to or between staff, volunteers, student interns or board members of this organization.
There are a limited number of exceptions to breaching the confidentiality of program participants. These exceptions are as follows:
- Duty to report child abuse or neglect (RWC 26.44.030);
- Duty to warn of an imminent threat of harm to self or others (this is known as a Tarasoff warning, based on case law);
- Following a court order, after a judge privately reviews program participant records (RCW 70.123.075); or
- When given express permission by the program participant to release information.
Recommended Procedures
From [HOWTO: Answer the phone]/answering-phone):
Do not disclose if someone is (or is not) staying in shelter.
For example
- “I can neither confirm nor deny…”
- “Do you have another way to get ahold of them?”
- “I can take a message and leave it on our community board.”
- “I can take your contact information and post it on our community board.”
Remind clients in shelter and folks calling in that our services are confidential.
The Model Protocol on Confidentiality also recommends that
Requests for information by any third party (e.g., [school administrators,] child protective services, prosecutors, mental health providers, friends or family), including the program participant’s attorney, will not be honored without express written permission (or verbal consent in person, depending) from the program participant, with the exception of mandatory reporting of child abuse/neglect or a “duty to warn” circumstance.
All communications are confidential, even when shared by the program participant in the presence of [staff] and any third parties who are working on behalf of the program participant.


In this assignment, you’ll create a web client using plain HTML and JavaScript (and some CSS for styling if you like).
This web client will pull data from a remote web API and display it in tabular format, allowing a user to filter and sort it in various ways.
| Assigned | Tue, Oct 6, 2020 |
| Discussion/Lab class period | Thu, Oct 8, 2020 |
| Office hours | By appointment |
| Assignment Due | Tue, Oct 13, 2020 |
To complete this assignment, you need to write the body of the <script>
tag in the index.html
file to add appropriate listeners to relevant HTML
elements for specific events. In addition, you’ll need to implement the
necessary JavaScript functions in assets/scripts/index.js
to handle those
events and enable the relevant functionality.
As user stories, your requirements are:
For the purposes of this assignment, you will use fake weather station data
available from this API endpoint: http://dummy-data-api-server.herokuapp.com/data
.
Specifically, based on the above user stories, your web page should:
Load data
button by loading the data from the remote server(Note that you do not need to make a new request to the API for data unless the user clicks
the Load data
button again. Because of this, it’s a good idea to separate the data loading
functionality of your JavaScript code from the table rendering functionality.)
For this assignment, loading your web page (served by a web server) should enable the above-mentioned requirements. An example of this might look like:
The project structure is a simple website structure using HTML for content structure, CSS for styling, and JavaScript for functionality. No front-end frameworks or libraries are used (or should be used) on this assignment.
In this repo, you will find several files:
index.html
- this is the starting point for your project, and what will
load your JavaScript code and CSS styling rules.assets
- a holding place for assets to be loaded by the HTML file(s).
assets/styles
- a location where you can place any CSS files you create.
assets/styles/main.css
- the starting point for your CSS styling.assets/scripts
- a location where you can place any JavaScript files you create.
assets/styles/main.js
- the location where you should put any functions
directly referenced by the index.html
file. (There is a comment at the top of
this file with information that may be helpful.)There are comments througout the index.html
file indicating locations where specific
work should happen within the file. Please read and pay attention to these, as they
will help you complete the assignment.
You may note that the
master
branch has been changed to themain
branch. This is in response to current events, recognizing the lingering master/slave connotation of the existingmaster
branch naming, and desiring to make branch naming more inclusive. These changes are being made to bothgit
and to Github. For more on these changes, see this pull request togit
and Github’s README on their work. Gitlab is also making similar changes, as are others.
As with prior assignments, in order to get started with the assignment, you’ll want to do the following things:
index.js
and assets/scripts/main.js
Unlike prior assignments, there are no automated tests for this assignment. (There could be, but creating them is fairly involved, and it’s easer for this simple assignment to verify by running your code directly.)
You must submit your changes as commits to the main
branch on the repository.
Github Classroom will create a pull request on the repository for you, titled
Feedback. As you push your commits on the main
branch up to Github, they
will be added to the activity on this pull request.
In addition to the synchronous mechanism of requesting help via office hours appointments, this pull request will be your mechanism for asking questions and requesting help asynchronously during the course of this assignment. I will also use this pull request to provide feedback on your work. I will provide feedback on the completed assignment within a week of the due date of the assignment. If you push your code earlier than the due date, I will try to provide feedback as needed earlier.
I suggest that you push your work to Github as you make commits, and that you make
commits frequently as you work on the assignment. This way, if you have questions,
I will be able to review your work-in-progress and give more relevant answers and
feedback. If you have a question specific to a particular area of the code, note that
you can add comments inline on the pull request by clicking on the Files changed tab
of the pull request, then clicking the little blue +
icon that appears when you hover
over a specific line of code.
I will do my best to respond to questions posed during the course of the assignment with
in a day of the ask. If you want to ask a question or request early feedback, please tag
me in a comment on the pull request: @nihonjinrxs
.
Good luck, and I look forward to seeing what you create!


Hey Man I'm Bot Doctor
I take care of your heart health.
Age
Years
Chest
inchs
Serum Cholestoral
Units
Resting Blood Pressure
Units
Maximum Heart Rate
Units
Oldpeak
Units
Thal
Units
Gender
Choose...
Male
Female
Other
Resting Electrocardiographic Results
Choose...
0
1
2
Exercise Induced Angina
Choose...
0
1
2
Fasting Blood Sugar
Choose...
Yes
No
Slope
Choose...
1
2
3
Number of Major Vessels
Choose...
0
1
2
3
Submit


--- layout: page title: Pictures image: feature: abstract-10.jpg background: d50b0862.png comment: True share: True permalink: /pictures ---


This website has a simple calls two php scripts every few seconds: time.php
and fibonacci.php
.
You only have to modify the PHP files.
Modify the time.php
file to print the current time. Use the PHP Date Documentation to aid you with this task.
Modify the fibonacci.php
file to print a json encoded array with the current number and the previous number in the series up to 200 K, after that reset the series and start all over again. Use the PHP json_encode Documentation to print a json encoded array. You will find each number that you need in the super global $_GET['fib_1']
and $_GET['fib_2']
Getting Started With PHP Presentation. By @onema


home
documentation
downloads
google group
forums
bugs
feedback
Home
»
Forums
» General Issues
General Issues
Cannot query data in uppercase column names?
21:59 23 Apr
0 posts
How to convert List to an object of type com.avaje.ebean.PagingList
13:16 07 Apr
0 posts
Copy an Entity
07:30 03 Apr
0 posts
Is this product still being developed and supported?
05:17 09 Nov
0 posts
TimeToLive cache configuration
02:36 05 Aug
2 posts
Eager loaded byte array.
18:20 29 Jul
0 posts
which topic are you using
04:13 18 Jul
1 posts
OneToMany with second condition
22:37 22 May
0 posts
New Gorm-like API for EBean
12:01 22 Apr
0 posts
embedded id class can't find <>init() method
10:59 18 Feb
0 posts
Derived primary key
23:44 23 Oct
0 posts
Scala support - pointers, suggestions welcome
13:23 19 Oct
7 posts
Ask about performance
03:46 30 Aug
0 posts
This forum will be closed - moving to Google Group
03:46 12 Jun
2 posts
lib jar not found from Maven pom
09:47 28 May
0 posts
FindByPredicates class not found !
09:45 28 May
0 posts
need fast help... please
04:15 10 May
0 posts
polymorphic association
22:59 28 Mar
0 posts
Persistence Context
20:44 08 Dec
0 posts
ManyToMany causes error on second save
11:21 14 Jun
1 posts
Ebean show me error when deploy in tomcat server
11:20 14 Jun
1 posts
Give a list of databases that ebean supports
11:20 14 Jun
3 posts
Parametrized type in super class generates error during mapping
13:21 08 Apr
1 posts
avaje code gen : is it still available ?
06:49 10 Dec
1 posts
Google Group is preferred
06:47 10 Dec
3 posts
No Mgr found
18:10 11 Oct
4 posts
Jaxrs Timestamp json problem
22:59 27 Aug
2 posts
Jndi configuration
04:49 17 May
10 posts
v2.6.0 Released
21:53 10 May
0 posts
Error loading autofetch
05:56 04 May
2 posts
IllegalArgumentException: No enum const class
22:47 03 May
5 posts
NASTY BUG ALERT: .... partial object losing changes with setter on non-loaded property
20:21 25 Mar
1 posts
NumberFormatException
22:41 13 Mar
13 posts
[Feature req.] Automatically add empty sets instead of null
22:23 05 Mar
3 posts
Released v2.4.0
20:50 03 Mar
35 posts
Moving over to the Google Group
20:01 22 Feb
2 posts
Transaction log won't shut up
13:32 22 Feb
2 posts
Disconnect-reconnect
22:51 21 Feb
2 posts
Questions about spring configuration
10:38 11 Feb
7 posts
Ebean and application redeploy bug?
10:25 11 Feb
1 posts
Building from source - assembly modules
02:12 03 Feb
4 posts
PK save problems, some sentences
08:24 20 Jan
26 posts
DDL generation
10:57 13 Jan
9 posts
Best way to map field to Entity from another table?
11:47 11 Jan
3 posts
Released v2.3.0
10:34 17 Dec
0 posts
Simple trivial unidirectional mapping is not working
01:32 16 Dec
2 posts
Release v2.1.0
11:02 15 Sep
0 posts
FutureList , PagingList etc
21:54 19 Aug
2 posts
Version 2.0.2 Relased (bug fixes) and Spring Module
11:32 10 Aug
0 posts
Sorry, it's me.
13:16 21 Jul
0 posts
Create a New Topic
Title:
Body:
$paramtool.getParamIfNull('nt_body','')
home
|
back to top
Introduction
User Guide (pdf)
Install/Configure
Public JavaDoc
Whitepapers
General
Database Specific
Byte Code
Deployment Annotations
Features
Top Bugs
Top Enhancements
woResponse


Faucet Info
Address:
Pay Per Round:
Cooldown:
Enter your STH address below and solve the captcha to collect from the faucet!
STH Address
SUBMIT
Online-Wallet
Desktop-Wallet
Paper-Wallet
Min Payout:
0.30
STH
Fee:
0.05
STH
Pay Frequency:
Payouts happen daily as long as you've accrued over 0.30 STH
Forum
|
Telegram
|
Twitter
|
SmartHoldem WebSite
|
BlockExplorer
|
Faucet Source GitHub


Drag and drop label or textbox from the left to the right pane. Repeat step (1) if needed. (Note: Move mouse pointer inside the left half of label or textbox to select and drag)
Click to select any element (Orange border will be shown in selected element) on the right pane to resize or move or enter related properties
on the bottom area or hit "Remove selected UI" button to remove the element.
(a) Enter label name for dropped label.
(b) Enter field name & field value for dropped textbox.
Click "Show HTML" button to see the generated HTML.
Hit Save HTML locally to save current HTML. Then select element and hit Remove selected UI repeatedly to remove all elements and hit Reload the last saved HTML to reload.


---
author: tetrisd
title: D-separation in Bayesian Networks
layout: post
---
In the topic of Bayesian networks, the concept of d-separation/d-connectedness is introduced to determine quickly conditional independence relations among nodes.
Definition: Let $A$ and $B$ be two nodes with evidence set $\textbf{E}$. An undirected path $(A, n_1, \dots, n_k, B)$ is said to be blocked if and only if the following conditions hold for each node $n_i$ along the path:
- $n_i \in \textbf{E}$ and there are directed edges $n_{i-1} \rightarrow n_i \rightarrow n_{i+1}$
- $n_i \in \textbf{E}$ and $n_{i-1} \leftarrow n_i \leftarrow n_{i+1}$
- $n_i \in \textbf{E}$ and $n_{i-1} \leftarrow n_i \rightarrow n_{i+1}$
- $n_i \notin \textbf{E}$ and $n_{i-1} \rightarrow n_i \leftarrow n_{i+1}$
Otherwise, the path is said to be connected. If all undirected paths between $A$ and $B$ are blocked, $A$ and $B$ are d-separated. Otherwise, $A$ and $B$ are d-connected.
Theorem: $A$ and $B$ are conditionally independent given $\textbf{E}$ if and only if they are d-separated.


.Net develops advantages over Java
Here. From Keith Wedinger: Java development has a number of advantages over traditional environments which output machine language. .Net has the advantage of hindsight, however, and has improved on Java in a number of areas.


In 1905, Einstein had a very productive year. It is often referred to as the \Annus Mirabilis\. He was 26 years old and in that year, he published the following four papers:
Photoelectric Effect: "On a Heuristic Viewpoint Concerning the Production and Transformation of Light" \Original\ and \Translated\ This is this week's subject of study. This is the work for which Einstein won the Nobel Prize.
Brownian Motion: "On the Motion of Small Particles Suspended in a Stationary Liquid, as Required by the Molecular Kinetic Theory of Heat." \Original\ and \Translated\ This paper on Brownian motion was the final proof for atoms (revisit week 1) and started the field of physics known as statistical mechanics.
Special Relativity: "On the Electrodynamics of Moving Bodies," \Original\ and \Translated\ In this paper, Einstein extended the principle of relativity to include electrodynamics and showed that the speed of light was constant in all reference frames.
Energy Mass Equivalence: "Does the Inertia of a Body Depend Upon Its Energy Content?"
\Original\ and
\Translated\
This was a direct consequence of the previous paper. He showed, among other things, that
S: Wow, quite a year!
M: Yes, this is unparalleled. There have been many important discoveries in physics, but to have so many, in widely different subjects, in a single year is truly remarkable.
S: What was Einstein's solution to the experiment we just did?
Einstein's proposition is that light is not really a continuous wave but, instead, arrives in small packets, small bunches - a "quantum". He imagined that each "quantum" of light has an energy given by
where f is the frequency and h is a number: Planck's constant. (It was introduced by Max Planck a couple years earlier.) Planck's constant is very important in this course. It is as important as it is small
The units are Joules times second or electron volt (1 eV =
Just a reminder that eV is just a (very small) unit of energy 1 eV =
\1.602\times 10^{-19} \ Joules
Einstein's equation
Let's see how this could work. Imagine that the electrons in a metal like zinc are in a potential well (like a pool) that is 3 eV (3 electron volts) in depth.
Video: The video below relates the "wave" properties of light to the photon energy to tie it all together.
[ciscode|rev=1|tool=elmsmedia|item=3531|entity_type=node]


| 040:070 Khan | : |
Those who deny the Book (this Qur'an), and that with which We sent Our Messengers (i.e. to worship none but Allah Alone sincerely, and to reject all false deities and to confess resurrection after the death for recompense) they will come to know (when they will be cast into the Fire of Hell). |
| 040:070 Maulana | : |
Those who reject the Book and that which We have sent Our messengers. But they shall soon know. |
| 040:070 Pickthal | : |
Those who deny the Scripture and that wherewith We send Our messengers. But they will come to know, |
| 040:070 Rashad | : |
They are the ones who have disbelieved in the scripture, and in the messages we have sent with our messengers. Therefore, they will surely find out. |
| 040:070 Sarwar | : |
Those who rejected the Book and the message which was given to Our Messenger will soon know (the consequences of their evil deeds). |
| 040:070 Shakir | : |
Those who reject the Book and that with which We have sent Our Messenger; but they shall soon come to know, |
| 040:070 Sherali | : |
Those who reject the Book and that with which WE sent Our Messengers. But soon will they come to know, |
| 040:070 Yusufali | : |
Those who reject the Book and the (revelations) with which We sent our messengers: but soon shall they know,- |
Concepts/Themes Covered: أركان الإسلام > التوحيد > الكافرون > افتراؤهم على الله وتكذيبهم ومجادلتهم بآيات الله Pillars of Islam> Islamic> The Disbelievers> Their Fabrication Against Allah, their Denial and Argumentation Against Allah's Signs أركان الإسلام > التوحيد > المكذبون الظالمون > صفاتهم Pillars of Islam> Islamic> The Oppressive Liars> Their Characteristics الإيمان > الغيب > النار > أصحاب النار Faith> The Unseen World> Hell-Fire>Hell Fellows الإيمان > الغيب > النار > صفات النار Faith> The Unseen World> Hell-Fire>Hell Characteristics
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


| |
| Sri Sathya Sai General Hospital, Prasanthi Nilayam |
This hospital was Sri Sathya Sai Baba’s first initiative in healthcare. Inaugurated on October 4th 1956, it was then, the only hospital in a 30 kilometre radius. Initially a primary care institution, it now offers both primary and secondary care.
The infrastructure includes:
- 94 beds.
- 2 Operation Theatres.
- 8 Wards (Pre and Post-operative).
- 7 Departments – General Medicine, General Surgery,
- Paediatrics, ENT, Ophthalmology, Dentistry, Obstetrics and Gynaecology.
- Laboratory facilities.
- Complement of Utility services.
In the past fifty years over 4 million patients have benefited from free healthcare services at this hospital.
Statistics for the period 1st April 2011 to 30th September 2011
Patient Services |
| Out Patient Department |
153,670 |
| Admissions(Inpatients) |
3,949 |
| Deliveries |
1,135 |
|
Surgical Procedures |
| General Surgeries |
110 |
| Dental Procedures |
8,952 |
|
Diagnostic Tests |
| Lab. Tests |
37,516 |
| X-rays |
1,544 |
| Ultra Sound Scan |
2,025 |
|
Click here to read an interesting article on the work and impact of Sri Sathya Sai General Hospital, Prasanthi Nilayam. |
|


Javascript basics
How does JavaScript compare to HTML and CSS?
Compared to other languages, JavaScript is more complex but offers more control on what you can express with it.
HTML and CSS are common because they set the foundation for a website, where is JS can make things happen dynamically.
Explain control flow and loops using an example process from everyday life
To demonstrate control flow you could compare it to checking your email. To check your email requires a set pattern of steps needed
to take in order to be successful. Loop in this case would be checking your email everyday.
Explain the difference between accessing data from arrays and objects.
Arrays and objects are both accessed in different ways; with an array you need may only use it if you use it's assigned number.
Objects are used by it's name.
Explain what functions are and why they are useful.
Functions are tasks that are able to give you information depending on what you need to do. They are useful because of the
flexibility they allow in what you want them to do, as you can control them specifically to your needs.
<


Supply a secret in 3 simple steps: 1. Fill in the received token. 2. Insert the requested secret. 3. Share the secret.


public interface ExecutionContext
The ExecutionContext class provides hooks that let you query the current flow and submit or schedule aysnchronous Runnable tasks.
Example: Submit a task that executes asynchronously.
public class JavaSubmitTask implements Execution { public ExecutionResult execute(final MessageContext messageContext, final ExecutionContext executionContext) { try { executionContext.submitTask(new Task()); // Here onwards, the proxy flow continues and can return // either success or failure in the case of an error. return ExecutionResult.SUCCESS; } catch (Exception e) { return ExecutionResult.ABORT; } } private static class Task implements Runnable { public void run() { // Perform a task asynchronously that does not // interact or influence the proxy flow. } } }
Example: Submit a task with a callback.
public class JavaSubmitTaskCallback implements Execution { public ExecutionResult execute(MessageContext messageContext, ExecutionContext executionContext) { Message message = messageContext.getMessage(); // Any synchronous/blocking code goes here. // ... executionContext.submitTask(new AuthenticationTask(), new PostAuthenticationCallback(), executionContext); // This line resumes after the submitTask is done. //... return ExecutionResult.PAUSE; // causes the flow to pause until resumed explicitly again } class AuthenticationTask implements Runnable { String subject = "FOOBAR"; @Override public void run() { // Do long running task. } public String getSubject() { return subject; } } class PostAuthenticationCallback implements Callback { /** * Post this method invocation, resume of flow is invoked by the framework */ public void callback(Runnable task, Object handback) { AuthenticationTask authTask = (AuthenticationTask) task; String subject = task.getSubject(); } } }
| Modifier and Type | Method and Description |
|---|---|
boolean |
isErrorFlow()
Tests if the current proxy flow context is the error flow.
|
boolean |
isRequestFlow()
Tests if the current proxy flow context is the request flow.
|
void |
resume()
Resumes a paused execution.
|
void |
scheduleTask(java.lang.Runnable task,
long delay,
java.util.concurrent.TimeUnit timeUnit)
Schedules a runnable task.
|
void |
submitTask(java.lang.Runnable task)
Submits a runnable task.
|
void |
submitTask(java.lang.Runnable task,
Callback callback,
java.lang.Object handback)
Submits a runnable task and calls a callback when the task completes.
|
boolean isRequestFlow()
true
if the proxy is executing in the request flow.boolean isErrorFlow()
true
, if the proxy is executing in the error flow.void submitTask(java.lang.Runnable task)
task
- Runnable
that is executed in a different thread.
void scheduleTask(java.lang.Runnable task, long delay, java.util.concurrent.TimeUnit timeUnit)
task
- Runnable
that is executed in a different thread.
delay
- Amount of time to delay the task. Units are specified by the timeUnit parameter.timeUnit
- Specifies how the delay should be interpreted. For example: TimeUnit.MILLISECONDS
.void submitTask(java.lang.Runnable task, Callback callback, java.lang.Object handback)
task
- Runnable
that is executed in a different thread.
callback
- After the task executes, the proxy flow resumes and invokes the callback()
method on this interface.handback
- An object that allows you to exchange context information between the task and the callback.void resume()


User Content
Below is a list of all the content you have generated on this site. Rooms and seeds are listed separately.
Your Rooms
{% if rooms %}
| Seed |
Room |
Players |
Created (UTC) |
Last Activity (UTC) |
{% for room in rooms %}
| {{ room.seed.id|suuid }} |
{{ room.id|suuid }} |
{{ room.seed.multidata.names[0]|length }} |
{{ room.creation_time.strftime("%Y-%m-%d %H:%M") }} |
{{ room.last_activity.strftime("%Y-%m-%d %H:%M") }} |
{% endfor %}
{% else %}
You have not created any rooms yet!
{% endif %}
Your Seeds
{% if seeds %}
| Seed |
Players |
Created (UTC) |
{% for seed in seeds %}
| {{ seed.id|suuid }} |
{% if seed.multidata %}{{ seed.multidata.names[0]|length }}{% else %}1{% endif %}
|
{{ seed.creation_time.strftime("%Y-%m-%d %H:%M") }} |
{% endfor %}
{% else %}
You have no generated any seeds yet!
{% endif %}


Oraclize
ÐApp
ISP BALANCE
0.000000
ETH
DOWNTIME VALUE
0.00
%
Hint:
open the browser developer console to view any errors and warnings.
Uptime
values from
Thingspeak
.
Made by:
Ahiwe Onyebuchi Valentine


Skeletor is Skeleton with improvements and additional everyday features, Such as a Responsive Menu and Slider
The MIT License (MIT)
Copyright (c) 2011-2014 Dave Gamache
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Connect. Collaborate. Create.


×
Purnima Kamath
PAINTINGS
CODE
CODE GALLERY
1.
Cellular Automaton - Game of Life
2.
Elementary Cellular Automata - All 255 Wolfram rules
3.
Fibonacci Series in Grid - First 500 number
3.
Fibonacci Series w/ circles
4.
Generative art - bl.ocks
5.
Infinite Fractals - Clifford Pickover
6.
Mandelbrot Set (Note: Massive number crunching on load. Takes time to render.)
7a.
Art using D3 & Noise
7b.
Perlin Noise w/ D3
7c.
Perlin Noise w/ D3 - Fur
8.
Kochi Interaction Design Workshop: Say only what you mean!
9a.
Beautiful Pie(First 1600) - using p5.js
9b.
Beautiful Pie(First 1600) - using D3.js
10a.
Truchet Tiling
10b.
Truchet Tiling - Arcs
10c.
Truchet Tiling - varying density
11.
Generative Art using Neural Networks - CPPNs
12.
Pickover's 3D Attractors


Newly inducted Accra Technical University VC cautions lecturers against immoral behaviour
Newly inducted Vice-Chancellor of Accra Technical University, Professor Samuel Nii Odai, has cautioned lecturers of the University against behaviours that contravene the schools Code of Conduct.
He advised students not to remain silent but report cases of sexual harassment to the appropriate authorities for redress.
Speaking at this year’s matriculation ceremony of the Accra Technical University, Prof. Nii Odai, said the reputation of any institution needs to be preserved under any circumstance.
The University, he said, will not condone any form of sexual harassment but remain committed to its policy of zero tolerance for sexual abuse.
In all, seven hundred and seven students were enrolled for the 2019/2020 academic year to pursue various programmes.
This year’s admission is the highest the University has ever received. The Vice-Chancellor, Professor Samuel Nii Odai said the University has only two hostels which are inadequate for the student population.
He said the school is working to secure land to ease the accommodation problem.
Professor Odai also announced that effective this academic year, HND students will be recruited for top-up courses.
The Registrar of the University, Adu Adjei Mensah administered the matriculation oath to the newly admitted students.
Earlier Professor Samuel Nii Odai was inducted into office as the first Vice-Chancellor of Accra Technical University.
Addressing the gathering, Prof Nii Odai said for Africa to be beyond aid, it needs to reform its educational system.
He said this will make African graduates more competitive globally and useful for their countries.
Prof Nii Odai said it is worrying to see young people on the continent leave their countries for greener pastures outside when Africa is well resourced.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/Is.20free.20group.20a.20.22recursive.20type.22.3F.html ---
A "recursive type" is a type defined as the smallest solution (smallest in the sense of universal property) of some type equation, e.g. nat
is the solution of T = 1+T
and list A
is the smallest solution of T=1+AxT
.
The free magma generated by a type A
, can be defined as the smallest solution of T=A+TxT
.
The free semigroup generated by a type A
can be defined as the smallest solution of T=A+AxT
(sidenote: 1+T
satisfies 1+T = 1+A+AxT = 1+Ax(1+T)
, i.e. 1+T
is list A
).
The free monoid generated by a type can be defined as list A
, which is mentioned above.
Is the free group generated by a type also a recursive type? I believe not, but I don't have a proof.
(Also, this question would need to be phrased properly, in terms of what the allowed operations can be, because by cardinality argument list A
would work as the free group over a type)
@Mario Carneiro you might have a quick answer / reference
I believe the proper notation is nat = μT.1+T
list A = μT.1+AxT
, free_magma A = μT.A+TxT
, free_semigroup A = μT.A+AxT
The most natural presentation of free semigroups and such is not as a recursive type, but as a quotient of a recursive type
Any free algebraic variety is a quotient of a recursive type
yeah but it works; whereas I don't think there's one that works for free groups
you take all the expressions in the language and quotient by all the equalities and congruences defined for the variety
In some cases, it turns out to be equivalent to a recursive type, like the free monoid and list
I believe free groups are also such things, but you have to get tricky with a definition of reduced word
Looks strangely like a QPF
yep
Or rather the fixed point of a QPF
all free algebraic varieties are QPFs
Did Jeremy think of that when he came up with QPFs?
Can someone loop me in as to what on earth QPF stands for?
quotient of a polynomial functor
I'm not very convinced that free group is equivalent to a polynomial
Quotient of Polynomial Functors. It's a way of generating arbitrary inductive and coinductive type that we're about to publish
now I'm not convinced and Mario is convinced, and there is no way to go on because how would I have a proof :P
In this case you are asking when we can drop the "quotient" part, and I say in groups you can do it
right, and I'm not convinced
You already know that the set of reduced words is isomorphic with a free group
but perhaps you doubt this can be defined as an inductive type
I hope your solution won't be doing funny things like including a Prop in the inductive type
of course it will
is that a polynomial?
can I restrict your language to μAT1+x.
?
is that even going to be a functor?
the functor here is that the whole construction is functorial in the base type A
I think the free group functor is probably not polynomial but I'm not sure how to prove it
There is a way to do it with an indexed inductive too
@Reid Barton well free_group
would definitely be a functor, and I think it is independent of construction?
you just need to track which words end in what letter so that you prevent constructing non-reduced words
what is an indexed inductive?
inductive foo : X -> Type
actually you don't even need to keep track if you are just going for abstractly isomorphic
it's just a tree with 2A branches at the root and 2A-1 branches everywhere else
on an unrelated note I've proved 2 instances of lawful traversable and 1 instance of lawful bitraversable, and I still have no idea what it is
I'm not sure I'm very comfortable with 2A-1
my first thought is, it can't be a polynomial; and my second thought is, what if A=0
if A=0 then the 2A branches at the root end it right then
the point is it's a tree
also I'm not very sure that you can define multiplication on that type
what is a * a^-1
?
1
yeah but will it be computable?
I didn't say anything about computability
but in this case yes you can do it
if A has decidable eq
yeah that's the problem
what if I wanted to define the free group on nat -> bool
It's easy to prove that it's necessary
it's easy to prove that it's necessary if you use that construction?
No, with any construction
the construction in mathlib doesn't need decidable equality
If it's not a quotient
define "not a quotient"
using only inductive types
like the sort you've been talking about
could you prove it?
First, you have to show that in the construction w = 1 is decidable
seems very fishy to me
(because once w=1 is decidable, the whole type has decidable equality)
1 has to be obtained by applying some constructors
interesting
and they can't be the same constructors as for constructing w of positive length
That's certainly enough for your restricted grammar. For lean inductives there are several other effects you have to eliminate
thanks
I figured out how to prove the free group functor is not a polynomial--it's kind of the same as what Mario just wrote.
Any polynomial functor is the coproduct, as a functor, of the "constant term" and the "nonconstant terms".
If the free group functor was a polynomial, it would have to be the disjoint union of the constant functor on a singleton (representing the identity element) and the functor of nonidentity elements. But the nonidentity elements don't actually form a functor, because substituting for the symbols in a word of a free group can cause cancellation to the identity.
nice
But there should be other nonexamples like the free commutative monoid, and I'm not sure how to handle those
on another note, if a magma has decidable equality, does its quotient by the associator (i.e. the free semigroup) also have decidable equality?
Let me just remark that mathematicians claimed the phrase "algebraic variety" about 100 years ago
I'm using the mathematician's terminology, or so I thought
that thing from universal algebra where you have a set and a bunch of universal equations on it
it's a generalization of ring, group, monoid and so on
but not field, because there is a disequality
that's why there is no free field
"variety of algebras" but related terms will inevitably collide
However, it's not like you have to ask things to be distinct in a free construction. You can just drop that axiom and the free object for that thing will be the free field if it exists
Algebraic variety is some algebraic geometry thing, the zeros of finitely many polynomials in affine or projective space. One interesting thing about learning CS is the new language and new ways of thinking about old things
I guess the notions are related, although the universal algebra version seems to be some vast generalization of that
(note that asking for a polynomial to be zero is a universal equational constraint of the same sort as in universal algebra)
i've always found the terminology confusing (i think of a universal algebraic variety as a collection of many models, while an algebraic variety is a single model)
Can someone loop me in as to what on earth QPF stands for?
So young, and he already sleeps during talks...
@Patrick Massot:
So young, and he already sleeps during talks...
Are those tears of pride?
It's an obscure abbreviation! It's "quotients of polynomial functors" as in Jeremy's talk in Amsterdam. Didn't you guys only just invent it??
But there should be other nonexamples like the free commutative monoid, and I'm not sure how to handle those
I happened to come across https://mathoverflow.net/questions/302631/what-is-the-polynomial-functor-for-the-bag-monad
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Turkish's Gothic Fired Pizza
Take Away
Delivery
30 minutes or less or your pizza will be stone cold
Address
by clicking this button you are agreeing the $3 delivery charge.
Submit
Size: $10+
small
Medium +$2
LARGE +$4
Toppings: $1.00 each
Cheese
Artichokes
Mushrooms
Pepperoni
Anchovies
Add
Order Description:
Subtotal: $
Place Order


Enter your Government gateway credentials
The person entering this information should have authority within the organsation to access Government Gateway credentials for the PAYE schemes. Your payroll department will usually have this information
The person entering this information should have authority within the organsation to access Government Gateway credentials for the PAYE schemes. Your payroll department will usually have this information


Michael Jurgensen
Designer
Photo-viewer
Paint
Angular.js
Contact
Angular Tutorial (Use Firefox if this page is not working)
Search the directory:
Show all
Show 3 Entries
Show 5 Entries


About Me
My Interests
I came to Babson College because I loved the community. I was interested in business and the arts, and I was given the opportunity to pursue both through Babson's Dance Ensemble and Sorenson Arts Scholar program. I also wanted to move away from home and have a new experience on the East Coast. Babson was the perfect fit for this reason. After graduation, I plan to work in PR and events, hopefully one day working for a national or worldwide non-profit organization. I enjoy helping others and planning events, and these interests combine well into non-profit fundrasiing.
Check Out In Class.
I chose Babson because of the community I experienced while visiting campus and the education it provided. I wanted to pursue both business and my passions in dance and photography, and Babson gave me this opportunity through the Babson Dance Ensemble and the Sorenson Arts Scholars. I also like the entreprenuership focus at Babson as I think it teaches many useful skills like self-motivation and problem solving.
My favorite sports to participate in are figure skating and dance. I grew up doing both of these sports and still continue them recreationally. I love the combination of artisry and athleticism in both. My favorite sports to watch, other than dance and figure skating, are soccer and basketball. My brother grew up playing both of these sports, and we now both follow the sports. While I was abroad in Copenhagen, I had the opportunity to go to two soccer games and loved them both!


Instruction
Enter either a word or a phrase (in English) under the "Insert word/phrase/incomplete sentence here" message box.
Wait for ~3-5 seconds for the algorithm to generate the top predicted word and the next 3 alternative predicted words to complete your input sentence.


Hello World
Hello World!
Hello!! This is the first of many posts that will attempt to review crisps from around the world. The benchmark is Hunky Dorys Salt and Vinegar!! Our personal favorite crisp type.
Crisps or chips??
It’s crisps! No discussion. Chips are what you get at McDonalds. Right so that was established I now need to go and format the website so wish me luck and chat soon.