Helper method that restores the values encoded in a hashid without
    argument checks.
192818
def _decode(hashid, salt, alphabet, separators, guards):
    """"""
    parts = tuple(_split(hashid, guards))
    hashid = parts[1] if 2 <= len(parts) <= 3 else parts[0]

    if not hashid:
        return

    lottery_char = hashid[0]
    hashid = hashid[1:]

    hash_parts = _split(hashid, separators)
    for part in hash_parts:
        alphabet_salt = (lottery_char + salt + alphabet)[:len(alphabet)]
        alphabet = _reorder(alphabet, alphabet_salt)
        yield _unhash(part, alphabet)
1212353
def prepare_string_for_hashing(obj, ignore_string_type_changes=False, ignore_string_case=False):
    
    original_type = obj.__class__.__name__
    if isinstance(obj, bytes):
        obj = obj.decode('utf-8')
    if not ignore_string_type_changes:
        obj = KEY_TO_VAL_STR.format(original_type, obj)
    if ignore_string_case:
        obj = obj.lower()
    return obj
483174
def _clean(self, value):
		""""""
		
		value = (str(v) for v in value)
		
		if self.strip:
			value = (v.strip() for v in value)
		
		if not self.empty:
			value = (v for v in value if v)
		
		return value
75639
def unescape(s):
    """"""
    s = bytearray(s)
    i = 0
    while i < len(s):
        if s[i] == ord('%'):
            hex_bytes = bytes(s[i+1:i+3])
            value = int(hex_bytes.decode('ascii'), 16)
            s[i:i+3] = [value]
        i += 1
    return bytes(s)
64951
def _convert_hashes(values):
    
    hashes = {}
    if not values:
        return hashes
    for value in values:
        try:
            name, value = value.split(":", 1)
        except ValueError:
            name = "sha256"
        if name not in hashes:
            hashes[name] = []
        hashes[name].append(value)
    return hashes
956745
public void restoreState(FacesContext facesContext, Object state)
    {
        if (state != null)
        {
            Object values[] = (Object[])state;
            _currencyCode = (String)values[0];
            _currencySymbol = (String)values[1];
            _locale = (Locale)values[2];
            Integer value = (Integer)values[3];
            _maxFractionDigits = value != null ? value.intValue() : 0;
            value = (Integer)values[4];
            _maxIntegerDigits = value != null ? value.intValue() : 0;
            value = (Integer)values[5];
            _minFractionDigits = value != null ? value.intValue() : 0;
            value = (Integer)values[6];
            _minIntegerDigits = value != null ? value.intValue() : 0;
            _pattern = (String)values[7];
            _type = (String)values[8];
            _groupingUsed = ((Boolean)values[9]).booleanValue();
            _integerOnly = ((Boolean)values[10]).booleanValue();
            _maxFractionDigitsSet = ((Boolean)values[11]).booleanValue();
            _maxIntegerDigitsSet = ((Boolean)values[12]).booleanValue();
            _minFractionDigitsSet = ((Boolean)values[13]).booleanValue();
            _minIntegerDigitsSet = ((Boolean)values[14]).booleanValue();
        }
    }
1264968
private void rehash() {
        int oldCapacity = mTable.length;
        Entry oldMap[] = mTable;
        
        int newCapacity = oldCapacity * 2 + 1;
        Entry newMap[] = new Entry[newCapacity];
        
        mModCount++;
        mThreshold = (int)(newCapacity * mLoadFactor);
        mTable = newMap;
        
        for (int i = oldCapacity ; i-- > 0 ;) {
            for (Entry old = oldMap[i] ; old != null ; ) {
                Entry e = old;
                old = old.mNext;

                // Only copy entry if its value hasn't been cleared.
                if (e.getValue() == null) {
                    mCount--;
                }
                else {
                    int index = (e.mHash & 0x7FFFFFFF) % newCapacity;
                    e.mNext = newMap[index];
                    newMap[index] = e;
                }
            }
        }
    }
63950
private V removeFromDataIndexOfKey(int dataIndexOfKey) {
    int dataSize = this.size << 1;
    if (dataIndexOfKey < 0 || dataIndexOfKey >= dataSize) {
      return null;
    }
    V result = valueAtDataIndex(dataIndexOfKey + 1);
    Object[] data = this.data;
    int moved = dataSize - dataIndexOfKey - 2;
    if (moved != 0) {
      System.arraycopy(data, dataIndexOfKey + 2, data, dataIndexOfKey, moved);
    }
    this.size--;
    setData(dataSize - 2, null, null);
    return result;
  }
711057
def uhash(self, val):
        """"""

        if not isinstance(val, string_types):
            raise _TypeError("val", "str", val)

        return codecs.encode(self.hash(val.encode("utf-8")), "hex_codec").decode("utf-8")
554284
def clean_value(self, value):
        '''
        
        '''
        # We have to clean before checking min/max length. It's done in
        # separate method to allow additional clean action in subclasses.
        if self.nontext_replacement is not None:
            value = replace_nontext(value, self.nontext_replacement)
        if self.strip:
            value = value.strip()
        return value
136169
def _encode(values, salt, min_length, alphabet, separators, guards):
    """"""

    len_alphabet = len(alphabet)
    len_separators = len(separators)
    values_hash = sum(x % (i + 100) for i, x in enumerate(values))
    encoded = lottery = alphabet[values_hash % len(alphabet)]

    for i, value in enumerate(values):
        alphabet_salt = (lottery + salt + alphabet)[:len_alphabet]
        alphabet = _reorder(alphabet, alphabet_salt)
        last = _hash(value, alphabet)
        encoded += last
        value %= ord(last[0]) + i
        encoded += separators[value % len_separators]

    encoded = encoded[:-1]  # cut off last separator

    return (encoded if len(encoded) >= min_length else
            _ensure_length(encoded, min_length, alphabet, guards, values_hash))
416823
def update_hash_from_str(hsh, str_input):
    
    byte_input = str(str_input).encode("UTF-8")
    hsh.update(byte_input)
580278
def hash(value, chars=None):
	''
	value = hash_func(value).hexdigest()
	if chars: value = value[:chars]
	return mark_safe(value)
1176960
def clean(mapping, bind, values):
    
    categories = {'C': ' '}
    for value in values:
        if isinstance(value, six.string_types):
            value = normality.normalize(value, lowercase=False, collapse=True,
                                        decompose=False,
                                        replace_categories=categories)
        yield value
936103
def clean(self, value):
        """"""

        if isinstance(value, numpy.ndarray):
            return value
        elif isinstance(value, (list, tuple)):
            return numpy.array(value)

        raise ParameterNotValidError
336738
def process_hash(value)
      result = {}
      unless value.empty?
        value.split(",").each do |s|
          k,v = s.split(':').compact.map { |i| i.to_s.strip }
          result[k] = v.to_s
        end
      end
      result
    end
1132844
private static String uniquify(String id, Set<String> knownIds) {
		int n = 10;
		String olda = id;
		while (knownIds.contains(id)) {
			id = olda + Integer.toString(n, Character.MAX_RADIX);
			++n;
		}
		return id;
	}