Updates the specified policy. One or more of the parameters may be
        specified.
546730
def update_policy(self, scaling_group, policy, name=None, policy_type=None,
            cooldown=None, change=None, is_percent=False,
            desired_capacity=None, args=None):
        
        uri = "/%s/%s/policies/%s" % (self.uri_base,
                utils.get_id(scaling_group), utils.get_id(policy))
        if not isinstance(policy, AutoScalePolicy):
            # Received an ID
            policy = self.get_policy(scaling_group, policy)
        body = {"name": name or policy.name,
                "type": policy_type or policy.type,
                "cooldown": cooldown or policy.cooldown,
                }
        if desired_capacity is not None:
            body["desiredCapacity"] = desired_capacity
        elif change is not None:
            if is_percent:
                body["changePercent"] = change
            else:
                body["change"] = change
        else:
            if getattr(policy, "changePercent", None) is not None:
                body["changePercent"] = policy.changePercent
            elif getattr(policy, "change", None) is not None:
                body["change"] = policy.change
            elif getattr(policy, "desiredCapacity", None) is not None:
                body["desiredCapacity"] = policy.desiredCapacity
        args = args or getattr(policy, "args", None)
        if args is not None:
            body["args"] = args
        resp, resp_body = self.api.method_put(uri, body=body)
        return None
1347907
public static base_response update(nitro_service client, policyhttpcallout resource) throws Exception {
		policyhttpcallout updateresource = new policyhttpcallout();
		updateresource.name = resource.name;
		updateresource.ipaddress = resource.ipaddress;
		updateresource.port = resource.port;
		updateresource.vserver = resource.vserver;
		updateresource.returntype = resource.returntype;
		updateresource.httpmethod = resource.httpmethod;
		updateresource.hostexpr = resource.hostexpr;
		updateresource.urlstemexpr = resource.urlstemexpr;
		updateresource.headers = resource.headers;
		updateresource.parameters = resource.parameters;
		updateresource.bodyexpr = resource.bodyexpr;
		updateresource.fullreqexpr = resource.fullreqexpr;
		updateresource.scheme = resource.scheme;
		updateresource.resultexpr = resource.resultexpr;
		updateresource.cacheforsecs = resource.cacheforsecs;
		return updateresource.update_resource(client);
	}
567947
public static base_response update(nitro_service client, policystringmap resource) throws Exception {
		policystringmap updateresource = new policystringmap();
		updateresource.name = resource.name;
		updateresource.comment = resource.comment;
		return updateresource.update_resource(client);
	}
