method to sanitize model parameters

        Parameters
        ---------
        None

        Returns
        -------
        None
6433
def _validate_params(self):
        
        self.distribution = NormalDist(scale=self.scale)
        super(LinearGAM, self)._validate_params()
1159205
function sanitize(ev){
		var obj = {};
		for (var key in ev)
			if (key.indexOf("_") !== 0)
				obj[key] = ev[key];

		if (!cfg.use_id)
			delete obj.id;

		return obj;
	}
278312
def rm_parameter(self, name):
        
        if name not in self._parameters:
            raise ValueError("no '%s' parameter found" % (name))

        del self._parameters[name]
        del self.__dict__[name]
855636
def sanitize(self):
        

        if not self.args.hide_file_names:
            return self

        if self.entity is None:
            return self

        if self.type != 'file':
            return self

        if self.should_obfuscate_filename():
            self._sanitize_metadata()
            extension = u(os.path.splitext(self.entity)[1])
            self.entity = u('HIDDEN{0}').format(extension)
        elif self.should_obfuscate_project():
            self._sanitize_metadata()

        return self
77011
def clean(self):
        
        if self.lookup == '?':  # Randomly sort
            return
        else:
            lookups = self.lookup.split(LOOKUP_SEP)
            opts = self.model_def.model_class()._meta
            valid = True
            while len(lookups):
                lookup = lookups.pop(0)
                try:
                    field = opts.get_field(lookup)
                except FieldDoesNotExist:
                    valid = False
                else:
                    if isinstance(field, models.ForeignKey):
                        opts = get_remote_field_model(field)._meta
                    elif len(lookups):  # Cannot go any deeper
                        valid = False
                finally:
                    if not valid:
                        msg = _("This field doesn't exist")
                        raise ValidationError({'lookup': [msg]})
452709
def sanitize_config
      {
        elements: %w(
          p br a span sub sup strong em div hr abbr s
          ul ol li
          blockquote cite pre code kbd
          h1 h2 h3 h4 h5 h6
          img object param del
          table tr td th thead tbody
          figure figcaption
          mark del ins
        ),
        attributes: {
          :all     => ['class', 'style', 'title', 'id', 'datetime'],
          'a'      => ['href', 'rel', 'name'],
          'li'     => ['id'],
          'sup'    => ['id'],
          'img'    => ['src', 'title', 'alt', 'width', 'height'],
          'object' => ['width', 'height'],
          'param'  => ['name', 'value'],
          'embed'  => ['allowscriptaccess', 'width', 'height', 'src'],
          'iframe' => ['width', 'height', 'src'],
          'td'     => ['colspan', 'rowspan'],
          'th'     => ['colspan', 'rowspan']
        },
        protocols: {
          'a' => { 'href' => ['ftp', 'http', 'https', 'mailto', '#fn', '#fnref', :relative] },
          'img' => {'src'  => ['http', 'https', :relative]},
          'iframe' => {'src'  => ['http', 'https']},
          'embed' => {'src'  => ['http', 'https']},
          'object' => {'src'  => ['http', 'https']},
          'li' => {'id' => ['fn']},
          'sup' => {'id' => ['fnref']}
        },
        transformers: transformers
      }
    end
839650
def _prune_kwargs(kwargs):
    
    allowed_keys = [
        'corner_mask', 'alpha', 'locator', 'extend', 'xunits',
        'yunits', 'antialiased', 'nchunk', 'hatches', 'zorder']
    ignored = [key for key in kwargs.keys() if key not in allowed_keys]
    for key in ignored:
        _warn(
            '{}={} is not an allowed optional parameter and will'
            ' be ignored'.format(key, kwargs[key]))
        kwargs.pop(key, None)
    return kwargs
73112
function sanitizeFalsies(obj) {
	var key;
	if (!obj._) {
		delete obj._;
		for (key in obj) {
			if (obj[key] === false) delete obj[key];
		}
	}
	return obj;
}
1028400
def sanitize(func):
    

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        return normalize('NFC', func(*args, **kwargs))
    return wrapper
1286532
def sanitize(self):
        """"""
        self.repeat = self.repeat % 2
        self.priority = self.priority % 4
        self.src_addr = self.src_addr % 0x10000
        self.dst_addr = self.dst_addr % 0x10000
        self.multicast = self.multicast % 2
        self.routing = self.routing % 8
        self.length = self.length % 16
        for i in range(0, self.length - 1):
            self.data[i] = self.data[i] % 0x100
775623
def _sanitize_request_params(self, request_params):
        """"""
        if 'verify_ssl' in request_params:
            request_params['verify'] = request_params.pop('verify_ssl')
        return dict((key, val) for key, val in request_params.items()
                    if key in self._VALID_REQUEST_ARGS)
1233748
def remove_post_data_parameters(request, post_data_parameters_to_remove):
    
    replacements = [(k, None) for k in post_data_parameters_to_remove]
    return replace_post_data_parameters(request, replacements)
1020538
def clean_params
      clean_unserializable_data_from(:parameters)
      filter(parameters)
      if cgi_data
        clean_unserializable_data_from(:cgi_data)
        filter(cgi_data)
      end
      if session_data
        clean_unserializable_data_from(:session_data)
        filter(session_data)
      end
    end
952371
def sanitize(string, ignore_characters=None):
    
    # only deal with strings
    if string is None:
        return

    ignore_characters = ignore_characters or set()

    # replace some characters with one space
    characters = {'-', ':', '(', ')', '.'} - ignore_characters
    if characters:
        string = re.sub(r'[%s]' % re.escape(''.join(characters)), ' ', string)

    # remove some characters
    characters = {'\''} - ignore_characters
    if characters:
        string = re.sub(r'[%s]' % re.escape(''.join(characters)), '', string)

    # replace multiple spaces with one
    string = re.sub(r'\s+', ' ', string)

    # strip and lower case
    return string.strip().lower()
1340258
def remove_query_parameters(request, query_parameters_to_remove):
    
    replacements = [(k, None) for k in query_parameters_to_remove]
    return replace_query_parameters(request, replacements)
1104889
def _sanitize_values(arr):
    

    if hasattr(arr, 'values'):
        arr = arr.values
    else:

        # scalar
        if is_scalar(arr):
            arr = [arr]

        # ndarray
        if isinstance(arr, np.ndarray):
            pass

        elif is_list_like(arr) and len(arr) > 0:
            arr = maybe_convert_platform(arr)

        else:
            arr = np.asarray(arr)

    return arr
1131843
def sanitizer(name, replacements=[(':','_'), ('/','_'), ('\\','_')]):
    
    for old,new in replacements:
        name = name.replace(old,new)
    return name