text:
"""A decoder that performs beam search."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import collections

from tensorflow.contrib.seq2seq.python.ops import beam_search_ops
from tensorflow.contrib.seq2seq.python.ops import decoder
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import tensor_util
from tensorflow.python.layers import base as layers_base
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import embedding_ops
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import nn_ops
from tensorflow.python.ops import rnn_cell_impl
from tensorflow.python.ops import tensor_array_ops
from tensorflow.python.util import nest

__all__ = [
    "BeamSearchDecoderOutput",
    "BeamSearchDecoderState",
    "BeamSearchDecoder",
    "FinalBeamSearchDecoderOutput",
    "tile_batch",
]

class BeamSearchDecoderState(
    collections.namedtuple("BeamSearchDecoderState", ("cell_state", "log_probs",
                                                      "finished", "lengths"))):
  pass

class BeamSearchDecoderOutput(
    collections.namedtuple("BeamSearchDecoderOutput",
                           ("scores", "predicted_ids", "parent_ids"))):
  pass

class FinalBeamSearchDecoderOutput(
    collections.namedtuple("FinalBeamDecoderOutput",
                           ["predicted_ids", "beam_search_decoder_output"])):
  """Final outputs returned by the beam search after all decoding is finished.

  Args:
    predicted_ids: The final prediction. A tensor of shape
      `[T, batch_size, beam_width]`.
    beam_search_output: An instance of `BeamSearchDecoderOutput` that describes
      the state of the beam search.
  """
  pass

def _tile_batch(t, multiplier):
  """Core single-tensor implementation of tile_batch."""
  t = ops.convert_to_tensor(t, name="t")
  shape_t = array_ops.shape(t)
  if t.shape.ndims is None or t.shape.ndims < 1:
    raise ValueError("t must have statically known rank")
  tiling = [1] * (t.shape.ndims + 1)
  tiling[1] = multiplier
  tiled_static_batch_size = (
      t.shape[0].value * multiplier if t.shape[0].value is not None else None)
  tiled = array_ops.tile(array_ops.expand_dims(t, 1), tiling)
  tiled = array_ops.reshape(
      tiled, array_ops.concat(([shape_t[0] * multiplier], shape_t[1:]), 0))
  tiled.set_shape(
      tensor_shape.TensorShape(
          [tiled_static_batch_size]).concatenate(t.shape[1:]))
  return tiled

def tile_batch(t, multiplier, name=None):
  """Tile the batch dimension of a (possibly nested structure of) tensor(s) t.

  For each tensor t in a (possibly nested structure) of tensors,
  this function takes a tensor t shaped `[batch_size, s0, s1, ...]` composed of
  minibatch entries `t[0], ..., t[batch_size - 1]` and tiles it to have a shape
  `[batch_size * multiplier, s0, s1, ...]` composed of minibatch entries
  `t[0], t[0], ..., t[1], t[1], ...` where each minibatch entry is repeated
  `multiplier` times.

  Args:
    t: `Tensor` shaped `[batch_size, ...]`.
    multiplier: Python int.
    name: Name scope for any created operations.

  Returns:
    A (possibly nested structure of) `Tensor` shaped
    `[batch_size * multiplier, ...]`.

  Raises:
    ValueError: if tensor(s) `t` do not have a statically known rank or
    the rank is < 1.
  """
  flat_t = nest.flatten(t)
  with ops.name_scope(name, "tile_batch", flat_t + [multiplier]):
    return nest.map_structure(lambda t_: _tile_batch(t_, multiplier), t)

def _check_maybe(t):
  if isinstance(t, tensor_array_ops.TensorArray):
    raise TypeError(
        "TensorArray state is not supported by BeamSearchDecoder: %s" % t.name)
  if t.shape.ndims is None:
    raise ValueError(
        "Expected tensor (%s) to have known rank, but ndims == None." % t)

class BeamSearchDecoder(decoder.Decoder):
  """BeamSearch sampling decoder."""

  def __init__(self,
               cell,
               embedding,
               start_tokens,
               end_token,
               initial_state,
               beam_width,
               output_layer=None,
               length_penalty_weight=0.0):
    """Initialize BeamSearchDecoder.

    Args:
      cell: An `RNNCell` instance.
      embedding: A callable that takes a vector tensor of `ids` (argmax ids),
        or the `params` argument for `embedding_lookup`.
      start_tokens: `int32` vector shaped `[batch_size]`, the start tokens.
      end_token: `int32` scalar, the token that marks end of decoding.
      initial_state: A (possibly nested tuple of...) tensors and TensorArrays.
      beam_width:  Python integer, the number of beams.
      output_layer: (Optional) An instance of `tf.layers.Layer`, i.e.,
        `tf.layers.Dense`.  Optional layer to apply to the RNN output prior
        to storing the result or sampling.
      length_penalty_weight: Float weight to penalize length. Disabled with 0.0.

    Raises:
      TypeError: if `cell` is not an instance of `RNNCell`,
        or `output_layer` is not an instance of `tf.layers.Layer`.
      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))
    self._cell = cell
    self._output_layer = output_layer

    if callable(embedding):
      self._embedding_fn = embedding
    else:
      self._embedding_fn = (
          lambda ids: embedding_ops.embedding_lookup(embedding, ids))

    self._start_tokens = ops.convert_to_tensor(
        start_tokens, dtype=dtypes.int32, name="start_tokens")
    if self._start_tokens.get_shape().ndims != 1:
      raise ValueError("start_tokens must be a vector")
    self._end_token = ops.convert_to_tensor(
        end_token, dtype=dtypes.int32, name="end_token")
    if self._end_token.get_shape().ndims != 0:
      raise ValueError("end_token must be a scalar")

    self._batch_size = array_ops.size(start_tokens)
    self._beam_width = beam_width
    self._length_penalty_weight = length_penalty_weight
    self._initial_cell_state = nest.map_structure(
        self._maybe_split_batch_beams,
        initial_state, self._cell.state_size)
    self._start_tokens = array_ops.tile(
        array_ops.expand_dims(self._start_tokens, 1), [1, self._beam_width])
    self._start_inputs = self._embedding_fn(self._start_tokens)
    self._finished = array_ops.zeros(
        [self._batch_size, self._beam_width], dtype=dtypes.bool)

  @property
  def batch_size(self):
    return self._batch_size

  def _rnn_output_size(self):
    size = self._cell.output_size
    if self._output_layer is None:
      return size
    else:
      # To use layer's compute_output_shape, we need to convert the
      # RNNCell's output_size entries into shapes with an unknown
      # batch size.  We then pass this through the layer's
      # compute_output_shape and read off all but the first (batch)
      # dimensions to get the output size of the rnn with the layer
      # applied to the top.
      output_shape_with_unknown_batch = nest.map_structure(
          lambda s: tensor_shape.TensorShape([None]).concatenate(s),
          size)
      layer_output_shape = self._output_layer._compute_output_shape(  # pylint: disable=protected-access
          output_shape_with_unknown_batch)
      return nest.map_structure(lambda s: s[1:], layer_output_shape)

  @property
  def output_size(self):
    # Return the cell output and the id
    return BeamSearchDecoderOutput(
        scores=tensor_shape.TensorShape([self._beam_width]),
        predicted_ids=tensor_shape.TensorShape([self._beam_width]),
        parent_ids=tensor_shape.TensorShape([self._beam_width]))

  @property
  def output_dtype(self):
    # Assume the dtype of the cell is the output_size structure
    # containing the input_state's first component's dtype.
    # Return that structure and int32 (the id)
    dtype = nest.flatten(self._initial_cell_state)[0].dtype
    return BeamSearchDecoderOutput(
        scores=nest.map_structure(lambda _: dtype, self._rnn_output_size()),
        predicted_ids=dtypes.int32,
        parent_ids=dtypes.int32)

  def initialize(self, name=None):
    """Initialize the decoder.

    Args:
      name: Name scope for any created operations.

    Returns:
      `(finished, start_inputs, initial_state)`.
    """
    finished, start_inputs = self._finished, self._start_inputs

    initial_state = BeamSearchDecoderState(
        cell_state=self._initial_cell_state,
        log_probs=array_ops.zeros(
            [self._batch_size, self._beam_width],
            dtype=nest.flatten(self._initial_cell_state)[0].dtype),
        finished=finished,
        lengths=array_ops.zeros(
            [self._batch_size, self._beam_width], dtype=dtypes.int32))

    return (finished, start_inputs, initial_state)

  def finalize(self, outputs, final_state, sequence_lengths):
    """Finalize and return the predicted_ids.

    Args:
      outputs: An instance of BeamSearchDecoderOutput.
      final_state: An instance of BeamSearchDecoderState. Passed through to the
        output.
      sequence_lengths: An `int32` tensor shaped `[batch_size, beam_width]`.
        The sequence lengths determined for each beam during decode.

    Returns:
      outputs: An instance of FinalBeamSearchDecoderOutput where the
        predicted_ids are the result of calling _gather_tree.
      final_state: The same input instance of BeamSearchDecoderState.
    """
    predicted_ids = beam_search_ops.gather_tree(
        outputs.predicted_ids, outputs.parent_ids,
        sequence_length=sequence_lengths)
    outputs = FinalBeamSearchDecoderOutput(
        beam_search_decoder_output=outputs, predicted_ids=predicted_ids)
    return outputs, final_state

  def _merge_batch_beams(self, t, s=None):
    """Merges the tensor from a batch of beams into a batch by beams.

    More exactly, t is a tensor of dimension [batch_size, beam_width, s]. We
    reshape this into [batch_size*beam_width, s]

    Args:
      t: Tensor of dimension [batch_size, beam_width, s]
      s: (Possibly known) depth shape.

    Returns:
      A reshaped version of t with dimension [batch_size * beam_width, s].
    """
    if isinstance(s, ops.Tensor):
      s = tensor_shape.as_shape(tensor_util.constant_value(s))
    else:
      s = tensor_shape.TensorShape(s)
    t_shape = array_ops.shape(t)
    static_batch_size = tensor_util.constant_value(self._batch_size)
    batch_size_beam_width = (
        None if static_batch_size is None
        else static_batch_size * self._beam_width)
    reshaped_t = array_ops.reshape(
        t, array_ops.concat(
            ([self._batch_size * self._beam_width], t_shape[2:]), 0))
    reshaped_t.set_shape(
        (tensor_shape.TensorShape([batch_size_beam_width]).concatenate(s)))
    return reshaped_t

  def _split_batch_beams(self, t, s=None):
    """Splits the tensor from a batch by beams into a batch of beams.

    More exactly, t is a tensor of dimension [batch_size*beam_width, s]. We
    reshape this into [batch_size, beam_width, s]

    Args:
      t: Tensor of dimension [batch_size*beam_width, s].
      s: (Possibly known) depth shape.

    Returns:
      A reshaped version of t with dimension [batch_size, beam_width, s].

    Raises:
      ValueError: If, after reshaping, the new tensor is not shaped
        `[batch_size, beam_width, s]` (assuming batch_size and beam_width
        are known statically).
    """
    if isinstance(s, ops.Tensor):
      s = tensor_shape.TensorShape(tensor_util.constant_value(s))
    else:
      s = tensor_shape.TensorShape(s)
    t_shape = array_ops.shape(t)
    reshaped_t = array_ops.reshape(
        t, array_ops.concat(
            ([self._batch_size, self._beam_width], t_shape[1:]), 0))
    static_batch_size = tensor_util.constant_value(self._batch_size)
    expected_reshaped_shape = tensor_shape.TensorShape(
        [static_batch_size, self._beam_width]).concatenate(s)
    if not reshaped_t.shape.is_compatible_with(expected_reshaped_shape):
      raise ValueError("Unexpected behavior when reshaping between beam width "
                       "and batch size.  The reshaped tensor has shape: %s.  "
                       "We expected it to have shape "
                       "(batch_size, beam_width, depth) == %s.  Perhaps you "
                       "forgot to create a zero_state with "
                       "batch_size=encoder_batch_size * beam_width?"
                       % (reshaped_t.shape, expected_reshaped_shape))
    reshaped_t.set_shape(expected_reshaped_shape)
    return reshaped_t

  def _maybe_split_batch_beams(self, t, s):
    """Maybe splits the tensor from a batch by beams into a batch of beams.

    We do this so that we can use nest and not run into problems with shapes.

    Args:
      t: Tensor of dimension [batch_size*beam_width, s]
      s: Tensor, Python int, or TensorShape.

    Returns:
      Either a reshaped version of t with dimension
      [batch_size, beam_width, s] if t's first dimension is of size
      batch_size*beam_width or t if not.

    Raises:
      TypeError: If t is an instance of TensorArray.
      ValueError: If the rank of t is not statically known.
    """
    _check_maybe(t)
    if t.shape.ndims >= 1:
      return self._split_batch_beams(t, s)
    else:
      return t

  def _maybe_merge_batch_beams(self, t, s):
    """Splits the tensor from a batch by beams into a batch of beams.

    More exactly, t is a tensor of dimension [batch_size*beam_width, s]. We
    reshape this into [batch_size, beam_width, s]

    Args:
      t: Tensor of dimension [batch_size*beam_width, s]
      s: Tensor, Python int, or TensorShape.

    Returns:
      A reshaped version of t with dimension [batch_size, beam_width, s].

    Raises:
      TypeError: If t is an instance of TensorArray.
      ValueError:  If the rank of t is not statically known.
    """
    _check_maybe(t)
    if t.shape.ndims >= 2:
      return self._merge_batch_beams(t, s)
    else:
      return t

  def step(self, time, inputs, state, name=None):
    """Perform a decoding step.

    Args:
      time: scalar `int32` tensor.
      inputs: A (structure of) input tensors.
      state: A (structure of) state tensors and TensorArrays.
      name: Name scope for any created operations.

    Returns:
      `(outputs, next_state, next_inputs, finished)`.
    """
    batch_size = self._batch_size
    beam_width = self._beam_width
    end_token = self._end_token
    length_penalty_weight = self._length_penalty_weight

    with ops.name_scope(name, "BeamSearchDecoderStep", (time, inputs, state)):
      cell_state = state.cell_state
      inputs = nest.map_structure(
          lambda inp: self._merge_batch_beams(inp, s=inp.shape[2:]), inputs)
      cell_state = nest.map_structure(
          self._maybe_merge_batch_beams,
          cell_state, self._cell.state_size)
      cell_outputs, next_cell_state = self._cell(inputs, cell_state)
      cell_outputs = nest.map_structure(
          lambda out: self._split_batch_beams(out, out.shape[1:]), cell_outputs)
      next_cell_state = nest.map_structure(
          self._maybe_split_batch_beams,
          next_cell_state, self._cell.state_size)

      if self._output_layer is not None:
        cell_outputs = self._output_layer(cell_outputs)

      beam_search_output, beam_search_state = _beam_search_step(
          time=time,
          logits=cell_outputs,
          next_cell_state=next_cell_state,
          beam_state=state,
          batch_size=batch_size,
          beam_width=beam_width,
          end_token=end_token,
          length_penalty_weight=length_penalty_weight)

      finished = beam_search_state.finished
      sample_ids = beam_search_output.predicted_ids
      next_inputs = control_flow_ops.cond(
          math_ops.reduce_all(finished), lambda: self._start_inputs,
          lambda: self._embedding_fn(sample_ids))

    return (beam_search_output, beam_search_state, next_inputs, finished)

