SET_THREAD_AREA
Section: Linux Programmer's Manual (2)Updated: 2008-11-27
Index Return to Main Contents
NAME
set_thread_area - Set a Thread Local Storage (TLS) areaSYNOPSIS
#include <linux/unistd.h>#include <asm/ldt.h>
int set_thread_area(struct user_desc *u_info);
DESCRIPTION
set_thread_area() sets an entry in the current thread's Thread Local Storage (TLS) array. The TLS array entry set by set_thread_area() corresponds to the value of u_info->entry_number passed in by the user. If this value is in bounds, set_thread_area() copies the TLS descriptor pointed to by u_info into the thread's TLS array.When set_thread_area() is passed an entry_number of -1, it uses a free TLS entry. If set_thread_area() finds a free TLS entry, the value of u_info->entry_number is set upon return to show which entry was changed.
RETURN VALUE
set_thread_area() returns 0 on success, and -1 on failure, with errno set appropriately.ERRORS
- EINVAL
- u_info->entry_number is out of bounds.
- EFAULT
- u_info is an invalid pointer.
- ESRCH
- A free TLS entry could not be located.
VERSIONS
A version of set_thread_area() first appeared in Linux 2.5.29.CONFORMING TO
set_thread_area() is Linux-specific and should not be used in programs that are intended to be portable.NOTES
Glibc does not provide a wrapper for this function; call it using syscall(2).SEE ALSO
get_thread_area(2)COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.
Index
This document was created by man2html, using the manual pages.
Time: 05:33:05 GMT, December 24, 2015


model.player
- class Player;
- The instance of this class contains all the data about player state.
- immutable long id;
- Returns:
the unique player id.
- immutable bool me;
- Returns:
true
if and only if this is your player.
- immutable string name;
- Returns:
the name of the player.
- immutable bool strategyCrashed;
- Returns:
true
if and only if the strategy of this player is crashed.
- immutable int score;
- Returns:
the amount of score points.
- immutable Faction faction;
- Returns:
the faction of this player.
Page generated by Ddoc.


http://action.vday.org/site/R?i=K_bXQRS6zRwR4oiNWyJehQ
http://action.vday.org/site/R?i=s5ZnDGQ_vdd55eIAE0Az_w
http://action.vday.org/site/R?i=bou3K0LSAfvgPUcBqSCoLQ
http://action.vday.org/site/R?i=PIlzbKi5g07VCXYJOmrOBw
JOIN US IN NYC: CITY OF JOY: The Story of Women Turning Pain to Power
to Planting
http://action.vday.org/site/R?i=lMnullHqFw_L6oltlWbDuA
On Tuesday, June 25 in NYC, join V-Day and The 11th Hour Project as we
discuss City of Joy, a revolutionary community for women survivors of
gender violence in Bukavu, DRC, and V-World, a sustainable farm where
women will turn their pain to power to planting.
This special conversation will feature Christine Schuler Deschryver
(Director, City of Joy and V-Day Congo), Eve Ensler (Founder, V-Day
and Tony Award winning Playwright), and Wendy Schmidt (Founder, The
11th Hour Project), moderated by V-Day Board Member and Paley Center
CEO Pat Mitchell. The evening will include an introduction by V-Day
Board Member and The 11th Hour Project President Amy Rao and a reading
by V-Day Board Member Thandie Newton.
CITY OF JOY: The Story of Women Turning Pain to Power to Planting
Tuesday, June 25
7:00-8:30pm
Doors open at 6:00pm
The Paley Center for Media
25 W. 52nd St, NYC
RSVP is REQUIRED* >
http://action.vday.org/site/R?i=IGO9jxP97x8uWqVbgRRgZQ
TICKETS ARE LIMITED. SEATS ARE ON A FIRST COME, FIRST SERVED BASIS.
ENTRY TO THE MAIN THEATER IS NOT GUARANTEED, THERE WILL BE AN OVERFLOW
ROOM FOR ALL OTHER ATTENDEES.
* Because we want to accommodate as many people as possible, please
only RSVP if you are definitely attending. Demand is high and seating
is limited.
NOT IN NYC? WATCH the panel online at vday.org/livestream
http://action.vday.org/site/R?i=mahMcjbqEoXC1Mnd2gXgQw
http://action.vday.org/site/R?i=xIJAZo-RAmQXooXKsfYplw
http://action.vday.org/site/R?i=ZDw9xMgV46unASztqCy-Dg
http://action.vday.org/site/R?i=kjuQ3w2vwF-lZ0nBT6dF_w
http://action.vday.org/site/R?i=6b96UgN9Z21bwiV60gRVag
http://action.vday.org/site/R?i=PJWvspHYWHXenG17xDeSmA
unsubscribe
http://action.vday.org/site/CO?i=uFCxX69jSzKR1aDHKTwYNjVkkEop6nmn&cid=1062
Powered By Convio


