Backport support for original codes.
769142
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return ESP_TransformSuite(key)
        if key not in ESP_TransformSuite._member_map_:
            extend_enum(ESP_TransformSuite, key, default)
        return ESP_TransformSuite[key]
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]
1146140
function getKeys(code) {
		var reKeys = /KEYS\[\s*(\d+)\s*\]/g
		,	match
		,	max = 0, d = 1000;
		while ((match = reKeys.exec(code)) && d > 0) {
			if (parseInt(match[1], 10) > max)
				max = parseInt(match[1], 10);
			d--;
		}
		self._keys[scriptName] = max;
		done(code);
	}
369831
def object2code(key, code):
    """"""

    if key in ["xscale", "yscale"]:
        if code == "log":
            code = True
        else:
            code = False

    else:
        code = unicode(code)

    return code
213149
def _grouped_backends(cls, options, backend):
        ""

        if options is None:
            return [(backend or Store.current_backend, options)]
        dfltdict = defaultdict(dict)
        for spec, groups in options.items():
            if 'output' not in groups.keys() or len(groups['output'])==0:
                dfltdict[backend or Store.current_backend][spec.strip()] = groups
            elif set(groups['output'].keys()) - set(['backend']):
                dfltdict[groups['output']['backend']][spec.strip()] = groups
            elif ['backend'] == list(groups['output'].keys()):
                filtered = {k:v for k,v in groups.items() if k != 'output'}
                dfltdict[groups['output']['backend']][spec.strip()] = filtered
            else:
                raise Exception('The output options group must have the backend keyword')

        return [(bk, bk_opts) for (bk, bk_opts) in dfltdict.items()]
273502
def unsigned_input(outpoint, redeem_script=None, sequence=None):
    '''
    
    '''
    if redeem_script is not None and sequence is None:
        sequence = guess_sequence(redeem_script)
    if sequence is None:
        sequence = 0xFFFFFFFE
    return tb.make_legacy_input(
        outpoint=outpoint,
        stack_script=b'',
        redeem_script=b'',
        sequence=sequence)
954267
function escape_code(defaultRenderer) {
  return function(tokens, idx, options, env, slf) {
    tokens[idx].content = tokens[idx].content
      .slice(2, -2)
      .replace(/\\`/g, '__BACK_TICK__');

    return defaultRenderer(tokens, idx, options, env, slf);
  };
}
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)
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
45805
def new_code_block(self, **kwargs):
        """"""
        proto = {'content': '',
                 'type': self.code,
                 'IO': '',
                 'attributes': ''}
        proto.update(**kwargs)
        return proto
248641
def backend_type(path, client):
    """"""
    backends = client.list_secret_backends()['data']
    vault_path = "%s/" % path
    return backends[vault_path]['type']
1135937
def _get_codes(self):
        
        v = self._codes.view()
        v.flags.writeable = False
        return v
291807
def get_grp2codes(self):
        """"""
        grp2codes = cx.defaultdict(set)
        for code, ntd in self.code2nt.items():
            grp2codes[ntd.group].add(code)
        return dict(grp2codes)
1094324
private void genImportCode() {
        Set<String> imports = new HashSet<String>();
        imports.add("java.util.*");
        imports.add("java.io.IOException");
        imports.add("java.lang.reflect.*");
        imports.add("com.baidu.bjf.remoting.protobuf.code.*");
        imports.add("com.baidu.bjf.remoting.protobuf.utils.*");
        imports.add("com.baidu.bjf.remoting.protobuf.*");
        imports.add("com.google.protobuf.*");

        if (!StringUtils.isEmpty(getPackage())) {
            imports.add(getTargetProxyClassname());
        }

        for (String pkg : imports) {
            templator.setVariable("importPackage", pkg);
            templator.addBlock("imports");
        }
    }
877653
def get_modifier_mapping(self):
        """"""
        r = request.GetModifierMapping(display = self.display)
        return r.keycodes
1011133
def make_legacy_input(outpoint, stack_script, redeem_script, sequence):
    '''
    
    '''
    if 'decred' in riemann.get_current_network_name():
        return tx.DecredTxIn(
            outpoint=outpoint,
            sequence=utils.i2le_padded(sequence, 4))
    return tx.TxIn(outpoint=outpoint,
                   stack_script=stack_script,
                   redeem_script=redeem_script,
                   sequence=utils.i2le_padded(sequence, 4))
764394
def _legacy_pubs(buf):
    """"""
    leftover = buf.read()
    if leftover:
        log.warning('skipping leftover: %r', leftover)
    code = util.pack('B', msg_code('SSH_AGENT_RSA_IDENTITIES_ANSWER'))
    num = util.pack('L', 0)  # no SSH v1 keys
    return util.frame(code, num)