328320
def _update_param(self):
        

        """

        # Update the gamma parameter.
        if not isinstance(self._beta_update, type(None)):
            self._beta = self._beta_update(self._beta)

        # Update lambda parameter.
        if not isinstance(self._lambda_update, type(None)):
            self._lambda = self._lambda_update(self._lambda)
405403
public static ns_conf_download_policy update(nitro_service client, ns_conf_download_policy resource) throws Exception
	{
		resource.validate("modify");
		return ((ns_conf_download_policy[]) resource.update_resource(client))[0];
	}
984835
def update_policy(self,defaultHeaders):
		
		if self.inputs is not None:
			for k,v in defaultHeaders.items():
				if k not in self.inputs:
					self.inputs[k] = v
				if k == 'pins':
					self.inputs[k] = self.inputs[k] + defaultHeaders[k]
			return self.inputs
		else:
			return self.inputs
115032
def enable(self, policy):
        
        if hasattr(policy, 'href'):
            if not isinstance(policy, InterfacePolicy):
                raise LoadPolicyFailed('Invalid policy type specified. The policy'
                    'type must be InterfacePolicy')
                
        self.update(l2_interface_policy_ref=element_resolver(policy))
863647
def add_policy(self, name, policy_type, cooldown, change=None,
            is_percent=False, desired_capacity=None, args=None):
        
        return self.manager.add_policy(self, name, policy_type, cooldown,
                change=change, is_percent=is_percent,
                desired_capacity=desired_capacity, args=args)
696793
public Optional<AlertPolicyChannel> update(long policyId, long channelId)
    {
        QueryParameterList queryParams = new QueryParameterList();
        queryParams.add("policy_id", policyId);
        queryParams.add("channel_ids", channelId);
        return HTTP.PUT("/v2/alerts_policy_channels.json", null, null, queryParams, ALERT_POLICY_CHANNEL);
    }
845178
public OperationFuture<FirewallPolicy> update(FirewallPolicy firewallPolicy, FirewallPolicyConfig config) {
        FirewallPolicyMetadata metadata = findByRef(firewallPolicy);

        firewallPolicyClient.update(
            metadata.getDataCenterId(),
            metadata.getId(),
            composeFirewallPolicyRequest(config)
        );

        return new OperationFuture<>(
            firewallPolicy,
            new NoWaitingJobFuture()
        );
    }
490970
public static base_response update(nitro_service client, pqpolicy resource) throws Exception {
		pqpolicy updateresource = new pqpolicy();
		updateresource.policyname = resource.policyname;
		updateresource.weight = resource.weight;
		updateresource.qdepth = resource.qdepth;
		updateresource.polqdepth = resource.polqdepth;
		return updateresource.update_resource(client);
	}
554766
def update(self, name=None, metadata=None):
        
        return self.policy.update_webhook(self, name=name, metadata=metadata)
584509
function (name, value) {
            var policy = this.$[name + 'UpdatePolicy'];

            if (policy === POLICY_OUT || policy === POLICY_BOTH) {
                if (value != null && value !== undefined) {
                    this.$el.style[name] = "" + value;
                }
            }

        }
969230
def update_policy(self,cspDefaultHeaders):
		
		try:
			self.check_valid(cspDefaultHeaders)
			if self.inputs is not None:
				for p,l in self.inputs.items():
					cspDefaultHeaders[p] = cspDefaultHeaders[p]+ list(set(self.inputs[p]) - set(cspDefaultHeaders[p]))
				return cspDefaultHeaders
			else:
				return self.inputs
		except Exception, e:
			raise
967512
def update(self, **kwargs):
        """"""
        self._check_exclusive_parameters(**kwargs)
        return super(Rule, self)._update(**kwargs)
508123
def update_policy(self):
        
        self.trainer_metrics.start_policy_update_timer(
            number_experiences=len(self.training_buffer.update_buffer['actions']),
            mean_return=float(np.mean(self.cumulative_returns_since_policy_update)))
        n_sequences = max(int(self.trainer_parameters['batch_size'] / self.policy.sequence_length), 1)
        value_total, policy_total, forward_total, inverse_total = [], [], [], []
        advantages = self.training_buffer.update_buffer['advantages'].get_batch()
        self.training_buffer.update_buffer['advantages'].set(
            (advantages - advantages.mean()) / (advantages.std() + 1e-10))
        num_epoch = self.trainer_parameters['num_epoch']
        for _ in range(num_epoch):
            self.training_buffer.update_buffer.shuffle()
            buffer = self.training_buffer.update_buffer
            for l in range(len(self.training_buffer.update_buffer['actions']) // n_sequences):
                start = l * n_sequences
                end = (l + 1) * n_sequences
                run_out = self.policy.update(buffer.make_mini_batch(start, end), n_sequences)
                value_total.append(run_out['value_loss'])
                policy_total.append(np.abs(run_out['policy_loss']))
                if self.use_curiosity:
                    inverse_total.append(run_out['inverse_loss'])
                    forward_total.append(run_out['forward_loss'])
        self.stats['Losses/Value Loss'].append(np.mean(value_total))
        self.stats['Losses/Policy Loss'].append(np.mean(policy_total))
        if self.use_curiosity:
            self.stats['Losses/Forward Loss'].append(np.mean(forward_total))
            self.stats['Losses/Inverse Loss'].append(np.mean(inverse_total))
        self.training_buffer.reset_update_buffer()
        self.trainer_metrics.end_policy_update()
448161
def _updatePolicyElements(policy_item, regkey):
    '''
    
    '''
    for child in policy_item.getiterator():
        if 'valueName' in child.attrib:
            if 'key' not in child.attrib:
                child.attrib['key'] = regkey
    return policy_item