"""ML-ENSEMBLE
:author: Sebastian Flennerhag
:copyright: 2017
:license: MIT
Model selection suite for tuning and benchmarking a set of estimators.
"""
# pylint: disable=too-many-instance-attributes
# pylint: disable=too-many-arguments
from __future__ import division, with_statement
import warnings
import numpy as np
from ._base_functions import (parse_key, set_job, cat, check_scorer,
make_learners, make_tansformers, check_instances)
from ..index import FoldIndex
from ..parallel import ParallelEvaluation
from ..parallel.base import BaseBackend, IndexMixin
from ..metrics import Data, assemble_data
from ..utils.formatting import _flatten
from ..utils import (print_time, safe_print,
assert_correct_format, check_inputs)
from ..externals.joblib import delayed
from ..externals.sklearn.base import clone
try:
from time import perf_counter as time
except ImportError:
from time import time
try:
from collections import OrderedDict as _dict
except ImportError:
_dict = dict
[docs]def benchmark(X, y, scorer, cv, estimators,
preprocessing, error_score=None, **kwargs):
"""Benchmark estimators across preprocessing pipelines.
:func:`benchmark` runs cross validation scoring of a set of estimators,
possible against a set of preprocessing pipelines. Equivalent to ::
evl = Benchmark(**kwargs)
evl.fit(X, y, scorer, ...)
.. versionadded:: 0.2.0
Parameters
----------
X : array-like, shape=[n_samples, n_features]
input data to preprocess and create folds from.
y : array-like, shape=[n_samples, ]
training labels.
scorer : function
a scoring function that follows the Scikit-learn API::
score = scorer(estimator, y_true, y_pred)
A user defines scoring function, ``score = f(y_true, y_pred)`` can be
made into a scorer by calling on the ML-Ensemble implementation of
Scikit-learn's ``make_scorer``. NOTE: do **not** use Scikit-learn's
``make_scorer`` if the Evaluator is to be pickled. ::
from mlens.metrics import make_scorer
scorer = make_scorer(scoring_function, **kwargs)
error_score : int, optional
score to assign when fitting an estimator fails. If ``None``, the
evaluator will raise an error.
cv : int or obj (default = 2)
cross validation folds to use. Either pass a ``KFold`` class
that obeys the Scikit-learn API.
estimators : list or dict, optional
set of estimators to use. If no preprocessing is desired or if
only on preprocessing pipeline should apply to all, pass a list of
estimators. The list can contain elements of named tuples
(i.e. ``('my_name', my_est)``).
If different estimators should be mapped to preprocessing cases,
a dictionary that maps estimators to each case should
be passed: ``{'case_a': list_of_est, ...}``.
preprocessing : dict, optional
preprocessing cases to consider. Pass a dictionary mapping a
case name to a preprocessing pipeline. ::
preprocessing = {'case_name': transformer_list,}
**kwargs : optional
Optional arguments to :class:`~mlens.parallel.base.BaseBackend`.
Returns
-------
results : dict
Summary output that shows data for best mean test scores, such as
test and train scores, std, fit times, and params.
"""
evl = Benchmark(**kwargs)
evl.fit(X, y, scorer, cv, estimators, preprocessing, error_score)
return evl.results
[docs]class BaseEval(IndexMixin, BaseBackend):
"""Base Evaluation class."""
def __init__(self, verbose=False, array_check=2, **kwargs):
self.verbose = verbose
self.array_check = array_check
self._transformers = None
self._learners = None
super(BaseEval, self).__init__(**kwargs)
def __iter__(self):
"""Provide jobs for ParallelEvaluation manager"""
yield self
def __call__(self, parallel, args, case):
"""Process eval"""
if self.verbose:
f = "stdout" if self.verbose < 20 else "stderr"
safe_print('Launching job', file=f)
t0 = time()
if 'preprocess' in case or self._transformers:
# Second test is for already fitted pipes - need to be cached
if self.verbose >= 2:
safe_print(self._print_prep_start(), file=f)
t1 = time()
self._run('transformers', parallel, args)
if 'preprocess' in case:
self.collect(args['dir'], 'transformers')
if self.verbose >= 2:
print_time(t1, '{:<13} done'.format('Preprocessing'), file=f)
if 'evaluate' in case:
if self.verbose >= 2:
safe_print(self._print_eval_start(), file=f)
t1 = time()
self._run('estimators', parallel, args)
self.collect(args['dir'], 'estimators')
if self.verbose >= 2:
print_time(t1, '{:<13} done'.format('Evaluation'), file=f)
if self.verbose:
print_time(t0, '{:<13} done'.format('Job'), file=f)
def _run(self, case, parallel, args):
"""Process eval"""
path = args['dir']
_threading = self.backend == 'threading'
if case == 'transformers':
generator = self._transformers
inp = 'auxiliary'
else:
generator = self._learners
inp = 'main'
parallel(delayed(subtask, not _threading)(path)
for task in generator for subtask in task(args, inp))
def _fit(self, X, y, job):
X, y = check_inputs(X, y, self.array_check)
verbose = max(self.verbose - 2, 0) if self.verbose < 15 else 0
with ParallelEvaluation(self.backend, self.n_jobs, verbose) as manager:
manager.process(self, job, X, y)
[docs] def collect(self, path, case):
"""Collect cache estimators"""
if case == 'transformers':
for transformer in self._transformers:
transformer.collect(path)
if case == 'estimators':
for learner in self._learners:
learner.collect(path)
@property
def raw_data(self):
"""Cross validated scores"""
data = list()
for learner in self._learners:
data.extend(learner.raw_data)
return assemble_data(data)
def _print_prep_start(self):
"""Message at start of preprocessing"""
return "Preprocessing"
def _print_eval_start(self):
"""Message at start of preprocessing"""
return "Evaluating"
[docs]class Benchmark(BaseEval):
"""Benchmark engine without hyper-parameter grid search.
A simplified version of the :class:`Evaluator` that performs a single
pass over a set of estimators and preprocessing pipelines for
benchmarking purposes.
.. versionadded:: 0.2.0
Parameters
----------
verbose : bool, int, optional
Verbosity during estimation.
**kwargs : optional
Optional keyword argument to :class:`~mlens.parallel.base.BaseBackend`.
"""
def __init__(self, verbose=False, **kwargs):
super(Benchmark, self).__init__(verbose=verbose, **kwargs)
self.results = None
self.indexer = None
[docs] def fit(self, X, y, scorer, cv, estimators,
preprocessing=None, error_score=None):
"""Run benchmarking job on given data with given estimators.
Fit preprocessing if applicable and evaluate estimators if applicable.
The method automatically determines whether to only run preprocessing,
only evaluation (possibly on previously fitted preprocessing), or both.
Calling ``fit`` will overwrite previously stored data where applicable.
Parameters
----------
X : array-like, shape=[n_samples, n_features]
input data to preprocess and create folds from.
y : array-like, shape=[n_samples, ]
training labels.
scorer : function
a scoring function that follows the Scikit-learn API::
score = scorer(estimator, y_true, y_pred)
A user defines scoring function, ``score = f(y_true, y_pred)`` can be
made into a scorer by calling on the ML-Ensemble implementation of
Scikit-learn's ``make_scorer``. NOTE: do **not** use Scikit-learn's
``make_scorer`` if the Evaluator is to be pickled. ::
from mlens.metrics import make_scorer
scorer = make_scorer(scoring_function, **kwargs)
error_score : int, optional
score to assign when fitting an estimator fails. If ``None``, the
evaluator will raise an error.
cv : int or obj (default = 2)
cross validation folds to use. Either pass a ``KFold`` class
that obeys the Scikit-learn API.
estimators : list or dict, optional
set of estimators to use. If no preprocessing is desired or if
only on preprocessing pipeline should apply to all, pass a list of
estimators. The list can contain elements of named tuples
(i.e. ``('my_name', my_est)``).
If different estimators should be mapped to preprocessing cases,
a dictionary that maps estimators to each case should
be passed: ``{'case_a': list_of_est, ...}``.
preprocessing : dict, optional
preprocessing cases to consider. Pass a dictionary mapping a
case name to a preprocessing pipeline. ::
preprocessing = {'case_name': transformer_list,}
Returns
-------
self : inst
Fitted Benchmark instance. Results available in the
``results`` attribute.
"""
self.indexer = FoldIndex(folds=cv)
assert_correct_format(estimators, preprocessing)
if preprocessing is not None:
self._transformers = make_tansformers(
sorted(check_instances(preprocessing).items()), self.indexer,
verbose=max(0, self.verbose - 14))
generator = [
(p_name, l_name, est, None, {})
for p_name, l_name, est in _flatten(check_instances(estimators))]
self._learners = make_learners(
generator, self.indexer, scorer, error_score,
verbose=max(0, self.verbose - 14))
job = set_job(estimators, preprocessing)
self._fit(X, y, job)
self.results = Data(self.raw_data, decimals=3)
return self
[docs]class Evaluator(BaseEval):
r"""Model selection across several estimators and preprocessing pipelines.
The :class:`Evaluator` allows users to evaluate several models in one call
across a set preprocessing pipelines. The class is useful for comparing
a set of estimators, especially when several preprocessing pipelines is to
be evaluated. By pre-making all folds and iteratively fitting estimators
with different parameter settings, array slicing and preprocessing is kept
to a minimum. This can greatly reduced fit time compared to
creating pipeline classes for each estimator and pipeline and fitting them
one at a time in an Scikit-learn
:class:`sklearn.model_selection.GridSearch` class.
Preprocessing can be done before making any evaluation, and several
evaluations can be made on the pre-made folds. Current implementation
relies on a randomized grid search, so parameter grids must be specified as
SciPy distributions (or a class that accepts an ``rvs`` method).
.. versionchanged:: 0.2.0
Parameters
----------
scorer : function
a scoring function that follows the Scikit-learn API::
score = scorer(estimator, y_true, y_pred)
A user defines scoring function, ``score = f(y_true, y_pred)`` can be
made into a scorer by calling on the ML-Ensemble implementation of
Scikit-learn's ``make_scorer``. NOTE: do **not** use Scikit-learn's
``make_scorer`` if the Evaluator is to be pickled. ::
from mlens.metrics import make_scorer
scorer = make_scorer(scoring_function, **kwargs)
error_score : int, optional
score to assign when fitting an estimator fails. If ``None``, the
evaluator will raise an error.
cv : int or obj, default = 2
cross validation folds to use. Either pass a ``KFold`` class
that obeys the Scikit-learn API.
metrics : list, optional
list of aggregation metrics to calculate on scores. Default is
mean and standard deviation.
shuffle : bool, default = True
whether to shuffle input data before creating cv folds.
random_state : int, optional
seed for creating folds (if shuffled) and parameter draws
array_check : int, default = 2
level of strictness in checking input arrays.
- ``array_check = 0`` will not check ``X`` or ``y``
- ``array_check = 1`` will check ``X`` and ``y`` for
inconsistencies and warn when format looks suspicious,
but retain original format.
- ``array_check = 2`` will impose Scikit-learn array checks,
which converts ``X`` and ``y`` to numpy arrays and raises
an error if conversion fails.
n_jobs: int, default = -1
number of CPU cores to use.
verbose : bool or int, default = False
level of printed messages. Levels:
#. ``verbose=1``: Message at start and end with total time
#. ``verbose=2``: Additional messages for each sub-job \
(preprocess and evaluation)
#. ``verbose in [3, 14]``: Additional messages with job \
completion status at increasing increasing frequency
#. ``Verbose >= 15``: prints each job completed as \
[case].[est].[draw].[fold]
If ``verbose>=20``, prints to ``sys.stderr``, else ``sys.stdout``.
"""
def __init__(
self, scorer, cv=2, shuffle=True, random_state=None,
error_score=None, metrics=None, array_check=2, verbose=False,
**kwargs):
super(Evaluator, self).__init__(**kwargs)
check_scorer(scorer)
self.scorer = scorer
self.scores_ = None
# TODO: Need to make this accept more than just FoldIndex
self.cv = cv
self.indexer = FoldIndex(cv)
self.shuffle = shuffle
self.error_score = error_score
self.metrics = [np.mean, np.std] if metrics is None else metrics
self.array_check = array_check
self.random_state = random_state
self.verbose = verbose
self._preprocessing = None
self._transformers = None
self._estimators = None
self._learners = None
self.n_iter = None
self.params = None
self.results = None
[docs] def fit(self, X, y, estimators=None, param_dicts=None,
n_iter=2, preprocessing=None):
"""Fit
Fit preprocessing if applicable and evaluate estimators if applicable.
The method automatically determines whether to only run preprocessing,
only evaluation (possibly on previously fitted preprocessing), or both.
Calling ``fit`` will overwrite previously stored data where applicable.
Parameters
----------
X : array-like, shape=[n_samples, n_features]
input data to preprocess and create folds from.
y : array-like, shape=[n_samples, ]
training labels.
estimators : list or dict, optional
set of estimators to use. If no preprocessing is desired or if
only on preprocessing pipeline should apply to all, pass a list of
estimators. The list can contain elements of named tuples
(i.e. ``('my_name', my_est)``).
If different estimators should be mapped to preprocessing cases,
a dictionary that maps estimators to each case should
be passed: ``{'case_a': list_of_est, ...}``.
param_dicts : dict, optional
parameter distribution mapping for estimators. Current
implementation only supports randomized grid search. Passed
distribution object must have an ``rvs`` method.
See :mod:`scipy.stats` for details.
There is quite some flexibility in specifying ``param_dicts``. If
there is no preprocessing, or if all estimators are fitted on all
preprocessing cases, the ``param_dict`` should have keys matching
the names of the estimators. ::
estimators = [('name', est), est]
param_dicts = {'name': {'param-1': some_distribution},
'est': {'param-1': some_distribution}
}
It is possible to specify different distributions for some or all
preprocessing cases::
preprocessing = {'case-1': transformer_list,
'case-2': transformer_list}
estimators = [('name', est), est]
param_dicts = {'name':
{'param-1': some_distribution},
('case-1', 'est'):
{'param-1': some_distribution}
('case-2', 'est'):
{'param-1': some_distribution,
'param-2': some_distribution}
}
If estimators are mapped on a per-preprocessing case basis as a
dictionary, ``param_dict`` must have key entries of the form
``(case_name, est_name)``.
n_iter : int
number of parameter draws to evaluate.
preprocessing : dict, optional
preprocessing cases to consider. Pass a dictionary mapping a
case name to a preprocessing pipeline. ::
preprocessing = {'case_name': transformer_list,}
Returns
-------
self : instance
class instance with stored estimator evaluation results in
the ``results`` attribute.
"""
job = set_job(estimators, preprocessing)
self._initialize(job, estimators, preprocessing, param_dicts, n_iter)
self._fit(X, y, job)
self._get_results()
return self
def _initialize(self, job, estimators, preprocessing, param_dicts, n_iter):
"""Set up generators for the job to be performed"""
if preprocessing and isinstance(preprocessing, list):
preprocessing = {'pr': preprocessing}
if 'preprocess' in job:
self._preprocessing = check_instances(preprocessing)
self._transformers = make_tansformers(
sorted(self._preprocessing.items()), self.indexer,
verbose=max(0, self.verbose - 14))
if 'evaluate' in job:
estimators, param_dicts = self._format(estimators, param_dicts)
self._estimators = check_instances(estimators)
self.n_iter = n_iter
self._draw_param_dicts(param_dicts)
generator = [
(p_name, l_name, est, i, params)
for p_name, l_name, est in _flatten(self._estimators)
for i, params in enumerate(self.params[cat(p_name, l_name)])]
self._learners = make_learners(
generator, self.indexer, self.scorer,
self.error_score, verbose=max(0, self.verbose - 14))
def _format(self, estimators, param_dicts):
"""Ensure estimator object and param_dict object have right format."""
preprocessing = self._preprocessing
if preprocessing is not None and isinstance(estimators, list):
# Set all estimators in list as ests for each case
ests_ = estimators
estimators = {case: clone(ests_) for case in preprocessing.keys()}
# Set parameter draws for each case
if preprocessing:
params = dict()
for key, pars in param_dicts.items():
splitted = key.split('.')
if len(splitted) == 2:
if splitted[0] not in preprocessing:
raise ValueError(
"invalid param_dict . Valid keys are "
"'case_name.est_name' or 'est_name'. "
"Failed on key entry {}.\n"
"All keys: {}".format(key, list(preprocessing)))
params[key] = pars
else:
# have an est_name key entry. Need to generate
for case in preprocessing.keys():
key_ = '%s.%s' % (case, key)
if key_ in params:
# We do not want to overwrite user-specified dists
continue
params[key_] = pars
else:
params = param_dicts
# Finally, check that estimators and preprocessing are correctly
# formatted for estimation
assert_correct_format(estimators, preprocessing)
return estimators, params
def _draw_params(self, param_dists):
"""Draw a list of param dictionaries for estimator."""
# Set up empty list of parameter setting
param_draws = [{} for _ in range(self.n_iter)]
# Fill list of parameter settings by param
for param, dist in param_dists.items():
draws = dist.rvs(size=self.n_iter, random_state=self.random_state)
for i, draw in enumerate(draws):
param_draws[i][param] = draw
return param_draws
def _set_params(self, param_dicts, key):
"""Try to set params, and if failure set an empty list."""
try:
self.params[key] = \
self._draw_params(param_dicts[key])
except KeyError:
# No param draws desired. Set empty dict.
warnings.warn("No valid parameters found for {}. Will fit and "
"score once with given parameter "
"settings.".format(key))
self.params[key] = [{}]
def _draw_param_dicts(self, param_dicts):
"""For each estimator, create a mapping of parameter draws."""
self.params = dict()
if not self._preprocessing:
# No preprocessing
# the expected param_dicts key is 'est_name'
for est_name, _ in self._estimators:
self._set_params(param_dicts, est_name)
else:
# Preprocessing
# Iterate over cases, expected param_dicts key is
# 'case_name__est_name'
if isinstance(self._preprocessing, dict):
for case in self._preprocessing:
for est_name, _ in self._estimators[case]:
self._set_params(
param_dicts, '%s.%s' % (case, est_name))
else:
for est_name, _ in self._estimators:
self._set_params(param_dicts, est_name)
def _get_results(self):
"""For each case-estimator, return best param draw from cv results."""
data = self.raw_data
best = _dict()
for key, val in data.items():
best[key] = _dict()
for k in val.keys():
case_est, _ = parse_key(k)
best[key][case_est] = None
best['params'] = _dict()
for k in data['test_score-m'].keys():
case_est, _ = parse_key(k)
best['params'][case_est] = None
for key, score in data['test_score-m'].items():
case_est, draw = parse_key(key)
old_score = best['test_score-m'][case_est]
if old_score is None or score > old_score:
best['test_score-m'][case_est] = score
for k, val in data.items():
best[k][case_est] = val[key]
best['params'][case_est] = self.params[case_est][int(draw)]
self.results = Data(best, decimals=3)
def _print_prep_start(self):
"""Print preprocessing start and return timer."""
msg = 'Preprocessing %i preprocessing pipelines over %i CV folds'
p = len(getattr(self, '_preprocessing', [1]))
c = self.cv if isinstance(self.cv, int) else self.cv.folds
return msg % (p, c)
def _print_eval_start(self):
"""Print initiation message and return timer."""
preprocessing = getattr(self, '_preprocessing', None)
if preprocessing is None:
msg = ('Evaluating %i models for %i parameter draws over %i '
'CV folds, totalling %i fits')
e, c, tot = self._get_count(preprocessing)
return msg % (e, self.n_iter, c, tot)
else:
msg = ('Evaluating %i models for %i parameter draws over %i' +
' preprocessing pipelines and %i CV folds, '
'totalling %i fits')
e, p, c, tot = self._get_count(preprocessing)
return msg % (e, self.n_iter, p, c, tot)
def _get_count(self, preprocessing):
"""Utility for counting number of fits to make."""
c = self.cv
if preprocessing is None:
# Simply grab length of estimator list
e = len(self._estimators)
tot = e * c * self.n_iter
return int(e), int(c), int(tot)
else:
# Need to consider cases
p = len(preprocessing)
if isinstance(self._estimators, list):
# If all estimators are applied to all cases, just grab
# length of list and multiply by cases
e = len(self._estimators) * p
else:
# Sum over cases
e = 0
for v in self._estimators.values():
e += len(v)
tot = e * self.n_iter * c
return int(e), int(p), int(c), int(tot)


