returns a dict of all of the object's user-facing parameters

        Parameters
        ----------
        deep : boolean, default: False
            when True, also gets non-user-facing paramters

        Returns
        -------
        dict
189627
def get_params(self, deep=False):
        
        attrs = self.__dict__
        for attr in self._include:
            attrs[attr] = getattr(self, attr)

        if deep is True:
            return attrs
        return dict([(k,v) for k,v in list(attrs.items()) \
                     if (k[0] != '_') \
                        and (k[-1] != '_') \
                        and (k not in self._exclude)])
118411
def getattr(self, name, default: Any = _missing):
        
        return deep_getattr(self.clsdict, self.bases, name, default)
661809
def to_dict(self):
        
        plain_dict = dict()
        for k, v in self.items():
            if self.__fields__[k].is_list:
                if isinstance(self.__fields__[k], ViewModelField):
                    plain_dict[k] = tuple(vt.to_dict() for vt in v)
                    continue

                plain_dict[k] = tuple(copy.deepcopy(vt) for vt in v)
                continue

            if isinstance(self.__fields__[k], ViewModelField):
                plain_dict[k] = v.to_dict()
                continue

            plain_dict[k] = copy.deepcopy(v)

        return plain_dict
613360
def deep_update_dict(default, options):
    
    for key in options.keys():
        default_setting = default.get(key)
        new_setting = options.get(key)
        if isinstance(default_setting, dict):
            deep_update_dict(default_setting, new_setting)
        else:
            default[key] = new_setting
828103
def dict(self):
        
        return {k: getattr(self, k) for k in self.__class__.defaults}
690491
def defaults(self_):
        
        self = self_.self
        d = {}
        for param_name,param in self.param.objects('existing').items():
            if param.constant:
                pass
            elif param.instantiate:
                self.param._instantiate_param(param,dict_=d,key=param_name)
            else:
                d[param_name]=param.default
        return d
664639
def params(self):
        
        if self._GETPOST is None:
            self._GETPOST = MultiDict(self.GET)
            self._GETPOST.update(dict(self.POST))
        return self._GETPOST
911381
def get_initial(self, *args, **kwargs):
        
        initial = {}
        for field in self.fields:
            value = None
            if hasattr(self.user, field):
                value = getattr(self.user, field)
            if hasattr(self.profile, field):
                value = getattr(self.profile, field)
            if value:
                initial.update({
                    field: value
                })

        if hasattr(self.profile, 'dob'):
            dob = self.profile.dob
            if dob:
                if 'dob_day' in self.fields:
                    initial.update({
                        'dob_day': dob.day
                    })
                if 'dob_month' in self.fields:
                    initial.update({
                        'dob_month': dob.month
                    })
                if 'dob_year' in self.fields:
                    initial.update({
                        'dob_year': dob.year
                    })

        return initial
1319510
def dict(self):
        
        params = {
            prop: getattr(self, prop)
            for prop in [
                "logs", "date", "author", "sha", "path"
            ]
        }
        params["author"] = params["author"].dict()
        return params
478228
def get_params(self):
        
        params = {}
        complex = False

        for name, opt in self.filter_options.items():
            if opt.ignored:
                continue
            if self.set_param(params, name):
                complex = True
        return params, complex
1294110
def dict(self):
        

        d = {p.key: getattr(self, p.key) for p in self.__mapper__.attrs if p.key not in ('data')}

        d['secret'] = 'not available'

        if self.secret_password:
            try:
                d['secret'] = self.decrypt_secret()
            except AccountDecryptionError:
                pass

        if self.data:
            for k, v in self.data.items():
                d[k] = v

        return {k: v for k, v in d.items()}
1371820
def state_dict(self) -> Dict[str, Any]:
        
        return {key: value for key, value in self.__dict__.items() if key != 'optimizer'}
49100
def get_dict(dictionary, *keys,**kwargs):
    

    if 'default' in kwargs:
        default = kwargs['default']
    else:
        default = None

    existing = dictionary
    for i in range(0, len(keys)):

        if keys[i] in existing:

            existing = existing[keys[i]]
        else:

            return default
    return existing
944785
def _extract_model_params(self, defaults, **kwargs):
        
        obj = kwargs.pop(self.object_property_name, None)
        if obj is not None:
            kwargs['object_hash'] = self.model._compute_hash(obj)
        lookup, params = super()._extract_model_params(defaults, **kwargs)
        if obj is not None:
            params[self.object_property_name] = obj
            del params['object_hash']
        return lookup, params
124561
def parameters(self):
        
        parameters = []
        for hl in self.hidden_layers:
            parameters.extend(hl.parameters)
        parameters.extend(self.top_layer.parameters)
        return parameters
1287153
def to_dict(self):
        
        self_dict = {}
        for key, value in six.iteritems(self.__dict__):
            if self.allowed_params and key in self.allowed_params:
                self_dict[key] = value
        return self_dict
1305499
def get_deep_attr(obj, keys):
    
    cur = obj
    for k in keys:
        if isinstance(cur, Mapping) and k in cur:
            cur = cur[k]
            continue
        else:
            try:
                cur = getattr(cur, k)
                continue
            except AttributeError:
                pass
        raise DataError(error='Unexistent key')
    return cur