Backport support for original codes.
553484
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return Frame(key)
        if key not in Frame._member_map_:
            extend_enum(Frame, key, default)
        return Frame[key]
199496
function paramCallback(err) {
                var fn = paramCallbacks[paramIndex++];
                if (err || !fn) return param(err);
                fn(req, res, paramCallback, paramVal, key.name);
            }
1106943
function repoCharacter(code) {
  return (
    code === CC_SLASH ||
    code === CC_DOT ||
    code === CC_DASH ||
    decimal(code) ||
    alphabetical(code)
  )
}
1186109
def reply_code_tuple(code: int) -> Tuple[int, int, int]:
    '''
    '''
    return code // 100, code // 10 % 10, code % 10
728560
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return TransType(key)
        if key not in TransType._member_map_:
            extend_enum(TransType, key, default)
        return TransType[key]
461674
def _build_codes() -> Dict[str, Dict[str, str]]:
    
    built = {
        'fore': {},
        'back': {},
        'style': {},
    }  # type: Dict[str, Dict[str, str]]

    # Set codes for forecolors (30-37) and backcolors (40-47)
    # Names are given to some of the 256-color variants as 'light' colors.
    for name, number in _namemap:
        # Not using format_* functions here, no validation needed.
        built['fore'][name] = codeformat(30 + number)
        built['back'][name] = codeformat(40 + number)
        litename = 'light{}'.format(name)  # type: str
        built['fore'][litename] = codeformat(90 + number)
        built['back'][litename] = codeformat(100 + number)

    # Set reset codes for fore/back.
    built['fore']['reset'] = codeformat(39)
    built['back']['reset'] = codeformat(49)

    # Set style codes.
    for code, names in _stylemap:
        for alias in names:
            built['style'][alias] = codeformat(code)

    # Extended (256 color codes)
    for i in range(256):
        built['fore'][str(i)] = extforeformat(i)
        built['back'][str(i)] = extbackformat(i)

    return built
669465
def backend_from_mime(mime):
    """"""
    try:
        mod_name = MIMETYPE_TO_BACKENDS[mime]

    except KeyError:
        msg = "No handler for %r, defaulting to %r" % (mime, DEFAULT_MIME)
        if 'FULLTEXT_TESTING' in os.environ:
            warn(msg)
        else:
            LOGGER.debug(msg)

        mod_name = MIMETYPE_TO_BACKENDS[DEFAULT_MIME]
    mod = import_mod(mod_name)
    return mod
914865
def _expand_error_codes(code_parts):
        """"""
        codes = set(ErrorRegistry.get_error_codes())
        expanded_codes = set()

        try:
            for part in code_parts:
                # Dealing with split-lined configurations; The part might begin
                # with a whitespace due to the newline character.
                part = part.strip()
                if not part:
                    continue

                codes_to_add = {code for code in codes
                                if code.startswith(part)}
                if not codes_to_add:
                    log.warning(
                        'Error code passed is not a prefix of any '
                        'known errors: %s', part)
                expanded_codes.update(codes_to_add)
        except TypeError as e:
            raise IllegalConfiguration(e)

        return expanded_codes
740870
def uimports(code):
    
    for uimport in UIMPORTLIST:
        uimport = bytes(uimport, 'utf8')
        code = code.replace(uimport, b'u' + uimport)
    return code
628205
def _handle_mac(self, keycode):
        """"""
        key = self._keyname(unichr(keycode))
        self._output(type="keys", key=key, realkey=key)
1060891
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return TOS_PRE(key)
        if key not in TOS_PRE._member_map_:
            extend_enum(TOS_PRE, key, default)
        return TOS_PRE[key]
301628
def get_backend(backend, path, backends):
    """"""
    m_norm = normalize_vault_path(path)
    for mount_name, values in backends.items():
        b_norm = normalize_vault_path(mount_name)
        if (m_norm == b_norm) and values['type'] == backend:
            return values

    return None
201450
def star_sep_check(self, original, loc, tokens):
        """"""
        return self.check_py("3", "keyword-only argument separator (add 'match' to front to produce universal code)", original, loc, tokens)
922168
function importAuthCodes(channel, codes, settings) {
    var authDir, outFile, outFileBak;

    channel.registry.importClients(codes);

    authDir = settings.authDir;
    if (settings.dumpCodes !== false) {
        outFile = settings.outFile || 'codes.imported.csv';
        if (!path.isAbsolute(outFile)) {
            outFile = path.join(settings.authDir, outFile);
        }
        outFileBak = outFile + '.bak';

        fs.rename(outFile, outFileBak, function() {
            var NDDB, db;
            NDDB = require('NDDB').NDDB;
            db = new NDDB();
            db.importDB(codes);
            // Async function. Throws errors.
            db.save(outFile);
        });
    }

    // Not needed anymore.
    delete settings.authDir;
}
273836
def backward_char_extend_selection(self, e): #
         """
        self.l_buffer.backward_char_extend_selection(self.argument_reset)
        self.finalize()
280692
def compile_rich(cls, code, path=None, extra_args=None):
        """"""

        return {
            contract_name: {
                'code': '0x' + contract.get('bin_hex'),
                'info': {
                    'abiDefinition': contract.get('abi'),
                    'compilerVersion': cls.compiler_version(),
                    'developerDoc': contract.get('devdoc'),
                    'language': 'Solidity',
                    'languageVersion': '0',
                    'source': code,
                    'userDoc': contract.get('userdoc')
                },
            }
            for contract_name, contract
            in cls.combined(code, path=path, extra_args=extra_args)
        }
585247
def set_code(self, key, code):
        """"""

        old_code = self.grid.code_array(key)

        try:
            old_code = unicode(old_code, encoding="utf-8")

        except TypeError:
            pass

        if code == old_code:
            return

        if not (old_code is None and not code) and code != old_code:
            # Mark content as changed
            post_command_event(self.main_window, self.ContentChangedMsg)

        # Set cell code
        self.grid.code_array.__setitem__(key, code)