Before Change
ValueError: If `start_tokens` is not a vector or
`end_token` is not a scalar.
if not rnn_cell_impl._like_rnncell(cell): // pylint: disable=protected-access
raise TypeError("cell must be an RNNCell, received: %s" % type(cell))
if (output_layer is not None and
not isinstance(output_layer, layers_base.Layer)):
raise TypeError(
"output_layer must be a Layer, received: %s" % type(output_layer))
After Change
ValueError: If `start_tokens` is not a vector or
`end_token` is not a scalar.
rnn_cell_impl.assert_like_rnncell("cell",cell)
if (output_layer is not None and
not isinstance(output_layer, layers_base.Layer)):
raise TypeError(
"output_layer must be a Layer, received: %s" % type(output_layer))


2 Samuel 23:22
These things did Benaiah the son of Jehoiada, and had the name among three mighty men.


Guide: Best Nintendo Switch Screen Protectors
Protect your investment
by Nintendo Life StaffOne of the nice things about the Nintendo Switch is its lovely big screen, but unfortunately, it's not a clamshell designed console like the Nintendo 3DS. Even with a protective case on it, you might still manage to scratch that beautiful sharp LCD screen.
We've got you covered however with some of our favourite Nintendo Switch screen protectors which are easy to fit and will help you to avoid devastating scratches to your Switch screen. We've even thrown in a few options to protect your Switch Lite screen if you have that model.