def _beam_search_step(time, logits, next_cell_state, beam_state, batch_size,
                      beam_width, end_token, length_penalty_weight):
  """Performs a single step of Beam Search Decoding.

  Args:
    time: Beam search time step, should start at 0. At time 0 we assume
      that all beams are equal and consider only the first beam for
      continuations.
    logits: Logits at the current time step. A tensor of shape
      `[batch_size, beam_width, vocab_size]`
    next_cell_state: The next state from the cell, e.g. an instance of
      AttentionWrapperState if the cell is attentional.
    beam_state: Current state of the beam search.
      An instance of `BeamSearchDecoderState`.
    batch_size: The batch size for this input.
    beam_width: Python int.  The size of the beams.
    end_token: The int32 end token.
    length_penalty_weight: Float weight to penalize length. Disabled with 0.0.

  Returns:
    A new beam state.
  """
  static_batch_size = tensor_util.constant_value(batch_size)

  # Calculate the current lengths of the predictions
  prediction_lengths = beam_state.lengths
  previously_finished = beam_state.finished

  # Calculate the total log probs for the new hypotheses
  # Final Shape: [batch_size, beam_width, vocab_size]
  step_log_probs = nn_ops.log_softmax(logits)
  step_log_probs = _mask_probs(step_log_probs, end_token, previously_finished)
  total_probs = array_ops.expand_dims(beam_state.log_probs, 2) + step_log_probs

  # Calculate the continuation lengths by adding to all continuing beams.
  vocab_size = logits.shape[-1].value or array_ops.shape(logits)[-1]
  lengths_to_add = array_ops.one_hot(
      indices=array_ops.tile(
          array_ops.reshape(end_token, [1, 1]), [batch_size, beam_width]),
      depth=vocab_size,
      on_value=0,
      off_value=1)
  add_mask = (1 - math_ops.to_int32(previously_finished))
  lengths_to_add = array_ops.expand_dims(add_mask, 2) * lengths_to_add
  new_prediction_lengths = (
      lengths_to_add + array_ops.expand_dims(prediction_lengths, 2))

  # Calculate the scores for each beam
  scores = _get_scores(
      log_probs=total_probs,
      sequence_lengths=new_prediction_lengths,
      length_penalty_weight=length_penalty_weight)

  time = ops.convert_to_tensor(time, name="time")
  # During the first time step we only consider the initial beam
  scores_shape = array_ops.shape(scores)
  scores_flat = control_flow_ops.cond(
      time > 0,
      lambda: array_ops.reshape(scores, [batch_size, -1]),
      lambda: scores[:, 0])
  num_available_beam = control_flow_ops.cond(
      time > 0, lambda: math_ops.reduce_prod(scores_shape[1:]),
      lambda: math_ops.reduce_prod(scores_shape[2:]))

  # Pick the next beams according to the specified successors function
  next_beam_size = math_ops.minimum(
      ops.convert_to_tensor(beam_width, dtype=dtypes.int32, name="beam_width"),
      num_available_beam)
  next_beam_scores, word_indices = nn_ops.top_k(scores_flat, k=next_beam_size)
  next_beam_scores.set_shape([static_batch_size, beam_width])
  word_indices.set_shape([static_batch_size, beam_width])

  # Pick out the probs, beam_ids, and states according to the chosen predictions
  next_beam_probs = _tensor_gather_helper(
      gather_indices=word_indices,
      gather_from=total_probs,
      batch_size=batch_size,
      range_size=beam_width * vocab_size,
      gather_shape=[-1])
  next_word_ids = math_ops.to_int32(word_indices % vocab_size)
  next_beam_ids = math_ops.to_int32(word_indices / vocab_size)

  # Append new ids to current predictions
  previously_finished = _tensor_gather_helper(
      gather_indices=next_beam_ids,
      gather_from=previously_finished,
      batch_size=batch_size,
      range_size=beam_width,
      gather_shape=[-1])
  next_finished = math_ops.logical_or(previously_finished,
                                      math_ops.equal(next_word_ids, end_token))

  # Calculate the length of the next predictions.
  # 1. Finished beams remain unchanged
  # 2. Beams that are now finished (EOS predicted) remain unchanged
  # 3. Beams that are not yet finished have their length increased by 1
  lengths_to_add = math_ops.to_int32(
      math_ops.not_equal(next_word_ids, end_token))
  lengths_to_add = (1 - math_ops.to_int32(next_finished)) * lengths_to_add
  next_prediction_len = _tensor_gather_helper(
      gather_indices=next_beam_ids,
      gather_from=beam_state.lengths,
      batch_size=batch_size,
      range_size=beam_width,
      gather_shape=[-1])
  next_prediction_len += lengths_to_add

  # Pick out the cell_states according to the next_beam_ids. We use a
  # different gather_shape here because the cell_state tensors, i.e.
  # the tensors that would be gathered from, all have dimension
  # greater than two and we need to preserve those dimensions.
  # pylint: disable=g-long-lambda
  next_cell_state = nest.map_structure(
      lambda gather_from: _maybe_tensor_gather_helper(
          gather_indices=next_beam_ids,
          gather_from=gather_from,
          batch_size=batch_size,
          range_size=beam_width,
          gather_shape=[batch_size * beam_width, -1]),
      next_cell_state)
  # pylint: enable=g-long-lambda

  next_state = BeamSearchDecoderState(
      cell_state=next_cell_state,
      log_probs=next_beam_probs,
      lengths=next_prediction_len,
      finished=next_finished)

  output = BeamSearchDecoderOutput(
      scores=next_beam_scores,
      predicted_ids=next_word_ids,
      parent_ids=next_beam_ids)

  return output, next_state

