Get the value of the indexed Tropo action.
330730
def getIndexedValue(self, index):
        
        actions = self._actions

        if (type (actions) is list):
            dict = actions[index]
        else:
            dict = actions
        return dict.get('value', 'NoValue')
188547
def get_values(self):
        """"""
        for value_name, widget in self.index.items():
            self.value[value_name] = widget.get_value(self.value[value_name])

            setting_name = self.widget + '/' + value_name
            settings.setValue(setting_name, self.value[value_name])
740607
def select_action(self, q_values):
        
        assert q_values.ndim == 1
        action = np.argmax(q_values)
        return action
665119
public alluxio.grpc.PAclAction getActions(int index) {
    return actions_converter_.convert(actions_.get(index));
  }
1347657
def get_action(self, key):
        
        index_local_timestamp = self.get_index_local_timestamp(key)
        real_local_timestamp = self.get_real_local_timestamp(key)
        remote_timestamp = self.get_remote_timestamp(key)
        return get_sync_state(
            index_local_timestamp, real_local_timestamp, remote_timestamp
        )
1096114
def observe_reward_value(self, state_key, action_key):
        '''
        

        '''
        reward_value = 0.0
        if state_key in self.__state_action_list_dict:
            if action_key in self.__state_action_list_dict[state_key]:
                reward_value = 1.0

        return reward_value
1315838
public org.tensorflow.framework.Summary.ValueOrBuilder getValueOrBuilder(
      int index) {
    return value_.get(index);
  }
83102
def get_log_rhos(target_action_log_probs, behaviour_action_log_probs):
    """"""
    t = tf.stack(target_action_log_probs)
    b = tf.stack(behaviour_action_log_probs)
    log_rhos = tf.reduce_sum(t - b, axis=0)
    return log_rhos
1117983
def GetValue(self):
    '''
    
    '''
    if not self._widget.GetValue() or len(self._widget.GetValue()) <= 0:
        return None
    else:
        return self._action.option_strings[0]
762627
@SuppressWarnings("unchecked")
    private static Object getIndexedValue(Object obj, Property property, int index, ObjectWrapper options) {
        if (property == null) {
            throw new IllegalArgumentException("Cannot get the indexed value from 'null' property.");
        }

        Object propertyValue = property.get(obj);

        if (propertyValue == null) {
            throw new NullPointerException("Invalid 'null' value found for indexed '" + property + "' in "
                                                   + obj.getClass().getName() + ".");

        }

        if (propertyValue instanceof List) {
            List list = (List) propertyValue;
            int size = list.size();

            if (size < index) {
                if (options.isOutOfBoundsSafety) {
                    return null;
                } else {
                    throw new IndexOutOfBoundsException("The indexed " + property + " in "
                                                                + obj.getClass().getSimpleName() + " object has only '" + size + "' elements," +
                                                                " but index '" + index + "' requested.");
                }
            }

            return list.get(index);
        } else if (propertyValue.getClass().isArray()) {
            int lenght = Array.getLength(propertyValue);

            if (lenght < index && options.isOutOfBoundsSafety) {
                return null;
            }

            try {
                return Array.get(propertyValue, index);
            } catch (ArrayIndexOutOfBoundsException e) {
                throw new IndexOutOfBoundsException("The indexed " + property + " in "
                                                            + obj.getClass().getSimpleName() + " object has only '" + lenght + "' elements," +
                                                            " but index '" + index + "' requested.");

            }
        } else if (propertyValue instanceof Iterable) {
            Iterable iterable = (Iterable) propertyValue;

            int k = 0;
            for (Object object : iterable) {
                if (k == index) {
                    return object;
                }

                k++;// Hopefully not an infinite iteration
            }

            // Nothing found
            if (options.isOutOfBoundsSafety) {
                return null;
            } else {
                throw new IndexOutOfBoundsException("The indexed " + property + " in "
                                                            + obj.getClass().getSimpleName() + " object has less than '" + index + "'" +
                                                            " elements.");
            }
        } else {
            throw new IllegalArgumentException("Cannot get an indexed value from the not indexed " + property
                                                       + ". Only List, array and Iterable types are supported, but " + property.getType().getSimpleName()
                                                       + " found.");
        }
    }
634121
def action_getattr():
    

    def action_getattr(_value, context, **_params):
        value = getattr(context["action"], context["key"])
        return _attr(value)

    return action_getattr
1159878
def getOperation(self, ps, address):
        ''' 
        '''
        action = address.getAction()
        opName = self.getOperationName(ps, action)
        return getattr(self, opName)
632281
def value_opt_step(i,
                   opt_state,
                   opt_update,
                   value_net_apply,
                   padded_observations,
                   padded_rewards,
                   reward_mask,
                   gamma=0.99):
  """"""
  value_params = trax_opt.get_params(opt_state)
  # Note this partial application here and argnums above in ppo_opt_step.
  g = grad(functools.partial(value_loss, value_net_apply))(
      value_params,
      padded_observations,
      padded_rewards,
      reward_mask,
      gamma=gamma)
  return opt_update(i, g, opt_state)
762581
def get(self, index):
        """"""
        assert index <= self.count
        assert index < self.size
        offset = index * self.chunk_size
        return self.data[offset:offset + self.chunk_size]
390735
def get_args_and_values(parser, an_action):
    """"""
    args = inspect.getargspec(an_action.__class__.__init__).args
    kwargs = dict(
        (an_attr, getattr(an_action, an_attr))
        for an_attr in args
        if (
            an_attr not in ('self', 'required')
            and getattr(an_action, an_attr) is not None
        )
    )
    action_name = find_action_name_by_value(
        parser._optionals._registries,
        an_action
    )
    if 'required' in kwargs:
        del kwargs['required']
    kwargs['action'] = action_name
    if 'option_strings' in kwargs:
        args = tuple(kwargs['option_strings'])
        del kwargs['option_strings']
    else:
        args = ()
    return args, kwargs
177456
public org.tensorflow.framework.Summary.Value getValue(int index) {
    return value_.get(index);
  }
133653
def getNamedActionValue(self, name):
        
        actions = self._actions

        if (type (actions) is list):
            for a in actions:
                if a.get('name', 'NoValue') == name:
                    dict =a
        else:
            dict = actions
        return dict.get('value', 'NoValue')