Appendix Q: Changes
This appendix is informative, not normative.
The only changes made to the document since the
SVG 1.1 Second Edition Proposed Recommendation were the following:
- Some additional wording in the CSS 2.0 reference in the References Appendix to
indicate that future versions of the SVG specification will reference CSS 2.1 and CSS Fonts Module Level 3.
- An update to the informative MathML reference from MathML 2.0 to MathML 3.0.


G6.5−0.4
- Right Ascension: 18 02 11
- Declination: −23 34
- Size (/arcmin): 18
- Type: S
- Flux density at 1 GHz (/Jy): 27
- Spectral Index: 0.6
Notes: Has been called G6.51−0.48, and part has been called G6.67−0.42.
- Radio: Shell, overlapping G6.4−0.1.
- Optical: Detected.
References:
- Yusef-Zadeh et al. 2000, ApJ, 540, 842. VLA at 330 MHz (2.'6×5.'5) and 1.4 GHz (0.'7×1.'1).
ADS
- Brogan et al. 2006, ApJ, 639, L25. VLA at 330 MHz (42'': S=60.8±0.4 Jy), plus other observations.
ADS
- Casandjian & Grenier 2008, A&A, 489, 849. γ-ray observations.
ADS
- Hewitt & Yusef-Zadeh 2009, ApJ, 694, L16. OH maser search.
ADS
- Stupar & Parker 2011, MNRAS, 414, 2282. Hα observations.
ADS
- Ajello et al. 2016, ApJ, 819, 44. Fermi observations.
ADS
Last updated: 4 Jun 2017
home |
documentation |
detailed listings |
summary listings
Dave Green/Cambridge, UK/