def _get_scores(log_probs, sequence_lengths, length_penalty_weight):
  """Calculates scores for beam search hypotheses.

  Args:
    log_probs: The log probabilities with shape
      `[batch_size, beam_width, vocab_size]`.
    sequence_lengths: The array of sequence lengths.
    length_penalty_weight: Float weight to penalize length. Disabled with 0.0.

  Returns:
    The scores normalized by the length_penalty.
  """
  length_penality_ = _length_penalty(
      sequence_lengths=sequence_lengths, penalty_factor=length_penalty_weight)
  return log_probs / length_penality_

def _length_penalty(sequence_lengths, penalty_factor):
  """Calculates the length penalty. See https://arxiv.org/abs/1609.08144.

  Args:
    sequence_lengths: The sequence length of all hypotheses, a tensor
      of shape [beam_size, vocab_size].
    penalty_factor: A scalar that weights the length penalty.

  Returns:
    The length penalty factor, a tensor fo shape [beam_size].
  """
  penalty_factor = ops.convert_to_tensor(penalty_factor, name="penalty_factor")
  penalty_factor.set_shape(())  # penalty should be a scalar.
  static_penalty = tensor_util.constant_value(penalty_factor)
  if static_penalty is not None and static_penalty == 0:
    return 1.0
  return math_ops.div((5. + math_ops.to_float(sequence_lengths))
                      **penalty_factor, (5. + 1.)**penalty_factor)

def _mask_probs(probs, eos_token, finished):
  """Masks log probabilities.

  The result is that finished beams allocate all probability mass to eos and
  unfinished beams remain unchanged.

  Args:
    probs: Log probabiltiies of shape `[batch_size, beam_width, vocab_size]`
    eos_token: An int32 id corresponding to the EOS token to allocate
      probability to.
    finished: A boolean tensor of shape `[batch_size, beam_width]` that
      specifies which
      elements in the beam are finished already.

  Returns:
    A tensor of shape `[batch_size, beam_width, vocab_size]`, where unfinished
    beams stay unchanged and finished beams are replaced with a tensor with all
    probability on the EOS token.
  """
  vocab_size = array_ops.shape(probs)[2]
  finished_mask = array_ops.expand_dims(
      math_ops.to_float(1. - math_ops.to_float(finished)), 2)
  # These examples are not finished and we leave them
  non_finished_examples = finished_mask * probs
  # All finished examples are replaced with a vector that has all
  # probability on EOS
  finished_row = array_ops.one_hot(
      eos_token,
      vocab_size,
      dtype=probs.dtype,
      on_value=0.,
      off_value=probs.dtype.min)
  finished_examples = (1. - finished_mask) * finished_row
  return finished_examples + non_finished_examples

def _maybe_tensor_gather_helper(gather_indices, gather_from, batch_size,
                                range_size, gather_shape):
  """Maybe applies _tensor_gather_helper.

  This applies _tensor_gather_helper when the gather_from dims is at least as
  big as the length of gather_shape. This is used in conjunction with nest so
  that we don't apply _tensor_gather_helper to inapplicable values like scalars.

  Args:
    gather_indices: The tensor indices that we use to gather.
    gather_from: The tensor that we are gathering from.
    batch_size: The batch size.
    range_size: The number of values in each range. Likely equal to beam_width.
    gather_shape: What we should reshape gather_from to in order to preserve the
      correct values. An example is when gather_from is the attention from an
      AttentionWrapperState with shape [batch_size, beam_width, attention_size].
      There, we want to preserve the attention_size elements, so gather_shape is
      [batch_size * beam_width, -1]. Then, upon reshape, we still have the
      attention_size as desired.

  Returns:
    output: Gathered tensor of shape tf.shape(gather_from)[:1+len(gather_shape)]
      or the original tensor if its dimensions are too small.
  """
  _check_maybe(gather_from)
  if gather_from.shape.ndims >= len(gather_shape):
    return _tensor_gather_helper(
        gather_indices=gather_indices,
        gather_from=gather_from,
        batch_size=batch_size,
        range_size=range_size,
        gather_shape=gather_shape)
  else:
    return gather_from

def _tensor_gather_helper(gather_indices, gather_from, batch_size,
                          range_size, gather_shape):
  """Helper for gathering the right indices from the tensor.

  This works by reshaping gather_from to gather_shape (e.g. [-1]) and then
  gathering from that according to the gather_indices, which are offset by
  the right amounts in order to preserve the batch order.

  Args:
    gather_indices: The tensor indices that we use to gather.
    gather_from: The tensor that we are gathering from.
    batch_size: The input batch size.
    range_size: The number of values in each range. Likely equal to beam_width.
    gather_shape: What we should reshape gather_from to in order to preserve the
      correct values. An example is when gather_from is the attention from an
      AttentionWrapperState with shape [batch_size, beam_width, attention_size].
      There, we want to preserve the attention_size elements, so gather_shape is
      [batch_size * beam_width, -1]. Then, upon reshape, we still have the
      attention_size as desired.

  Returns:
    output: Gathered tensor of shape tf.shape(gather_from)[:1+len(gather_shape)]
  """
  range_ = array_ops.expand_dims(math_ops.range(batch_size) * range_size, 1)
  gather_indices = array_ops.reshape(gather_indices + range_, [-1])
  output = array_ops.gather(
      array_ops.reshape(gather_from, gather_shape), gather_indices)
  final_shape = array_ops.shape(gather_from)[:1 + len(gather_shape)]
  static_batch_size = tensor_util.constant_value(batch_size)
  final_static_shape = (tensor_shape.TensorShape([static_batch_size])
                        .concatenate(
                            gather_from.shape[1:1 + len(gather_shape)]))
  output = array_ops.reshape(output, final_shape)
  output.set_shape(final_static_shape)
  return output

redpajama_set_name: RedPajamaGithub


Studio Bartoli Design Magenta Joko Chair for Kristalia. Gently used with minimal wear. Difficult to capture the electric magenta tone ... moreStudio Bartoli Design Magenta Joko Chair for Kristalia. Gently used with minimal wear. Difficult to capture the electric magenta tone correctly as Clouds pass by through the windows. Visit ambientedirect to see more about this chair and color charts. This is a classic and in excellent condition!


We are accomplished in the design and installation of willow structures. A great structural element for garden spaces.
Whether you are looking for alternative methods for fencing, gazebo or just to create a visual talking point amongst friends and neighbours. Please use the contact page to enquire.


text:
Crivitz é uma vila localizada no estado norte-americano de Wisconsin, no Condado de Marinette.

Demografia
Segundo o censo norte-americano de 2000, a sua população era de 998 habitantes.
Em 2006, foi estimada uma população de 997, um decréscimo de 1 (-0.1%).

Geografia
De acordo com o United States Census Bureau tem uma área de
3,9 km², dos quais 3,9 km² cobertos por terra e 0,0 km² cobertos por água. Crivitz localiza-se a aproximadamente 204 m acima do nível do mar.

Localidades na vizinhança
O diagrama seguinte representa as localidades num raio de 32 km ao redor de Crivitz.

Ligações externas

Vilas do Wisconsin

redpajama_set_name: RedPajamaWikipedia


