Converts a key string like 'foo.bar.0.wopper' to ['foo', 'bar', 0, 'wopper']
 :param {String} keyString The dot-separated key string
 :return {[String]} The lens array containing string or integers
518640
def key_string_to_lens_path(key_string):
    
    return map(
        if_else(
            isinstance(int),
            # convert to int
            lambda s: int(s),
            # Leave the string alone
            identity
        ),
        key_string.split('.')
    )
79029
def keycode_to_keysym(self, keycode, index):
        """"""
        try:
            return self._keymap_codes[keycode][index]
        except IndexError:
            return X.NoSymbol
1035198
def keys_to_string(data):
    
    if isinstance(data, dict):
        for key in list(data.keys()):
            if isinstance(key, six.string_types):
                value = data[key]
                val = keys_to_string(value)
                del data[key]
                data[key.encode("utf8", "ignore")] = val
    return data
1085211
def _parse_key(key):
    '''
    
    '''
    splt = key.split("\\")
    hive = splt.pop(0)
    key = '\\'.join(splt)
    return hive, key
871173
def _extract_key_val(kv, delimiter='='):
    '''
    '''
    pieces = kv.split(delimiter)
    key = pieces[0]
    val = delimiter.join(pieces[1:])
    return key, val
1168718
def normalize_keys(mapping)
      return mapping.inject({}) do |accu, pair|
        name, value = pair
        if Symbol === name
          name = name.to_s
        elsif name.respond_to?(:to_str)
          name = name.to_str
        else
          raise TypeError,
            "Can't convert #{name.class} into String."
        end
        accu[name] = value
        accu
      end
    end
651642
function parseKey (inp) {
    var res = parseString(inp);
    if (res) return res;
  
    var match = inp.takeAPeek(JS_IDENT);
    if (match) return match[0]
  }
1106065
def naturalize_string(key):
    
    return [int(text) if text.isdigit() else text.lower()
            for text in re.split(numregex, key)]
1225756
function getkey (key) {
    var parsedKey = Number(key)

    return (
      isNaN(parsedKey) ||
      key.indexOf('.') !== -1 ||
      opts.object
    ) ? key
      : parsedKey
  }
1016173
function getKeyStrokeString(ev) {
    var keys = [];

    if (ev.ctrlKey || ev.metaKey) {
        keys.push('ctrl');
    }
    if (ev.shiftKey) {
        keys.push('shift');
    }
    keys.push(keyNameMap[ev.keyCode]);

    return keys.join('-');
}
397438
function getKeys(compositeKey) {
  if (typeof compositeKey === 'string') {
    // else assume string and split around dots
    let keyList = keyMap[compositeKey];
    if (!keyList) {
      keyList = compositeKey.split('.');
      keyMap[compositeKey] = keyList;
    }
    return keyList;
  }
  // Wrap in array if needed
  return Array.isArray(compositeKey) ? compositeKey : [compositeKey];
}
1003194
def maybe_encode_keys(self, keys):
        
        ret = {}
        for k, v in six.iteritems(keys):
            if is_dynamo_value(v):
                return keys
            elif not is_null(v):
                ret[k] = self.encode(v)
        return ret
310701
function toKey(value) {
  if (typeof value == 'string' || isSymbol(value)) {
    return value;
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY$2) ? '-0' : result;
}
1141433
def _keynat(string):
    
    r = []
    for c in string:
        if c.isdigit():
            if r and isinstance(r[-1], int):
                r[-1] = r[-1] * 10 + int(c)
            else:
                r.append(int(c))
        else:
            r.append(9 + ord(c))
    return r
864744
function parseString(opts) {
    var obj = new Obj();

    opts.split(' ').forEach(function (item) {
        var data = splitByColon(item);
        obj[data.key] = data.val;
    });

    return obj;
}
1175070
def _parse_style_str(s):
    
    styledict = {}
    if s:
        # parses L -> R so later keys overwrite earlier ones
        for keyval in s.split(';'):
            l = keyval.strip().split(':')
            if l and len(l) == 2: styledict[l[0].strip()] = l[1].strip()
    return styledict
408268
function styleStringify (obj) {
  var key;
  var keyCount = 0;
  var i = 0;
  var str = '';

  for (key in obj) { keyCount++; }

  for (key in obj) {
    str += (key + ': ' + obj[key]);
    if (i < keyCount - 1) { str += '; '; }
    i++;
  }
  return str;
}