Before Change
// single "GP" (for the mean):
f_mean = rng.randn(N, 1)
f_var = rng.randn(N, 1) ** 2 // ensure positivity
equivalent_f2 = np.log(g_var)
f2_mean = np.full((N, 1), equivalent_f2)
f2_var = np.zeros((N, 1))
F2_mean = np.c_[f_mean, f2_mean]
F2_var = np.c_[f_var, f2_var]
After Change
// single "GP" (for the mean):
f_mean = rng.randn(N, 1)
f_var = rng.randn(N, 1) ** 2 // ensure positivity
equivalent_f2 = np.log(g_var) / 2
f2_mean = np.full((N, 1), equivalent_f2)
f2_var = np.zeros((N, 1))
F2_mean = np.c_[f_mean, f2_mean]
F2_var = np.c_[f_var, f2_var]


Changi is on the eastern end of the main island of Singapore. The sailing club (and moorings) are on the north east corner of the island.
Position 01°23'36"N, 103° 58'46"E (sailing club jetty)
See Singapore Clearance page.
Those on a limited budget usually anchor as close to the Changi Sailing Club as they can, as the Club rarely has any spare moorings. Do not anchor in the mooring field.
Changi is popular as it has a village atmosphere, a fresh produce market, restaurants, good shopping and other facilities within walking distance.
There is no marina here, but cruisers report that The Changi Sailing Club (CSC) is very welcoming to yachts in transit. CSC facilities are superb and the staff are helpful and friendly.
Last updated August 2016.