This is soooo quick and easy, I came up with it when I was searching the cupboard and freezer for something to make for the kids when we didn't have a kitchen, just a microwave. I didn't make much because Rob and I planned to have a takeaway later but it was so yummy that I regretted it after and have since made it for the whole family.
It literally takes about 10 mins, or as long as the pasta takes to boil.
Quantities are a bit random for this one, depending on whether you're making it just for the kids of for the whole family. This much makes enough for three hungry children plus left overs for packed lunches the next day.
Get the pasta boiling (did you know, once it's at a rolling boil you can turn the gas/hob off and leave it for the the time on the pack and it'll be cooked perfectly... little money saver there for you! Although it doesn't really work for spaghetti).
Put the prawns, peas, sweetcorn, spring onion and butter in a bowl and microwave it to defrost and warm up (if you're organised enough to defrost them earlier then well done!). If they make loads of liquid then pour a bit off.
Once they are hot stir in the Philadelphia and stir into the cooked pasta. Add the cheese and serve.
You'll be amazed how yummy this one is!
I did not know that about pasta!


text:
Surfers at Killalea Beach ('The Farm'), Shell Cove
Shellharbour Area
Perfectly positioned between the picturesque Illawarra Escarpment and the blue waters of the Tasman Sea, Shellharbour is a vibrant destination on the NSW South Coast of NSW. Discover gorgeous beaches, world-class surf breaks, famous dive sites and magnificent national parks.
Beaches and water sports
Relax on white sand beaches all along the stunning coastline. Shellharbour is home to one of Australia's few National Surfing Reserves at Killalea. Catch a wave at two iconic breaks, The Farm at Killalea Beach and Mystics at Minnamurra Beach.
The area is also known for its excellent snorkelling and diving. Visit Bushrangers Bay Aquatic Reserve, where underwater cliffs are teeming with marine life. Shellharbour Scuba Centre runs regular tours. At Bass Point Reserve, divers can explore shipwrecks off the coast, the first dating back to 1879.
Enjoy the serenity of Lake Illawarra by learning to stand-up paddle board with an accredited instructor. For a special SUP experience join a sunrise or night tour. Drop a line in and try your luck at fishing or grab your bike (or hire one) and enjoy the scenic coastal cycleways.
Lace up your hiking boots and explore rare littoral rainforests, waterfalls and hidden beaches on the Cascades and Clover Hill trails in the Macquarie Pass National Park. Bass Point Reserve is a place of significant cultural and natural heritage, which you can explore on a self-guided indigenous walk.
The delightful seaside town of Shellharbour Village is perfect for a beach holiday with cafes, restaurants, specialty shops and a splendid golf course, the picturesque The Links Shell Cove. Nearby, the Calderwood Valley Golf Course is on the edge of the beautiful cliffs of the Illawarra Escarpment.
A short drive west is Albion Park. Visit the HARS Aviation Museum, where you can sit in the pilot's seat of an F-111 fighter jet or walk the wing of the record breaking Qantas 747-400. The town is also home to Australia's largest air show, Wings Over Illawarra, held each May at Shellharbour Airport.
Take a ride in carriages from the golden age of rail travel, hop on a steam or diesel train, and circle the grounds on a miniature train at the Illawarra Light Railway Museum. For an unforgettable experience, try a scenic joy flight with Touchdown Helicopters to get a bird's eye view of Shellharbour from the sky.
There's plenty for the kids as well. Zip around the track in a go-kart or challenge your friends to laser tag at C1 Speed Indoor Karting, then put on your skates and have fun rolling around the region's only skating rink at Oak Flats.
Getting there and where to stay
The Shellharbour region is two hours' drive from Sydney along the Grand Pacific Drive. You can also catch a train direct from Sydney to Albion Park or Shellharbour Junction, which takes around two hours. Places to stay include resorts, holiday parks, beach houses and apartments.
Learn to surf at Killalea
SUP with Stand Up Paddleboarding Shellharbour
Visit the HARS Aviation Museum
Explore the Illawarra Light Railway Museum
Dive with Shellharbour Scuba Centre
World-class surf beaches
Great diving and snorkelling
Scenic nature walks
Fly into Shellharbour Airport
Shellharbour Airport is located at Albion Park and is the gateway to Shellharbour City.
Flying to Shellharbour is the fastest way to enjoy everything the region has to offer from surfing at a National Surfing Reserve or enjoying a round of golf, to spectacular beaches, beautiful scenery, bush walking and more.
Link Airways operates direct flights from Shellharbour to Melbourne five days a week and Shellharbour to Brisbane four days a week.
Eat Play Stay

redpajama_set_name: RedPajamaCommonCrawl


I'm a web developer in Vancouver, BC. I build web applications, doing everything from interface design all the way down to server setup.
Coding is fun, but nothing beats flying. So I go hang gliding.
hnapp – Hacker News app to build custom RSS and JSON feeds. Follow users, keywords, jobs, mentions of your product, etc.
Koiflow – Keyboard-only outlines app. Quite outdated at this point, but very reliable and user-efficient.
All my notes live here.
Chopper Defense – I made an iPad game once, everything from coding to artwork to sound mixing. It was challending and fun.
Still runs on my original iPad.
Me & Nastya (my wife) are active hang glider pilots. In fact, we've first met at a flying school. It's a big part of our lives.


Why is the RiscPC been such a successful product? And the answer to that is, a really well designed piece of kit, it had tremendous upgrade capabilities, so we have been able to expand it, keep it going, keep it moving with things as new developments come in. But one of the things which really make the RiscPC, where its name came from, the PC part of its name, was the ability to run what other people intend to call, "industry standard" applications. I hate that term at the moment. I'm sure everybody else here does, but that's what everybody else calls them.
However, having said all that, the world in which we are operating is now changing. Things are moving on and changing and one of the biggest drivers for this is the increasing use of networks, both local are networks within buildings, within schools, within offices and so on and also wide area and the Internet. I would have [thought?] the majority of the people in this room have used a computer which is connected to some form of network. And with the introduction of networks is come a lot of platform independence now. So if people try to network and try to get information across between different machines, so they developed enhanced new standards. The main one of these that drives away is HTML. I'm sure everyone is familiar with, but having said that, there is a new one emerging, which is Java.
Just talk for a little bit about what Java is, for those of you that probably [picked up the CD that we're doing?] and curious to know. Java is more than just a programming language. It's a whole architecture behind you making code which is very object oriented and C++ like but actually making it platform independent, the ability to run whatever code you write on anybody's platform, not just Windows or whatever, but any platform. Obviously to do that, you need to have a [close?] security model, so that you don't prejudice to viruses, that's another one of the threads which RISC OS people, because our operating system is in ROM are been relatively immune from in time, but Windows users had to struggle with.
The way Java works is, you actually have several different layers. At the bottom layer you have the hardware. So that's what actually runs it. The StrongARM or the ARM7 [...?] or whatever. On top of that we let run our operating system, RISC OS and on top of that we run a thing called a virtual machine. This presents to the Java applications, the code right on top, the environment in which it will operate. There are various different ways of doing this. You can either interpret the code on the fly as it comes in, so it's a bit like the BASIC interpreter or alternatively you can actually run what's called a JIT, or a Just In Time compiler that takes the code as it downloads it, compiles it and then runs it straight on the operating system. It runs it within the virtual machine framework on the operating system itself. So those are the two different ways that Java operates there.
Talking a bit about Java and one of the things when you start looking at Java you think, yeah, but there is nothing out there. Where are all the applications? What's going on? When you actually start searching around to the web and you talk to people within Sun, what you find is that, out that are an awful lot of development tools, tools for developing Java, working with Java and computing applications and also there is a really quite [...?] small little applications and applets that are around. But what you don't see is a vast array of major commercial software. Well if you look at the sort of timelines of development, the application programming tools are come up. The applets are come up. But as yet, we have yet to see the real explosion in commercial applications. This is just at this moment around about now set to change and soon we will start to see a major lift off.
Companies like Lotus who have been investing huge amounts of money during [...?] in developing a [...?] of software in Java and starting next month, they tell us, in November they will be launching a whole word package called Kona, which includes database, spreadsheet and all the rest of it. Presentation, [...?], schedulers and so on. So that's one of the first ones. Talking to the people at Sunsoft they reckon that there is something like about 400,000 programmers, actively developing in Java right now. And they are developing what will become the mainstream commercial applications for the future.
So, why are people using Java? What is it about Java that it is so attractive? Well, for a start, despite of all the propaganda that we get to [hear continuously?] there are actually in use other platforms other than Wintel. In particularly the platforms that Sun themselves make, the workstations and there are platforms like ours, Acorn, Apple and there is also been the [...?] [explotionary?] evolution of the thin clients. Now Acorn is very active in so. We are working with a number of people to develop thin clients and TV centric technology in all kinds of different ways and forms. But what you [...?] that is now exploding in the case of the USA [...?].
What should Acorn do about it? What we see the first steps for us is to release a Java desktop machine. So that's what we are doing here today. We got a beta of the Java virtual machine available at the show for free to help build the understanding. So you guys can actually see what's it all about. You can look at websites that run it. You can actually work on it. See how it all goes together. And in exchange for that we get a much wider testing of what we've done than what otherwise would be possible. So we're building some understanding, getting a lot of testing. We then need to follow that up with some products.
So the first one we are going to do will be a RiscPC which is specifically built to run Java to make to most out of it. We use the fastest processor we got available, which is the 233MHz StrongARM. And we'll have enough memory to run Java. The virtual machine that we use if actually reasonably memory hungry, it's one of the first things we've done and it's very memory hungry, so we will actually put 32MB memory into that. And we'll [up spec?] all the peripheral see we have a reasonable speed CD-ROM, that's 24 speed and 1.7GB harddrive, [...?].
Obviously on that we'll include webbrowsers, that you can access them today and Java and we will also for those people who are working on local area networks, we'll include Omniclient and we are gonna do that for pretty much the same prices as we have been doing it for current top of the range models of today.
Then we have to follow that up with a software release, early on next year probably. So we'll take on feedback from the beta trial, make sure we fix all that and it's part of our mainstream development, so we're gonna take care of all that information. And get a fully tested, proper copy of release out, which we'll be able to sell, early '98. So, we get Java out on our desktop and that's good, we're doing that now, we're starting that process today. We then also need to improve machine performance.
We get 1 or 2 questions on the stand. [...?] what we are doing about the portables. And one of the things is, once you start looking at Java, you really need a StrongARM to make the most out of what it can do. And, when you look at portables and StrongARMs, Digital just happened to have released very recently, a brand new processor they announced they call the SA1100. And this is very very exciting from the point of view of a lot of the licensees that we've been talking to. It's a very attractive product. It's a StrongARM core for up to around 200MHz, but really importantly it has built in to the actual chip itself all support that you need to run LCD displays.
Now, before where we've done portables, we've actually had to do that externally to the main processor. Which has consumed vat amounts of board area, power and memory and all sorts of other things. And particularly the SA1100 has built in support for STN panels. There are low-cost passive displays, colour displays, which have improved enormous in quality and made the sort of price/performance trade-off it proves/works much much more attractive. And also, the SA1100 has enough power in it to be able to develop a softmodem.
Now, we wanted to produce a portable before now, but one of the problems that we faced in doing this is that the size of the potential market for a RISC OS portable, it's not tiny, it's reasonably big, but it's just not never been big enough. So what we need to do, is we actually need to work with a development partner, to get a reasonably large volume going, so that we can actually take advantage of that and produce a product in the sort of volumes we're looking at the sort of price people be happy to pay. We don't really want to start producing portables at 4 or 5 grand, for a RISC OS portable, because that's a bit silly, although a few people might happen to buy that, that's not really what we're going to do. We want to be in the 1 to 2000 pound area with a reasonable volume and we can do that with a partner. So we're working with a number of people on this [SA1100?] at the moment.
The other thing which we need to do, this is the other thing which we are looking at at the show, is how we improve the desktop performance. The RiscPC as it stands at the moment has done very very well for a number of years, but when you start to look at Java and what that uses of the machine we realise we actually have to really improve the way that the processor, the StrongARM processor talks to memory, because we really need to get that much much faster than it currently is. So we need to improve the memory system so we use the latest in memory technology, we're updating the memory controller so that it goes as fast as it possibly can.
And we're also going to improve the I/O system so that it can actually talk to PCI peripherals. And also improve the I/O systems so that we get faster access to and from harddrives, and everything else. So we really need to boost up the performance of the desktop computer, and also, as part of the whole thing that we're doing, as much as we have done on the RiscPC - it's been extremely successful - we need a provision for some of the newer processors that are coming out from Digital. And this we're doing, this is the project codenamed Pheobe, that a lot of you have been heard of RiscPC II.
Now we're not gonna call it RiscPC II. David Lee launched a competition to choose a new name for the RiscPC. So we're following that up with some mailings and some communication and so, so we can actually come up with a really good name for it. and we expect to ship that during Q2 '98.
And also if you're going to look at Java seriously, you need to improve the networkcomputer performance, because we really want to run Java well, and so we're looking at a StrongARM version. And we've got a demonstration of that here at the show. And that demonstrator, the coNCord, which is the launch name for it, is attracting an awful lot of attention from a number of people interested in licensing the design and taking it further forwards.
We've also got set-top boxes at the show. Now set-top boxes traditionally we have thought people are tended to think of as simply MPEG decode boxes that display digital video on a TV screen. Well, it's a bit more than that, because a lot of the companies looking to take this forward, thinking about how they develop the user interfaces, and they are developing those user interfaces in Java, to run on the set-top box with the MPEG stream simultaneously.
So we need to improve the performance of the set-top box. In fact we actually have a set-top box which is running Java and demonstrating user interfaces at the moment. And this will help us to really build on the LanTV concept for the local area networks where we have the service provision of going in.
We also need to improve RISC OS and one of the things which we have to o is to support Java files a bit better and Java files are not short name files, they are long filenames, so we actually have to put into our operating system, the ability to handle long filenames. And we also need to improve the way that we interact between the memory and how we make the most of the fast memory that we have. And the fast SRAM in particularly for the very critical tasks. But for some things Java is still not as fast as we would like it, it could do to be improved, things such as the games which we're demonstrating, will always need to be run native, in native code on the platform as close to the hardware as they can get.
And we need to constantly update and redevelop RISC OS, our main desktop operating system, so we can keep it fresh and alive and nice and fun to use. So we released Java on the desktop machines, we boost up the machine performance. What else do we need to do?
We need to continuously develop. We can't just say, OK, here it is, we've done it, end of story, [tick?]. We need to continuously invest in the development of it. The version of Java which we are releasing in the beta trial is Java 1.0.2. There is a virtual machine for that. We're actually working on the Just In Time compiler. And I think that's been demonstrated on the stand today. Just recently sparked into life. And we're actually working on porting the next version of Java and it will go on and on, and continuously develop and move forward.
We're also looking at completely restructuring the operating system underneath all of this. One of the things that Java needs is provision for pre-emptive multitasking and multithreading. And that's what the virtual machine provides the Java applications in its use. And so what we're actually doing is, we're looking into rebuilding the kernel, underneath all of this and providing those services not through the RISC OS layer, but actually directly to the hardware.
This project is codenamed Galileo. It has some other very key features, which is the fact that we're developing a quality of service concept, so when you have critical processes that need a certain amount of processor bandwidth, then the operating system will guarantee no matter what is happening, no matter what anybody is going around it, it will guarantee to deliver that amount of processing power to the application. So updating on the line of operating systems.
So as the result of all this, and what we're doing at starting the process today, we're really well placed on a desktop [...?] to take advantage of the shift away from Microsoft, to work with what's happening with thin clients and the way that Java and thin clients will be starting to roll out in large volumes to cross the marketplace. And take advantage of the explosion in the Java applications. And I think at this point, if I can I like to hand over - is he here? Did I talk too quickly through that? [yes you did ;-) - LogiX] - is he gone, is he?
So let's go through the general and corporate presentation. I'll cover a few items on what we're doing technologically and then before we wrap up we'll do a Q&A and I'll have to guess what the first question will be, but I think the words Digital and Intel will be in it, but that's my first prediction. So let's just summarise from a corporate viewpoint Acorn.
Two and a half years on after we started down the technology direction, we've now completed the restructuring of our organisation, we're back to a single organisation, so there's no more Online Media, no more ART, no more Network Computer Division, we're back to the little green nut and Acorn.
We have one now very large single integrated engineering organisation and we have one single world wide sales and marketing organisation, so a lot of the problems and issues that we were suffering from for the last year or so have now been removed. As part of that we have recruited two new directors. [Stan Burgeon?] joined us head of finance, couple of months ago and on November the 20th our new sales and marketing director joins from a major TV based organisation, so that will obviously add [...?] to our TV type focuses.
We continue to focus heavily in investment in both people and technology. At this point now, we have more people in engineering than at any point in Acorn's history. We're investing more in both customer and [specutive?] engineering than at any point in Acorn's history and we're actually investing in people in a variety of training and career development programs, the way that's not been seen of Acorn for many years.
Our strategy of going down the technology route continues. We've learnt a few things on the way. Some things we tried to do have not been as successful as we would like them to be. But we've been very quick to learn and to revise that. So our overall philosophy is very much the same as we started half or two years ago. I think the major thing from the product viewpoint, which is always Chris's and my viewpoint is that we've now found a natural and sustainable balance between the product type business the we run and the technology business. And I think this weeks show shows the relationship between those with.
Some of our new customers our coming online, our American cousins with some of their new product, Curtis Mathes, [...?], etcetera. Hopefully next year even more will be public domain then they are today. The rate of change for Acorn has been very rapid. 40% of our business now comes from technology, which from a cold start two years ago is a very impressive rate of climb.
We now have agents in Japan, Taiwan and Korea. We will open an Acorn office in the United States probably in the first quarter of next year. We'll probably open a Japanese office to service the far east sometime in the second/third quarter of next year. We've won something alike more than 50% of the first generation of network computers wins out there. We've watched a number of our competitors failed to achieve what they promised, so therefore, we're ideally placed now for the second generation of systems which are about to happen.
We are one of the few companies that actually did deliver what was promised. Most of our American colleagues were strong on rhetoric, less strong on delivery. Now that the second generation designs are coming up for grabs, we are in the prime position to exploit that. Ironically having apparently destroyed the Online Media organisation and merging the thing to the rest of Acorn we also now find that the set-top box business is now picking up steam with quite regular orders and we've received a number of these in the last few months. So the STB business has stabilised as well.
In terms of a few examples of people who are working with, either in a traditional customer relationship or in a kind of partner relationship. Here are some of the people in the public domain. There is Digital with its new series of superchips of which more later.
There is [...?] with navigation computers, NTT with their first generation video conferencing, [Sprint?] with ultra high speed set-top boxes. Curtis Mathes here with a super home TV concept. RCA with a network computer. We continue, despite maybe not obviously to be so, to be working with Oracle, especially on the OVS3 videoserver technology and set-top box. Boca has been licensed as an NC OEM manufacturer. Silicon Graphics has now signed Acorn as its sole and preferred partner for videoserver and-to-end systems, using our set-top box technology and at this Christmas we complete a games machine for Samsung.
So in terms of what's new in technology, the major things are that there is a new superchip coming out from the alliance of Digital, ARM and Acorn. Can't give you the codename for it, but it's internally known within Acorn as ASIC 3. This is a new generation superchip, which will hopefully have its first customer announcement round about Christmas of this year.
It was previewed by Digital at the Embedded Systems Show West in San Jose a couple of weeks ago and is the key high-end chip for Acorn's strategy for 1998 and 1999. This is a fairly economical chip, it's about 1500MIPS of firepower in a sort of 50 dollars or so packaging. And will be the basis of all our fast network computer and set-top box designs for 1998.
The SA1100 which has already formerly been announced by Digital is a StrongARM superchip that aimed at the PDA and webphone area. We are now involved with this for a number of customers and we'll be starting to build our first customer product with it in a few weeks time. This is a 200MIPS 29 dollar package that actually has an entire computer on a single chip.
We continue to work with the 7500's and they continue to get faster overtime. And again for some of our existing network computer applications we'll continue down that route.
Galileo is our new operating system and we continue to invest heavily in that, in fact we're recruiting more and more engineers for that. It's going very well. We plan to have our first customer shipment of Galileo with the new superchips in the summer of 1998. And over the next two years it will become the foundation of all our technological drives, we've already talked to the [...?] about Galileo its design objectives.
Into opened with Galileo is our decision to make the strategic focus of our application programmer interface to be Java based and also to host Java, our preferred environment upon Galileo. So the Java API, the Java virtual machine and the forthcoming P-Java will all be supported on our new range of superchips. And as part of that plan, as Chris has already mentioned, we are encouraging our existing RISC OS developers to start playing with this technology and as part of the Clan issue this week, we've given with the co-operation of Sun some complementary copies out to some prototype systems.
In the next week or two we'll announce a relationship with [Cytrix?] which will bundle the ICA WinFrame technology which will allow any Acorn network computer to emulate and access Windows applications on Windows NT servers, based on slow speed analogue modem line or on faster network technology. And this is a world-wide agreement for three years that links to two companies together, so this help us tick one of those objection boxes about, but does it run DOS or Windows etcetera.
We were showing at this show our new H263 video codec technology. We're very proud about this, because it's a very high performance video codec, we believe it's absolutely state of the art. But because it also conforms to this H263 standard and some of these other associated ITU standards, we'll be able to offer systems that don't talk Acorn to Acorn but also across other types of videoconferencing systems. So we see this video codec technology being a key part again of our offering for 1998 along with out superchips and Galileo.
We are working closely with major UK organisational speech technologies. And we hope in the next few weeks to make some announcements on that, because again, one of the future user interface issues is that not everybody will want to use keyboards or screens and in reality microphones and speakers are infinitely cheaper than pointing devices, keyboards and screens. So we see this, not so much in 1998, but in 1999 as being a key part of our technology.
So carrying on, the SA110, IOMD2, VIDC20 mark 2 combination is our major investment in the product desktop business. Comes on screen in the shape of RiscPC II in the summer of 1998. We're working very heavily on the and also the technology in that lends itself to some of our technology customer applications. So again, a [...?] relationship between our product business and our technology business.
We're also investing in a brand new browser for ground zero development, again that's on the Clan disk. The control of a stable, reliable, high performance, small footprint browser is absolutely critical to our future strategy and control of that technology is a key factor to break on.
So these technologies lead to a number of products in 1997 and 19998. Set-top box 3 will take the new ASIC3 superchip series and produce a new generation of set-top boxes that are approximately half to one third of the price of the current boxes, but something gonna reach about 10 to 20 times faster.
coNCord is the existing StrongARM based NC and will also receive enhancements with the new memory and videochips coming from RiscPC II. Obviously RiscPC II itself comes out.
We are working on a new ultra low cost Internet device, that will be able to be sold for less that 75 dollars, which is David Lee's pet product. So Mini-Mail is the codename for that. Super home TV is the name given to the bringing together of all these video conferencing, webbrowsing, Internet applications and MPEG [endishable?] satellite in one box that's significantly lower in price than the previous boxes, by typically three or four times cheaper. And we certainly hope to be able to announce a number of major design wins during late '97 and '98 in this area.
I'm sure people have been aware this show we have had a number of visitors from overseas and there will be more tomorrow. We're very actively chasing this market. The market is splitting into two separate areas. We see the high-end and TV type applications. For the low-end we see these very low-cost almost throwawayable type of devices. And the phrase to describe these is called webphones. And we see again things like the SA1100, leading a [critical?] role in the creation of these almost disposable low-cost Internet appliances.
So this marketing slide which this time of the day and this range is probably indecipherable. But what I was trying to do is show the relationship between Acorn and the rest of the world. So Acorn makes products and it has technology. We interchange ideas and technology with the semiconductor partners. We interchange technology with software vendors primarily through our product related business. We then pass technology through to the consumer electronic manufacturers and we pass products primarily to the systems integrators and value added resellers. And that represents the flow of the information between those.
So the business outlook for '98 for Acorn is yet again, an exciting year. Never been a dull year so far. But truly for those in Acorn that can see the opportunity in front of us are desired to succeed absolute. The opportunities are there before us. Our competition in many ways, has repeatedly shot itself in its feet. So if we fail this time, it will be absolutely due to the fault of Acorn. It won't been because of anybody else.
We have a whole pile of new products. As you already have heard about. We have a whole pile of new technologies which are all now moving from wishes and wants to reality. Which is obviously very good. As usual there are a whole pile of threads and competition and we're well aware of those. And I think there's a whole pile of opportunities and I think with the new management team in Acorn and the way that our thinking has moved, I think in 1998 we'll see a number of interesting manoeuvres from Acorn which could cover a whole variety of new types of modes of operation of Acorn, including mergers, acquisitions and partnerships and all. And I'll leave it to the cryptic level.
Here [I just?] a small list of small bit players in the electronics and other businesses that we are currently talking to, have proposals in, are looking with or whatever in addition to all the projects we have been talking about. So, when somebody turns around and says, "well, who is using your technology?" hopefully by the end of 1998 we'll be able to give your a very impressive list. So that's the conclusion of that. And I think we're gonna do some questions and answers.
Chris mentioned the increasing importance of Java for the Acorn platform. Are we gonna be seeing some serious Java development software for Acorn or from somebody else?
The key thing with the Java environment is that we find a way on the slipstream about the Java tools that already existed and one of the key reasons of using the Java API was to not reinvent the wheel with a whole set of proprietary development tools so certainly our future technology engineering team are planning to [...?] the wide variety that already exists and the fact that we have so many people [...?].
So we're not going to write many proprietary Acorn Java development tools, but simply going to buy in of most of the ones that exist. Because time to market speed is critical. Although we got up to 25 engineers, that's not enough to take the rest of all those areas. So let's not waste our time with what other people are already doing.
The question was all about the various high-end performance battles.
The actual chip technology itself at the CPU level [...?]. So whether ARM are having that compensation or not, I can't actually comment on that I'm afraid. But obviously lots of people in this business are always talking to everybody else. I think the general viewpoint there is that the high-end area is still not the problem where we're at or where we're strong.
But in fact to answer the question - that at least I must have answered that 750 times today - in the case of Intel's intentional acquisition of Digital's technology, the point is not to replace the Pentium technology or offer a competitor to it, but to actually fill in a major weakness in Intel's product line which is that it fails to offer a high performance low cost embeddable [...?] of technology. So Intel's acquisition of that technology is to fill a weakness there.
Intel's [...?] behind the own brand, given that ARM still only has 10% of the world market for RISC microprocessors and Hitachi and MIPS still dominate, is a major alliance [...?] from Acorn and ARM's perspective is seen an extremely positive alliance. Because the alliance with Intel is a non-exclusive. Intel, even if it wanted to, can not shut the technology down.
The technology is now too well established in the hand of two [...?] for Intel to contain it. So therefore having paid 1.8 billion dollars for it, everyone can only reach the logical conclusion that the reason why they've done it to utilise it, not to simply shut it down. So despite the fact that it will prove a bit embarrassing for those that have the Intel Outside sticker it the [...?] of time. That [...?] is good news for us.
I had a look at the RiscPC II prototype down there, speaking to some of your [...?] I got a feeling that you're going to repeat some of the shortcomings with the new RiscPC II that you've got with the current RiscPC, such as only two DRAM sockets; you're soldering DRAM chips to the motherboard which I personally don't want, because you can't expand it [...?]. Also you're going backwards in that you're not going to provide expandable cases. There seems to be no floating point [...?] There are a lot of other points like this. I don't think you're actually listening to people who want to buy your machines, to what they want in the machine at all.
All the points raised are valid. I can assure you that at least 200 people within Acorn use these machines and play with them as well as coming to shows like this one for the last six, seven years. We're well aware of what customer feedback in these areas are. In reality as usual is that there is certain limitations in life caused by speed of processors, I/O banks etcetera. So especially with the year 2000 emission requirements that we have to meet throughout the world for this product, as we planned to [...?] and ship world-wide, which was never one of the original RiscPC objectives. We've had to go back to the drawing board.
Yes, we've had to forsake some of the things that RiscPC did have, [...?] and in other areas we've had to make other issues, but I think the proof ultimately will be how it sells. And I think when people actually see what it does, how it does it and having addressed some of those issues with things like swap out programs and upgrade programs. I think we'll have addressed most of those issues. So certainly 200 people in Acorn have got their names in a queue for one, so we don't think it's that bad, but like everybody else, yes it could be better, but most of the things you've raised are things caused by the loss of business, by the loss of economics that we're not able to control.
One of the key things that we've done on the second generation RiscPC, RiscPC II as we still call it, one of the main things which we're going for is make it as fast as we possibly could. We want the best possible product in terms of speed of operation and really drive that as hard as we can. Now as a result of that, there are certain design things that we have to do. Realistically what we're trying to do is make it the fastest and the best possible machine that we can. With certain other considerations, but that's really what we're driving for there.
What is the relationship between Acorn NC and Oracle NC? What is the difference between operating systems of the Oracle NC and the Acorn NC?
We've only got I think 15 minutes, so I'll try to keep it short. There actually have been several [...?] written on this one, it's not actually theoretical. The single issue is that, when Larry Ellison wanted a network computer to be designed, it spent [...?] over a year with Apple who then failed to deliver anything. We in several weeks built him the network computer which is launched with the famous swimming fish, which every RiscPC owner instantly recognizes. As a result of that, all was wonderful and NC OS 1 equaled approximately RISC OS 3.6, 3.7.
NCI then was formed as a separate company. NCI decided to go in about 7 directions simultaneously. It then approximately once every three weeks changed each of that 7 directions and as a result of that, most of the world became completely confused as to, what and where NCI was going. We carried on with NCI down the NC OS route with the ARM 7500 and that's the technology that RCA, Proton, Akai, Apple [...?] products with. As a results of the acquisition of Navvio, they decided at somewhere version 973, to go down and get another separate routes and in fact in that period of time they subsequently reiterated a number at a time. So most of NCI's customers are, A completely confused, and B very pissed off with the series of promises of what has been delivered.
The fact that we've finished our contractual obligations with NCI, [...?] that we disgracefully distance from them, which we have done. And as a direct result of that we've picked up substantially prices of business from disaffected, disenfranchised NCI people. So our position with NCI now is actually about to be clear, we're absolutely direct competitors. The fact that we actually work very closely with Oracle, their parent company, is again one of those classical business issues, you know we're working closely with Oracle on OBS3 and set-top box. But we're actually an absolute direct competitor today with NCI. However, if in the [fallness?] of time they realize they [...?] or want to work again with us, then in the classical style that decision will be revisited.
Similarly deeper, have got the a similar route, created a similar situation and again, this is why [...?] the opportunities here for Acorn are very strong, because we have stayed consistent to what we said we were going to do, we did deliver what we've promised what we're going to do and we have articulated a road map for three years which we are fulfilling and living up to. None of our competitors have come close to that level of consistency, of predictability and now we are the preferred and trusted partner of a number of people who despite our modest lack of sales and marketing capability, at least trust our personal and company integrity and our professionalism and our technology. So that's a brief summary of that I think.
Can you tell us anything about the Acorn Games machine, Samsung?
What we've done for Samsung is that we've licenses RISC OS and we've also produced an ARM7500 based design to allow Samsung to replace a product I don't think for this audience is particularly compelling, but it's a sort of 3 to 7 year old educational-games type of thing, so they will launch a product this Christmas, imaginatively called Tinko. Which is this thing.
So we created the RISC OS binaries, rewrote the drivers and helped with the games porting and we did the fundamental board design. A Japanese company, which also coincidentally happens to be our agent, MP-Tek done a lot of physical cosmetic design and now it's been passed over to Samsung for the manufacturing. So I don't think most people are gonna be seeing as an alternative to Doom or whatever, but it will in its own market, hope we be quite successful, being anticipated sales of that could reach 50,000 units a month per territory that it goes into. So since we've actually [...?] hope that it sells well.
When do you expect to be in profit?
We don't actually know, not because we can't work that calculation out, but one of our decisions is what we had to prove to the world, that we could recover Acorn from frankly, an extremely bad position and the position we were in three years ago. I think the truth can be now told, but it was bad. The fact that we managed to transition ourselves so quickly, so successfully, to the hybrid technology/product company that we are today, was to reduce of those losses consistently for the last five half years, is really an indication of the capabilities of the company.
However, one of the key issues is that we know we need to play on the world stage when it comes to the technology, so therefore we aim at a paradox, which is, do we try and strain the company even harder to break-even and in the process to [...?] ourselves of the engineering efforts and sales and marketing business development effort, we need to be successful onto, or do we run the risk of running losses to help fund those activities. I think the viewpoint that we have, that is, that we will not have as a design objective a decision to break-even or return to profit in a rush simply as an economical objective. If it happens, naturally because of a way a business works, then so be it. If we have to tolerate some additional losses, to fund the R&D and sales and marketing, then we will do so, because we have the ability with our new established reputation to raise new capital in a very efficient way.
So rather organically returned there, we will if necessary raise future money in a variety of techniques in the net year, so we [...?] much much more preoccupied with our sales success and our technical and logical roll-out program rather than the short time economic success, but we have ways of addressing that now that we have earned our stripes over the last two years. So our focus from a management viewpoint if first of all most the delivery of the technological programs that we are involved in and the rapidly escalation inclusion of our sales and marketing capability on a world-wide basis, now that we feel confident that we understand what our business is and what the opportunities are in front of us.
Do you expect the new RiscPC II to be able to take the new superchip and if so, will it take more than one?
It's the same way for example that you can't actually fit a VIDC20 and a StrongARM 110 to an ARM7500, it's the same sort of problem. The new RiscPC II has a new set of system chips that collectively make it happen. The new superchip is a completely integrated solution that doesn't meant itself to be fiddled with with other types of devices or so. It's the same fundamental type of relationship as the existing RiscPC is to the A7000, that are two different architectures, aimed at two different things. It's much more likely that in [fallness?] of time the superchip will find itself in a replacement to the A7000 type category of products, so you get like this 500 pound A7000, that does 1500 MIPS. So it should be able to run most of the educational applications quite properly.
Is Bill Gates' his new camp in Cambridge at all relevant to Acorn?
It's a good question. Again there is always a competition and at the big boys is, do you go run away from them and throw your toys at the [...?] actually greet the opportunity that presents itself. I think those people in theoretical research in Cambridge view it quite dangerously because of the kind of soaking of the brains and exporting them out. I think from Acorn as much more of a commercial company, we actually see it in a very positive light, in that we're now able to attract a number of people to the company, who previously would have seen moving to Cambridge as a complete commitment to Acorn only and in the event of that, for any reason, didn't work out, having no other option than leave the area and ho back to wherever they came from.
Where as now, a lot of people feel a lot more comfortable that Cambridge as an entity has a lot more going for it, so specifically we have experienced recently, the number of Senior Engineering and marketing people who I don't think two years ago we would have attracted, who actually feel, you know, well it sounds very negative, but everybody always from a personal viewpoint has to look of what the consequences of their actions area, and people being persuaded to move to this strange place in the swamps away from the M3/M4 corridor, that's been a very hard think for us to do. But actually again, from our viewpoint ironically, this is a ringing at the doors for Cambridge and the area and provides [...?] of employment. So from our viewpoint we actually feel very positively.
There's been talk of Acornsoft, what its new titles are, other then the browser and Java, that may be quite small titles? Anything about new titles?
What we're doing with Acornsoft is very much, working to try and get out of the company initially, what we have already developed. So we did a lot of work on the browser and Java, so that's what we're starting with. But then we want to expand it out beyond that, once we got into the business of selling software, there are other things which are going on inside Acorn which we can use, and we're also going to be looking outside to try and encourage some other things.
One of the particular areas that we're getting very excited about, is the actual gaming area. And [...?] what the technology guys are doing as companies as Curtis Mathes look at hunting these [...?] sort of games do you need for this and that ends with some major players in the field as they roll out a number of client devices, so the whole market comes up and gets a whole lot more attractive for games developers doing their games ports. And that's another area we're going to concentrate on. [snip some mumbling about Acorn House and Quake] We should see a bunch of announcements coming out in the next few months as we close some deals on that.
You said, Java would require a different file system. Can you tell us more about how the filing system is going to change for RISC OS?
One of the key things that I pointed out in the talk is that Java filenames are significantly longer than RISC OS filenames in most cases [...?] So that's one of the areas where we're need to actually provide support, just [...?] simply basically to use to filenames rather than to run the, in an image filing system, X-Files or something like that, so that's one area we're changing. We're also doing a lot of other fundamental work. We have to work within the constraints of not damaging the existing applications, se we have to be a little but careful of how we do that. Other area that we're looking at are the number of filenames in the directories as well.


You will need insurance that covers off-piste skiing.
Stranda ski resort is known as "powder paradise" and has been rated as Scandinavia's best resort for off-piste skiing. We will guide you through the best slopes of the resort. Come ski with us!
The Stranda resort is located in the middle of the fjord in Norway and it is one of country's best places for freeskiing. It is located just 70 km from the coast. Come discover why so many ski magazines from the whole world have written about Stranda.
We always strive to adapt our trips to your skill level and requirements.
You will need Alpine skis, telemarks skis or snowboard. Also ski boots, poles, helmet, beacon, shovel, probe, backpack (approx 20 L), goggles, water bottle, 1 pair of extra gloves. Please bring some snacks and drinks.


text:
Q: No decrease in loss after lots traning I was trying to train a convolution network. But it is not improving, i.e. loss is not decreasing. And the train function is also terminating much more quickly than usual. Below is the minimal code to show the problem.
using Flux

data=rand(200, 100, 1, 50)

label=rand([0.0,1.0], 1, 50)

model=Chain(

   Conv((3,3), 1=>5, pad=(1,1)),
   MaxPool((2,2)),
   Conv((3,3), 5=>5, pad=(1,1)),
   MaxPool((2,2)),
   Conv((3,3), 5=>5, pad=(1,1)),
   MaxPool((2,2)),
   x->reshape(x, :, size(x, 4)),
   x->σ.(x),
   Dense(1500,100),
   Dense(100,1)
)

model(data)

loss=Flux.mse

opt=Descent(0.1)

param=params(model)

loss(model(data), label)  #=>0.3492440767136241

Flux.train!(loss, param, zip(data, label), opt)

loss(model(data), label)  #=>0.3492440767136241

A: The first argument to Flux.train! needs to be function which accepts the data, runs the model, and returns the loss. Its loop looks something like this:
for dtup in zip(data, label)
    gradient(() -> loss(dtup...), params)
    ...
end

But the function loss you provide doesn't call the model at all, it just compares the data point to the label directly.
There is more to fix here though. What's being iterated over is tuples of numbers, starting with zip(data, label) |> first, which I don't think is what you want. Maybe you wanted Flux.DataLoader to iterate batches of images?

redpajama_set_name: RedPajamaStackExchange


text:
Lung Disease & Respiratory Health
WebMD News Brief
Poll: 74% of Americans Say Lives Have Returned to 'Normal'
By Carolyn Crist
Nov. 23, 2021 -- Even though COVID-19 cases are beginning to pick up again in the U.S., about 74% of Americans say their lives have returned to "normal," according to a new poll by Yahoo News and YouGov.
The survey, which took place Nov. 17-19, included nearly 1,700 adults. They answered questions about the pandemic, their lives, and opinions about the future.
About 21% characterized their lives as "very normal," and 53% said their lives were "somewhat normal," considering the effects of the pandemic. About 15% said that things "never stopped being normal" for them.
At the same time, more than a quarter of those who were polled felt like their lives were still disrupted. About 19% said their lives are "not very normal," while 7% said "not normal at all."
Unvaccinated Americans who took part in the poll were more likely to say their lives were unaffected. About 70% described their lives as normal, with 25% saying their lives were "very normal" and 27% saying their lives "never stopped being normal."
What's more, about 65% of unvaccinated Americans said COVID-19 poses a small threat or no threat to them personally. About 42% of unvaccinated Americans said they wear a mask in public "always" or "most of the time," as compared with 63% of vaccinated Americans.
The poll also asked people why their lives felt normal again. About 57% of those polled -- which represented the group who said their lives stopped being normal due to the pandemic but felt better again -- mentioned vaccines. They cited numerous reasons, such as being vaccinated personally, their children being vaccinated, older adults in their lives being vaccinated, and receiving a booster shot.
When asked to name the single most important reason why their lives were normal again, 30% mentioned vaccines and vaccine availability. That was higher than any other category. About 7% said businesses were fully reopened in their community, 4% said cases were low in their community, and 5% said they don't have to wear a mask in public. Others mentioned that schools were open again or that they already had COVID-19.
But when asked if the pandemic was "over" in the U.S., 71% said no. Only 16% said yes.
Looking ahead, about 44% of poll participants said they think the pandemic will get worse, and 39% said they think it will stay the same this winter. About 16% said it will get better.
Yahoo News: "Poll: As winter COVID surge begins, 74 percent of Americans say their lives have returned to 'normal.'"
Slideshow: COPD Warning Signs
Bronchitis: When to Call a Doctor
Myths and Facts About COPD
10 Exercises For People With COPD
Eating Right With COPD
What Is 'Walking Pneumonia'?
WebMD's Coverage of the Latest COVID-19 News
Swab Nose, Throat, or Both for COVID Rapid Test?
What to Do if You Test Positive for COVID-19
How to Use an At-Home COVID Test
Making Sense of Omicron, Changing COVID Protocols
Common Cold: Your Best Defense Against COVID?
How Will We Know When the Pandemic is 'Over'?
How to Travel Safely During COVID
Signs You May Have Already Had COVID
How Does COVID-19 Affect Your Lungs?
Sign Up to Get the Latest COVID-19 Email Updates
WebMD Care
Find a Telemedicine Doc -- Start Your Virtual Visit Now
Special Video Series
Coronavirus in Context With John Whyte
Does COVID Cause Hair Loss?
COVID-19 Changed Everything: 3 Personal Stories


There are 66 kaolin suppliers in chennai suppliers, mainly located in Asia. The top supplying countries are China (Mainland), India, and South Africa, which supply 96%, 1%, and 1% of kaolin suppliers in chennai respectively.
V233;rifi233; sur le site Les op233;rations sur le site sont v233;rifi233;es par list of mining leases in tumkur karnataka et l'existe juridique est confirm233;e par une entreprise de v233;rification tierce.
list of mining leases in tumkur karnataka offers 2,795 granite karnataka products. About 80% of these are granite, 3% are marble, and 2% are countertops,vanity tops amp; table tops. A wide variety of granite karnataka options are available to you, such as black, white, and red.


text:
Fallout Continues From BBC Expose of Antisemitism in Labour Party
by Benjamin Kerstein
British Labour Party leader Jeremy Corbyn outside his home in north London. Photo: Reuters / Peter Nicholls.
The fallout from a hard-hitting BBC expose of antisemitism in the British Labour party continued on Sunday with the journalist behind the program detailing the criticism he had suffered as a result, two party whistleblowers announcing their intention to sue Labour, and a prominent MP calling on the party to change its policies on the issue.
The Guardian reported that journalist John Ware had taken a considerable amount of abuse for helming the Panorama expose, with Ware describing it as "a bit like going out in a gale."
"But it has happened to me every time I have done a program," he said. "The same stock phrases come up whenever you touch this live rail. You get one or other side abusing you."
Social media trolls have referred to Ware as "the BBC's Islamophobe in chief" and a "far-right journalist" after the program aired.
The United States and its European allies said on Thursday that it was now just a matter of weeks to...
"It does hurt, of course, if people call me an Islamophobe, or say I am far-right," Ware commented. "I hate that, but they are entitled to their opinion. The thing I really don't like is seeing they are basing these opinions on false facts."
"The Labour party inject personal motives into this and I have talked with my wife about how much to defend myself," he added. "Whatever people think of me, the BBC has a strict legal and compliance process when it comes to making Panorama and you are submitted to that all the way through."
"The Labour party reaction last week did not terribly surprise me," he noted. "But this is not the straight-talking party that Corbyn promised," referring to far-left Labour leader Jeremy Corbyn, the object of much criticism for his handling of the antisemitism issue.
"I am neither bloodied nor bowed by this," Ware said. "It is too important and there is a danger now that this row about antisemitism will become more inflamed, not less, because it is impossible to interrogate the Labour party response."
In regard to that response, two interviewees on the Panorama report, Sam Matthews and Louise Withers Green, have announced that they planned to bring a lawsuit against Labour for what they called its defamatory attacks on them following the broadcast.
Labour called them and other party whistleblowers "disaffected former officials" who have "personal and political axes to grind" and are thus not credible sources, Yahoo News reported.
Matthews' and Green's lawyer, Mark Lewis, called these claims "very serious libels. Those representing the Labour party have acted in a way that set out to destroy the reputations of the whistleblowers."
"In their effort to destroy these people, they have left it for the courts to decide who is telling the truth," Green added. "It is ironic that the bosses at the workers' party have decided to go against the workers."
Also chiming in was dissident Labour MP Emily Thornberry, who has been vocal on the need to deal with antisemitism in the party.
She told the BBC following the broadcast, "Nobody can pretend that there isn't an ongoing problem within the Labour party about antisemitism, about our processes for dealing with it."
She demanded the party overhaul its complaints and disciplinary processes to tackle the problem.
Adding a personal note, she said, "I actually care about the fact that I have a Jewish member of staff, who when she goes to family weddings can't say who she works for — even though I fight on this issue a lot — she cannot admit who she works for or what she does, because she doesn't want to spend the rest of the day defending herself."
"I don't want that," Thornberry emphasized. "I want us to sort this out."


text:
'use strict';

let Gateway = require('./gateway').Gateway;
let UsBankAccount = require('./us_bank_account').UsBankAccount;
let TransactionGateway = require('./transaction_gateway').TransactionGateway;
let exceptions = require('./exceptions');
let wrapPrototype = require('@braintree/wrap-promise').wrapPrototype;

class UsBankAccountGateway extends Gateway {
  constructor(gateway) {
    super();
    this.gateway = gateway;
    this.config = this.gateway.config;
  }

  find(token) {
    if (token.trim() === '') {
      return Promise.reject(exceptions.NotFoundError('Not Found'), null); // eslint-disable-line new-cap
    }

    return this.gateway.http.get(`${this.config.baseMerchantPath()}/payment_methods/us_bank_account/${token}`).then(function (response) {
      return new UsBankAccount(response.usBankAccount);
    });
  }

  sale(token, transactionRequest) {
    transactionRequest.paymentMethodToken = token;
    if (!transactionRequest.options) { transactionRequest.options = {}; }
    transactionRequest.options.submitForSettlement = true;
    return new TransactionGateway(this.gateway).sale(transactionRequest);
  }
}

module.exports = {UsBankAccountGateway: wrapPrototype(UsBankAccountGateway)};


Equity, Inc. returns every year to hold a two day corporate training and dinner party at Watersedge. Every year the staff helps us to accomplish a bigger and better series of events that our staff has grown to look forward to. From catering, to decorating, to helping us secure outside specialty vendors the staff has always worked tirelessly to ensure our events are a success. Watersedge will continue to be our exclusive event facility and we would highly recommend them to other corporate clients looking for a beautiful, yet functional meeting space.
Event staff and overall quality of food and beverage make this choice of venue a satisfactory experience for all of our guests. It is simply always a great experience! I would recommend Waters Edge to any group looking for an event space whether it be an all-day executive meeting or staff luncheon. We appreciate everything you do for ADS, so thank you!
WatersEdge offers three stress-free "Complete Meeting Packages" that covers everything from your morning coffee to your audio-visual equipment needs.
Stress-free meeting planning… leave the planning to us!
From executive meetings to all day staff events, it's our job to make your job easy and stress free. We take care of all your event details so you can focus on your business.
WatersEdge believes in giving back to those who give to the community. If your organization is non-profit and tax exempt call today to receive 10% off your room fee!
Interested in holding your event at WatersEdge? Schedule a private tour today.


Mumbai: Actress Bipasha Basu has denied all rumours about being pregnant and says curiosity about it is a "tad annoying".
There were reports stating that Bipasha, who tied the knot with actor Karan Singh Grover last April, is expecting her first child. Taking to Twitter, the 38-year-old actress shot down rumours and said that whenever it happens she would share it with her fans and followers.


text:
SAIL BRITAIN
Inspiring positive change for the ocean through sailing, research and the creative arts
Funding your trip
Rescue at Sea
Fishing is known to be one of the most dangerous jobs around, and on the penultimate day of our 2018 programme, we saw this with our own eyes.
It was a beautiful day. Force 4 from the South as 'Alcuin' set sail from the Isle of Colonsay, riding the tide through the Sound of Islay in perfect late summer sunshine. You have to time the tide right here as it races at 5 knots in the narrow gap between Islay and Jura. Rounding the southern end of Jura, about half a mile offshore, we heard shouting. Log eerie cries with a definite sense of urgency. Immediately eyes scanned the water, no other boat nearby. "Diver!" He was about 150 yards off our port side, a small head in the water wearing a mask and a black wetsuit, quite hard to pick out amongst the small waves. He waived frantically as we caught his eye.
It's very hard to gauge timescales in an emergency situation. Things seem to take forever and happen in a split second at the same time. My first thought was that he was trying to attract our attention to other divers in the water ahead. We had just put in a reef and were sailing flat out at about 8 knots in a strengthening breeze, so a collision could be fatal. Then I clocked that there was no dive boat nearby. Either way I had to stop the yacht. Fast.
The crew sprang into action for an emergency stop. Hard to port, leave the sails sheeted. The bow rose to the waves as the yacht swung through the wind and then settled as she hove-to, sails acting like giant air brakes. We train for this manoeuvre in case of a man overboard situation, but thankfully have never had to use it in anger. It was good to see everyone acting instinctively as a team. Check for ropes in the water, engine on, furling winches spinning as the sails were hauled in.
We approached the man in the water under power and ascertained that, thankfully, he did not seem to be in immediate danger. He was holding onto a rope with a small float on one end, and something clearly quite heavy underwater on the other. He was diving for scallops! He declined our offer to bring him aboard but asked if we could stay with him, and could we see a small red boat and alert its attention? He had been swept out to sea by the very strong tides in the Sound of Islay and his mate on the small red boat was circling half a mile away, looking for him, but in the wrong place!
Our sudden change of course alerted his mate before we had a chance to call on the VHF radio and the small boat headed our way. We stayed with the diver until it arrived and he was hauled up the ladder much to everyone's relief. The mate signalled for us to stay where we were and he disappeared below deck, to emerge a moment later with half a sack of scallops. We threw him a rope and the precious sack was hauled aboard. It was a token of gratitude from fishermen who risk their lives to sustainably harvest scallops by hand from the sea bed. Without further ado, they headed home for Craighouse and we hoisted our sails for Loch Sween.
What were we going to do with so many scallops!? A luxury we could not normally afford! Well, surprise Ben, of course!
Traditional boatbuilder Ben Wilde and his wife Hana live in a beautiful cottage beside loch Sween near Tayviallich, only a few hours sailing away. He had been First Mate onboard 'Alcuin' earlier in the summer and this seemed like an excellent plan! Potatoes were being peeled and recipe books consulted as the anchor descended into the dark water. Our dramatic day at sea had ended happily and with a memorable supper too!
My thanks to First Mate Colin Palmer and Expedition leader Emma Harry for being such professional crew.
Your Sailboat Journey: Post Sail Remarks
Email us – info@sailbritain.org
Why not say hello? If you'd like to come sailing with us, or if you have some brilliant thoughts we'd love to hear from you!
Subscribe here for occasional news of Sail Britain's activities
Proudly powered by WordPress | Theme: Gateway by Rescue Themes.