returns a list of applied powerpath license keys
553263
def list_licenses():
    '''
    
    '''
    KEY_PATTERN = re.compile('Key (.*)')

    keys = []
    out = __salt__['cmd.run']('/sbin/emcpreg -list')
    for line in out.splitlines():
        match = KEY_PATTERN.match(line)

        if not match:
            continue

        keys.append({'key': match.group(1)})

    return keys
66625
def custom_licenses(self):
        
        buf = (ctypes.c_char * self.MAX_BUF_SIZE)()
        result = self._dll.JLINK_EMU_GetLicenses(buf, self.MAX_BUF_SIZE)
        if result < 0:
            raise errors.JLinkException(result)
        return ctypes.string_at(buf).decode()
732295
def _get_matches(self, key_presses):
        
        keys = tuple(k.key for k in key_presses)
        cli = self._cli_ref()

        # Try match, with mode flag
        return [b for b in self._registry.get_bindings_for_keys(keys) if b.filter(cli)]
348634
def licenses(self):
        """"""
        return {self._acronym_lic(l): l for l in self.resp_text.split('\n')
                if l.startswith(self.prefix_lic)}
1274417
def authorized_keys(mode='r'):
    
    path = '/var/home/.ssh/authorized_keys'
    if not os.path.exists(path):
        os.makedirs(os.path.dirname(path))
        open(path, 'w').close()
    with open(path, mode) as ak:
        yield ak
1248530
def license2marc(self, key, value):
    """"""
    return {
        'a': value.get('license'),
        'b': value.get('imposing'),
        'u': value.get('url'),
        '3': value.get('material'),
    }
772531
def get_signature_names(self):
        
        signature_expr = re.compile(r"^(META-INF/)(.*)(\.RSA|\.EC|\.DSA)$")
        signatures = []

        for i in self.get_files():
            if signature_expr.search(i):
                if "{}.SF".format(i.rsplit(".", 1)[0]) in self.get_files():
                    signatures.append(i)
                else:
                    log.warning("v1 signature file {} missing .SF file - Partial signature!".format(i))

        return signatures
881785
def get_installed_distributions(skip=stdlib_pkgs):
    
    return [d for d in pkg_resources.working_set
            if d.key not in skip]
942482
def get_keys() -> List[Tuple[str, str]]:
    
    with authorized_keys() as ak:
        return [(hashlib.new('md5', line.encode()).hexdigest(),
                 line)
                for line in ak.read().split('\n')
                if line.strip()]
558423
private void getResPathKeys(String[] keys, int depth) {
        ICUResourceBundle b = this;
        while (depth > 0) {
            keys[--depth] = b.key;
            b = b.container;
            assert (depth == 0) == (b.container == null);
        }
    }
1023940
def as_list(self):
        ""
        netloc = ''
        if self.vpath_connector:
            netloc = '(('+self.vpath_connector+'))'
        elif self.authority:
            netloc = self.authority
        else:
            netloc = self.netloc
        return [
            self.scheme,
            netloc,
            self.path,
            self.query,
            '',
            ]
164882
def get_filepaths_and_exts(self):
        """"""
        filepaths = [prod.filepath for prod in self.products]
        exts = [prod.ext for prod in self.products]

        return filepaths, exts
614022
def load_pubkeys(loadpath, pubkeys):

    """"""

    filenames = os.listdir(loadpath)
    logger.debug('loading authorized pubkeys {0}'.format(filenames))
    for filename in filenames:
        pubkeys.append(open(join(loadpath, filename)).read())
217817
def list_keys(self):
    
    return [k for k, el in self._keystore.items() if not el.is_expired]
979880
def listkeys(ctx):
    
    t = PrettyTable(["Available Key"])
    t.align = "l"
    for key in ctx.peerplays.wallet.getPublicKeys():
        t.add_row([key])
    click.echo(t)
136719
def get_committed_signatures(vcs):
    
    committed_path = _get_committed_history_path(vcs)
    known_signatures = []
    if os.path.exists(committed_path):
        with open(committed_path, 'r') as f:
            known_signatures = f.read().split()
    return known_signatures
1268298
def get_peers_public_keys(self):
        """"""
        with self._lock:
            # Use a generator inside the list comprehension to filter out None
            # values in a single pass
            return [key for key
                    in (self._network.connection_id_to_public_key(peer)
                        for peer
                        in copy.copy(self._peers))
                    if key is not None]