|
rapidjson
A fast JSON parser/generator for C++ with both SAX/DOM style API
|
Default memory allocator used by the parser and DOM. More...
#include <rapidjson.h>
Classes | |
| struct | ChunkHeader |
| Chunk header for perpending to each chunk. | |
Public Member Functions | |
| MemoryPoolAllocator (size_t chunkSize=kDefaultChunkCapacity, BaseAllocator *baseAllocator=0) | |
| Constructor with chunkSize. | |
| MemoryPoolAllocator (char *buffer, size_t size, size_t chunkSize=kDefaultChunkCapacity, BaseAllocator *baseAllocator=0) | |
| Constructor with user-supplied buffer. | |
| ~MemoryPoolAllocator () | |
| Destructor. | |
| void | Clear () |
| Deallocates all memory chunks, excluding the user-supplied buffer. | |
| size_t | Capacity () |
| Computes the total capacity of allocated memory chunks. | |
| size_t | Size () |
| Computes the memory blocks allocated. | |
| void * | Malloc (size_t size) |
| Allocates a memory block. (concept Allocator) | |
| void * | Realloc (void *originalPtr, size_t originalSize, size_t newSize) |
| Resizes a memory block (concept Allocator) | |
Static Public Member Functions | |
| static void | Free (void *ptr) |
| Frees a memory block (concept Allocator) | |
Static Public Attributes | |
| static const bool | kNeedFree = false |
| Tell users that no need to call Free() with this allocator. (concept Allocator) |
Default memory allocator used by the parser and DOM.
This allocator allocate memory blocks from pre-allocated memory chunks.
It does not free memory blocks. And Realloc() only allocate new memory.
The memory chunks are allocated by BaseAllocator, which is CrtAllocator by default.
User may also supply a buffer as the first chunk.
If the user-buffer is full then additional chunks are allocated by BaseAllocator.
The user-buffer is not deallocated by this allocator.
| BaseAllocator | the allocator type for allocating memory chunks. Default is CrtAllocator. |
| rapidjson::MemoryPoolAllocator< BaseAllocator >::MemoryPoolAllocator | ( | size_t | chunkSize = kDefaultChunkCapacity , |
| BaseAllocator * | baseAllocator = 0 |
||
| ) | [inline] |
Constructor with chunkSize.
| chunkSize | The size of memory chunk. The default is kDefaultChunkSize. |
| baseAllocator | The allocator for allocating memory chunks. |
| rapidjson::MemoryPoolAllocator< BaseAllocator >::MemoryPoolAllocator | ( | char * | buffer, |
| size_t | size, | ||
| size_t | chunkSize = kDefaultChunkCapacity , |
||
| BaseAllocator * | baseAllocator = 0 |
||
| ) | [inline] |
Constructor with user-supplied buffer.
The user buffer will be used firstly. When it is full, memory pool allocates new chunk with chunk size.
The user buffer will not be deallocated when this allocator is destructed.
| buffer | User supplied buffer. |
| size | Size of the buffer in bytes. It must at least larger than sizeof(ChunkHeader). |
| chunkSize | The size of memory chunk. The default is kDefaultChunkSize. |
| baseAllocator | The allocator for allocating memory chunks. |
| rapidjson::MemoryPoolAllocator< BaseAllocator >::~MemoryPoolAllocator | ( | ) | [inline] |
Destructor.
This deallocates all memory chunks, excluding the user-supplied buffer.
| size_t rapidjson::MemoryPoolAllocator< BaseAllocator >::Capacity | ( | ) | [inline] |
Computes the total capacity of allocated memory chunks.
| size_t rapidjson::MemoryPoolAllocator< BaseAllocator >::Size | ( | ) | [inline] |
Computes the memory blocks allocated.


All About My Mother (Todo sobre mi madre) (R) Starring Cecilia Roth, Penelope Cruz, and Eloy Azorin Directed by Pedro Almodovar Running Time: 105 Minutes Released by Sony Pictures Classics Reviewed by Frankie Paiva
There are only a selected handful of films that manage to be funny, yet be extremely sad at the exact same moment in time. All About My Mother is one of those films. The movie, which is filled with beautiful scenery and gorgeous settings, has this ability to affect you by printing haunting images onto your brain, and making sure they stay there.
Manuela (Roth) takes her son Esteban (Azorin) to a touring production of "A Streetcar Named Desire" for his birthday. He is delighted by the show and decides to wait outside in the rain to ask one of the lead actresses for her autograph. He is determined to get it, and he runs after her when she speeds away in a taxi.  He died, never knowing who his father really was, and Manuela was going to tell him all about his dad that night as his birthday present.
The grief stricken Manuela decides to go back to Barcelona to meet up with his father, but there is a catch. Not only does the dad not know he has a son, he also happens to be a transsexual who know goes by the name of Lola, and is contributing to the spread of AIDS across the city. She rents an apartment, and while in town, takes in a pregnant nun with a foreboding mother and helps her through her pregnancy. She also meets up with her friend Agrado (Antonia San Juan), who I believe was supposed to be a woman playing a woman but in this movie it's kind of hard to be sure. These three women soon begin a rapidly growing bond of friendship, a bond that is later shared with the lead actress from Streetcar, who is currently in town for the show. Each of these four women have problems, and each one of them will have help to deal with them.
It's hard to think of where to begin with this film. For starters, the cinematography and camera work is superb. The use of color is remarkable and adds life to and electricity that seeps throughout the entire picture. But not everything is vibrant and rosy. The film also has some chilling moments, and a particular scene involving Manuela circling a field full of hookers offering themselves to, and being raped by men is (in my opinion) the most haunting and depressing scene of any film this year. The film's main theme is death and disease, and the pain caused by both, but much of the abundant humor overshadows the dark undertones. There is an amazing monologue that Agrado delivers about her life late in the film, that is so funny and hilarious, you can download it on the AAMM website.
There are many great performances in the film, Cecilia Roth shines as the vulnerable, but strong heroine of the movie and San Juan is just beyond belief as Agrado. But the real star of the film is director Pedro Almodovar, everything in the film looks amazing and all of the scenes are well thought out. This may finally be his chance to be noticed by the mainstream audience, as the film is likely to pick up this year's Best Foreign Film Oscar. An overall good film, almost all of the testosterone in the audience will be lost, but it will still be enjoyable for both genders. If you are looking for a great movie to see, find the theater near you playing All About My Mother.
Overall Grade: B+ Rated R for for sexuality including strong sexual dialogue, language, and some drug content The Young-Uns: While the film would be OK for older teens, they will probably be bored. Good Age: 15 and up
A Review by Frankie Paiva E-Mail me at<EMAIL_ADDRESS>Visit a listing of my reviews at: http://us.imdb.com/ReviewsBy?Frankie+Paiva
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


