Reset all associated values and clean up dictionary items
502397
def _reset_values(self, instance):
        """"""
        self.value = None
        self.reference.value = None
        instance.__dict__.pop(self.field_name, None)
        instance.__dict__.pop(self.reference.field_name, None)
        self.reference.delete_cached_value(instance)
1046208
def reset(self):
        """"""
        self.scores = torch.FloatTensor(torch.FloatStorage())
        self.targets = torch.LongTensor(torch.LongStorage())
        self.weights = torch.FloatTensor(torch.FloatStorage())
848312
protected void resetAllValues() {
        logic = new FilterFieldStringData(CommonFilterConstants.LOGIC_FILTER_VAR, CommonFilterConstants.LOGIC_FILTER_VAR_DESC);

        filterVars.clear();
        filterVars.add(logic);
    }
1249680
def reset(self):
        '''
        
        '''
        self.terms = OrderedDict()
        self.y = None
        self.backend = None
        self.added_terms = []
        self._added_priors = {}
        self.completes = []
        self.clean_data = None
1371312
def clean(self, value):
		

		# If the value is None and it's optional, return as is
		if value is None and self._optional:
			return None

		# If the value is not a dict
		if not isinstance(value, dict):
			raise ValueError('value')

		# Recurse and return it
		return {str(self._key.clean(k)):self._node.clean(v) for k,v in iteritems(value)}
919107
def clean_dict_keys(d):
    
    new_d = {}
    for (k, v) in d.iteritems():
        new_d[str(k)] = v
    return new_d
98269
def _reset_bind(self):
        """"""
        self.binded = False
        self._buckets = {}
        self._curr_module = None
        self._curr_bucket_key = None
685570
def clean(self, value):
		

		# If the value is None and it's optional, return as is
		if value is None and self._optional:
			return None

		# If the value is not a dict
		if not isinstance(value, dict):
			raise ValueError('value')

		# Init the return value
		dRet = {}

		# Go through each value and clean it using the associated node
		for k in value.keys():
			try:
				dRet[k] = self._nodes[k].clean(value[k])
			except KeyError:
				raise ValueError('%s is not a valid node in the parent' % k)

		# Return the cleaned values
		return dRet
457919
def strip_empty_values(obj):
    """"""
    if isinstance(obj, dict):
        new_obj = {}
        for key, val in obj.items():
            new_val = strip_empty_values(val)
            if new_val is not None:
                new_obj[key] = new_val
        return new_obj or None
    elif isinstance(obj, (list, tuple, set)):
        new_obj = []
        for val in obj:
            new_val = strip_empty_values(val)
            if new_val is not None:
                new_obj.append(new_val)
        return type(obj)(new_obj) or None
    elif obj or obj is False or obj == 0:
        return obj
    else:
        return None
920465
def reset(self, base=0, item=0, leng=None, refs=None,
                                    both=True, kind=None, type=None):
        '''
        '''
        if base < 0:
            raise ValueError('invalid option: %s=%r' % ('base', base))
        else:
            self.base = base
        if item < 0:
            raise ValueError('invalid option: %s=%r' % ('item', item))
        else:
            self.item = item
        if leng in _all_lengs:  # XXX or _callable(leng)
            self.leng = leng
        else:
            raise ValueError('invalid option: %s=%r' % ('leng', leng))
        if refs in _all_refs:  # XXX or _callable(refs)
            self.refs = refs
        else:
            raise ValueError('invalid option: %s=%r' % ('refs', refs))
        if both in (False, True):
            self.both = both
        else:
            raise ValueError('invalid option: %s=%r' % ('both', both))
        if kind in _all_kinds:
            self.kind = kind
        else:
            raise ValueError('invalid option: %s=%r' % ('kind', kind))
        self.type = type
572347
def _clean_data(self, str_value, file_data, obj_value):
        """"""
        str_value = str_value or None
        obj_value = obj_value or None
        return (str_value, None, obj_value)
1329667
def clean_dict(d, test=lambda v: v):
    
    return {k: v for k, v in d.items() if test(v)}
860196
def clear(self):
        """"""
        for k in list(self.keys()):
            if k not in self.extrakeys:
                del self[k]
592381
def reset(self):
        
        self.expr = []
        self.matcher = None
        self.last_matcher = None
        self.description = None
45671
def clean(self, *args, **kwargs):
        """"""
        for key in list(self.store.keys()):
            self.unset(key)
653412
def clear(self):
        ""
        if isinstance(self.data, np.ndarray):
            data = self.data[:, :0]
        elif util.pd and isinstance(self.data, util.pd.DataFrame):
            data = self.data.iloc[:0]
        elif isinstance(self.data, dict):
            data = {k: v[:0] for k, v in self.data.items()}
        with util.disable_constant(self):
            self.data = data
        self.send(data)
252732
def forget_coords(self):
        """"""
        self.w.ntotal.set_text('0')
        self.coords_dict.clear()
        self.redo()