Parameters of policy
508224
def value_parameters(self):
        
        return it.chain(self.value_backbone.parameters(), self.critic_head.parameters())
225338
def define_parameters(**parameters):
    """"""
    params = []
    for key, value in parameters.items():
        param = dict(ParameterKey=key, ParameterValue=value)
        params.append(param)
    return params
307956
def group_for_policy(self, policy=None):
        
        if policy is None:
            policy = self.context.participant_policy
        return "%s:%s" % (policy.title(), self.context.UID())
436261
def passparameters(self):
        """"""
        paramdict = {}
        for parametergroup, params in self.parameters: #pylint: disable=unused-variable
            for parameter in params:
                if parameter.value:
                    if isinstance(parameter.value, list):
                        paramdict[parameter.id] = ",".join(parameter.value)
                    else:
                        paramdict[parameter.id] = parameter.value
        return paramdict
459195
def show_firewall_policy(self, firewall_policy, **_params):
        """"""
        return self.get(self.firewall_policy_path % (firewall_policy),
                        params=_params)
530498
function(policyNames) {
  var policies = policyNames.split(' ');   
  for (var i=0; i<policies.length; i++) {
    if (policies[i] in papePolicyNameMap) {
      policies[i] = papePolicyNameMap[policies[i]];
    }
  }
  return policies.join(' ');
}
1179787
def execute_policy(self, scaling_group, policy):
        
        return self._manager.execute_policy(scaling_group=scaling_group,
                policy=policy)
462663
def set_parameters(self,parameters):
        
        
        for key,value in list(parameters.items()):
            if key in self.parameters:
                self.parameters[key] = value
249341
def execute_policy(self, policy):
        
        return self.manager.execute_policy(scaling_group=self, policy=policy)
108062
def slas_policy_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/slas/policies/{id}"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
129880
def set_policy(table='filter', chain=None, policy=None, family='ipv4'):
    '''
    
    '''
    if not chain:
        return 'Error: Chain needs to be specified'
    if not policy:
        return 'Error: Policy needs to be specified'

    wait = '--wait' if _has_option('--wait', family) else ''
    cmd = '{0} {1} -t {2} -P {3} {4}'.format(
            _iptables_cmd(family), wait, table, chain, policy)
    out = __salt__['cmd.run'](cmd)
    return out
613226
def policy(self):
        """"""
        policies = VNXIOPolicy.get(cli=self._cli)
        ret = None
        for policy in policies:
            contained = policy.ioclasses.name
            if self._get_name() in contained:
                ret = VNXIOPolicy.get(name=policy.name, cli=self._cli)
                break
        return ret
557067
def parameters(self, value):
        

        assert len(value) == self.n_parameters
        i = 0
        for task in self.tasks:
            task.parameters = value[i:i + task.n_parameters]
            i += task.n_parameters
623609
def policies(options = {})
      batches = Enumerator.new do |y|
        options = options.merge(group_name: @name)
        resp = @client.list_group_policies(options)
        resp.each_page do |page|
          batch = []
          page.data.policy_names.each do |p|
            batch << GroupPolicy.new(
              group_name: @name,
              name: p,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      GroupPolicy::Collection.new(batches)
    end
500129
function apply(x) {
      const policyPathLength = policyPath.length;
      policyPath[policyPathLength] = x;
      if (Array.isArray(x)) {
        for (let i = 0, len = x.length; i < len; ++i) {
          policyPath[policyPathLength + 1] = i;
          apply(x[i]);
        }
      } else if (x && typeof x === 'object') {
        for (const key of Object.getOwnPropertyNames(x)) {
          policyPath[policyPathLength + 1] = key;
          const valueType = typeof policy[key];
          if (valueType === 'function') {
            policy[key](x[key]);
          } else if (valueType === 'object') {
            const policyMember = policy[key][x[key]];
            if (typeof policyMember === 'function') {
              policyMember(x);
            }
          }
          if (key === 'test' || key === 'expr') {
            checkCodeDoesNotInterfere(x, key, true);
          }
          apply(x[key]);
        }
      }
      policyPath.length = policyPathLength;
    }
830187
private void getPolicyNodes(int depth, Set<PolicyNodeImpl> set) {
        // if we've reached the desired depth, then return ourself
        if (mDepth == depth) {
            set.add(this);
        } else {
            for (PolicyNodeImpl node : mChildren) {
                node.getPolicyNodes(depth, set);
            }
        }
    }
396543
def _calculatePolicy(self):
        """"""
        cmd = '''
              UPDATE policy
                 SET action = (
                     SELECT action
                       FROM (SELECT state, action, MAX(value)
                               FROM Q
                              GROUP BY state) AS A
                       WHERE policy.state = A.state
                       GROUP BY state);'''
        self._cur.execute(cmd)
        self._conn.commit()