The Strangers- Part 3
“You...?” That face was familiar to her. “What you are doing here?” She shouted. “Kritika, I just want to talk.” The guy replied. “No, but I don’t.  She was in complete anger. “Listen, I can explain everything. Just give me a chance.” He walked towards her. “Don’t you dare to come close to me. And why, why do you want a chance now. You went disappeared. Where were you when I needed you the most?” She said with a heavy voice.    She was in no mood to listen to him. “Why? Because of him? Who is he? Your new boyfriend?” He shouted arguing.  You do not have any right to interfere in my life again. Leave us alone.” She stated. “I shifted to Delhi 10 months ago. I wanted to inform you, but…” He stopped. “But what Karan? You do not have any reply now.” She shouted. “You haven’t picked up my calls, never replied to my texts, after that night. What I did wrong to you?”  Arjun was just watching the argument from a distance. Till now, he was sure that this guy is Kritika’s Ex. He was shocked. He didn’t want to interfere in their personal matter, so he remained silent. “You know I love you a lot. I realized my mistakes. That’s why I came back to you. Don’t you love me? Have you forgotten that night?” He said in a desperate tone and grabbed her wrist. “Leave me Karan, it’s hurting.” She shouted in pain. “Hey dude, leave her hand.” Arjun ran towards them.  I think you are the reason behind all this.  Then he pulled Kritika towards his car.  Arjun stood up in anger and punched him on his face. So powerfully that it made Karan fall on the road. Arjun held Kritika’s hand and said in fear, “Let’s go Kritika. Fast.” “No.” She shouted. “He has to pay for all his doings.” She started hitting him. Anyone can imagine the amount of pain and anger she had, from her face. Karan tried to defend himself. But he failed. Arjun knew that it was the anger from her heart, the loneliness she suffered. So he let Kritika get mad.  He exhaled. They ran towards the bike. “Give me the keys.” She said. “What?” He asked confirming what he just heard was actually true or not. “Give me the bike’s key damn it.” She shouted again, louder this time. He threw the keys towards her, still in shock, trying to understand what has just happened. “Now sit behind me.” She said from the bike. “You sure? Do you know how to drive a bike?” He asked worried.  Ask everything later.” She said in anger. She started the bike and they went far. She was driving fast, too fast. Even faster than Arjun. Arjun was confused, whether this was her anger or she just wanted to run away. But scared to ask anything. After a few kilometers, she stopped the bike road side in a deserted street. As they got off the bike, she started crying. Crying her heart out, taking out the pain she has suffered all this time. Arjun was just standing there watching her cry. He knew this was important, interrupting her was not gonna help anyhow. The next moment, she came towards Arjun, hugged him tightly and continued to sob. He knew that she just needed someone to listen to her. So he comforted her with that hug, telling her that he was there for her. Kritika came back to her senses and broke the hug realizing that she was with a stranger. “Sorry.” She whispered wiping her tears. “It’s OK” He replied avoiding an eye contact. “Let’s sit somewhere.” He added. They sat down on a small platform before a closed shop, under a street lamp. “Actually it was not his mistake. It was me who thought he could never leave me. I loved him from all my heart.” She started sharing her feelings. “Do not think like this.” He suggested. “No, just for one person you ignore and break a lot of relations. But when that person leaves, you are left all alone.” “I believed that he loves me too. But I didn’t knew that he was just waiting for that night only. I trusted him, thinking that this will take our relation to a next level. But that proved to be my biggest mistake. That day I thought I was going to share my virginity with him, but I lose to him. I lost my trust, my belief. I lost myself.” She continued. “Listen, why are you blaming yourself?  You are strong, powerful. Who knew that you have such karate skills?   Never doubt yourself. And I just don’t get this concept of Virginity. I mean why people only ask girls if they are virgin or not? Are boys out of this concept?  But you have to move on from that. Do not give anyone, the power to control your life.” With a little rudeness, he tried to convince her.  “You know this whole year, I build up myself completely. I moved on in life. I had gone through a really bad phase. Nobody was there when I really needed one.” She said. “Life is not going to be a straight line. It’s a graph of ‘sin x’, has its own ups and downs. This life is a journey; people will be a part of your journey. Not everyone is going to be there with you when you’ll reach your destination. Love yourself.  You never know, when this life will take a new turn.” He explained. “Hmm…” She stopped crying. “Hey its getting too late now, almost 4:00 A.M. And I am damn hungry.” He confessed. “O.K let’s leave.” “Do you want Anda-Bhurji? I mean at this time, in this area, there is a stall nearby. He makes awesome anda-bhurji.” He asked.  He added. “No.” She finally smiled. “I hope you don’t have any problem with a road side stall like those kinda hi-fi over hygienic girls.” He commented. “No way dude. I am that typical ‘chai ke tapre wali’ girl.” She laughed.  And yeah I am a black belt in karate.” She winked. “What?” He shouted in surprise. “Now give me the keys back. I am riding.” She decided.  He laughed. After having the food they drove back to Kritika’s home. She strongly applied the brakes in front of her house. This time Arjun bumped on her. “And you girls blame us for this.” He blushed. She laughed. “You are not coming inside?” She asked. “Your intention doesn’t seem right. What you want baby?” He winked with a grin. “No improvement in your flirting skill. Still poor af.” She said with fake disappointment. They laughed. “I need to go now. You go and sleep. Happy Birthday again. And don’t worry, when I’ll come back to pickup mom in the morning, I’ll take your number.” He smiled. “Thank you. And first improve your flirting skills. You are not getting my number that easily.” She winked. “Ok Bye.” She went inside. Arjun was there alone checking his mobile notifications sitting on his bike. Then he started the bike and was about to leave when someone hit him strongly on his head from behind, with something powerful, like a baseball bat. He fell down on the road unconscious.
To be continued...


The Challenge
- Mobility: Being both Consultant and Hands-on maximizes potential experience from each mission.
- Resilience: Long-term missions are hard because very immersive, yet the experience earned from them is tripled!
--- layout: default title: Agilesparks permalink: /projects/AgileSparks footer: true --- {% include base.html %}
Any Stack is fine since that's the job :wink:


BEST IN SHOW A film review by Christopher Null Copyright 2000 filmcritic.com filmcritic.com
Just when you thought the mockumentary had mocked everything worth mocking, here comes a new gem of the genre that will have you rolling in the aisles once again.
Up for skewering this time around is the dog show, as Best in Show takes the absolutely inane shenanigans of dog breeders and handlers, impaling their obsession with a caliber of wit unseen since This is Spinal Tap made rock gods look like buffoons.
Not that this is a surprise. Writer/director Christopher Guest wrote and composed the music for Spinal Tap, directed the funny-hmmm Waiting for Guffman, and even starred in the masterful and sarcastic The Princess Bride. His The Big Picture is one of the most underrated parodies -- attacking Hollywood -- of all time. Guest knows comedy, and he is still at the top of his game.
Best in Show owes its hilarity to its script, which gives us the simple premise of pet owners from around the country converging on the Mayflower Dog Show in Philadelphia (you know, where they make the cream cheese). And while the script is stellar, opening with a yuppie couple in group psychotherapy with their depressed Weimaraner, it's the dead-on casting that makes Best in Show so teary-eyed goofy.
With some dozen characters, it's hard to single out any one actor who steals the show, but I'd have to give top honors to John Michael Higgins (the guy who played Letterman in The Late Shift), a screaming queen with a Shih Tzu named Miss Agnes and a straightish "companion" played by Michael McKean. Parker Posey is always a treat to watch as half of the yuppie couple; with their matching braces and testimonials about being so fortunate to be raised "with catalogs," the Starbucks set has never looked more embarrassing.
Guest has a role as a hick Bloodhound-owner cum ventriloquist, and Eugene Levy and Catherine O'Hara give their best as pathetic, lower-than-white trash Terrier wranglers. (O'Hara's slutty vixen even sticks her name tag right on her chest instead of her top.) Finally there's Jennifer Coolidge (Stifler's Mom from American Pie) as a Philly society gal, Anna Nicole Smith-like in her buxomness and adamancy that her marriage to an octogenarian is filled with love. Who will win the silver cup? Who cares? They're all fall-down funny.
What unfortunately drags Best in Show off its game is the fact that most of these actors have been around the block a time or two in this kind of material. At least a half-dozen of the main players are Second City or Spinal Tap comedy veterans, including Fred Willard's loutish announcer, who wonders on the air why the Bloodhound can't put on a Sherlock Holmes hat and a smoke a pipe. There's just no opportunity to mistake Best in Show for a real documentary -- as some did when Spinal Tap came out, and as many still do with a movie like Dadetown. While the documentary style is intact, these faces are just too familiar to pull that off.
That and a few missed joke opportunities aside, Best in Show has easily gained a spot on my top ten list this year. Maybe not the blue ribbon, but definitely the red.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


PRCRSTNT
Hello, User!
Here are your current tasks.
Work on Personal Website
Finish Proposal for Client Work
Complete AP Calculus homework
Finish English reading


Before Change
if keep_it_real:
R = np.zeros_like(T)
else:
R = np.zeros((n, n), dtype=complex)
T_diag = T_diag.astype(complex)
// Take square roots of the diagonal of the triangular matrix.
R[np.diag_indices(n)] = np.sqrt(T_diag)
// Compute the number of blocks to use; use at least one block.
nblocks = max(n // blocksize, 1)
After Change
keep_it_real = (not _has_complex_dtype_char(T)) and (np.min(T_diag) >= 0)
if not keep_it_real:
T_diag = T_diag.astype(complex)
R = np.diag(np.sqrt(T_diag))
// Compute the number of blocks to use; use at least one block.
n, n = T.shape
nblocks = max(n // blocksize, 1)


climate change adaptation water Climate development WaSH mainstreaming Ghana Municipal Development issues Bolgatanga stakeholders Change Municipality Water collab: measures vulnerability Adaptation planning {border-style Assembly impacts Mainstreaming px;} #ffffff;} National support change, Municipality. Planning areas indicated information institutional policy programmes ... assessment capacity level resources stakeholder change. coordination important including plans projects sanitation Disaster communities institutions levels policies sources East International Management Municipality, Nations Report approach changes district ensure environmental lack local national particularly people place structures supply surface Health Region Salley United challenges disaster especially impact implemented issues. main mainstream mainstreamed px; quality sustainable vulnerable {font-family (accessed Accra, Alhassan Available District Ministry Resources Sanitation Upper Volta Vulnerability access address dry font-size future gender increasing issue online: planning. process rainfall regarding required risk systems Appendix Commission Government Hadwen awareness boreholes current disability double; drought floods government groundwater hygiene interview need northern number qualitative quantity regions research revealed rural threats used view water, yes, African Annual Assembly, Assessment Bank Despite Environment Environmental Figure Framework Fund Ghana. Local Policy Risk Social Stakeholders Table actions adaptive added administrative area available border-color border-width building carried collaboration departments desk developing early efforts experiences extreme facilities households improved key like mainstreaming. management poor reduce regional remain risks rivers solid; streams stressors sustainability temperatures understanding warning {font-style {font-weight A.. Action Bolgatanga, Capacity Change: Community Furthermore, Ghana, Group Intergovernmental June Medium-Term NGOs Organization-Upper Panel Plan Plans Programme Public Res. Rural Section Strategy Technology USA Unit University Wade White World activities activities, addition, affect affects agreed analysis aspects assessments bold budgets challenge clear common community contrast, coordinated courier; cross-cutting decentralised degree depend different directly effective em; events experienced explain following fully funds heavy houses implementation inadequate included includes information, integration interventions interviewed knowledge land level, level. model multiple note opening opportunity outcomes past piped potential problem pt;} range recent recommended response responses sectors significant specific stakeholders, study training types various


One of the many features of JFTP is the ability to work with multiple FTP sites simultaneously. You can open as many sessions as you want and connect each session to a different FTP site and transfer files between your PC and the connected FTP sites simultaneously.
Every session is opened in a new tab and, will have its own title, log pane, local pane, remote pane and status bar, thus, allowing you to work with multiple FTP sites simultaneously.
Based on the current active session and the state of the session, the buttons in the tool bar and menu bar will be enabled or disabled. To switch between sessions, click on the session's title (or tab).