get aliases from parse info.

        :param parse_info: Parsed info from html soup.
199168
def _get_aliases(parse_info):
        
        return [
            div.string.strip()
            for div in parse_info.find('div', id='editassociated')
            if div.string is not None
        ]
270191
def GetParsersInformation(cls):
    
    parsers_information = []
    for _, parser_class in cls.GetParsers():
      description = getattr(parser_class, 'DESCRIPTION', '')
      parsers_information.append((parser_class.NAME, description))

    return parsers_information
639273
def _GetPluginData(self):
    
    return_dict = {}

    return_dict['Versions'] = [
        ('plaso engine', plaso.__version__),
        ('python', sys.version)]

    hashers_information = hashers_manager.HashersManager.GetHashersInformation()
    parsers_information = parsers_manager.ParsersManager.GetParsersInformation()
    plugins_information = (
        parsers_manager.ParsersManager.GetParserPluginsInformation())
    presets_information = parsers_manager.ParsersManager.GetPresetsInformation()

    return_dict['Hashers'] = hashers_information
    return_dict['Parsers'] = parsers_information
    return_dict['Parser Plugins'] = plugins_information
    return_dict['Parser Presets'] = presets_information

    return return_dict
78990
def has_parser(self, url_info: URLInfo):
        ''''''
        key = self.url_info_key(url_info)
        return key in self._parsers
1029733
def resolve_aliases(self, chunks):
        '''
        
        '''
        for idx, _ in enumerate(chunks):
            new_state = self.aliases.get(chunks[idx]['state'])
            if new_state is not None:
                chunks[idx]['state'] = new_state
1212369
def get_reversed_aliases(self):
        
        return dict((v, k) for k, v in six.iteritems(self.aliases))
943803
def _extract_sel_info(sel):
    """"""
    from cssselect2.parser import (CombinedSelector, CompoundSelector,
                                   PseudoClassSelector,
                                   FunctionalPseudoClassSelector)
    steps = []
    extras = []
    if isinstance(sel, CombinedSelector):
        lstep, lextras = _extract_sel_info(sel.left)
        rstep, rextras = _extract_sel_info(sel.right)
        steps = lstep + rstep
        extras = lextras + rextras
    elif isinstance(sel, CompoundSelector):
        for ssel in sel.simple_selectors:
            s, e = _extract_sel_info(ssel)
            steps.extend(s)
            extras.extend(e)
    elif isinstance(sel, FunctionalPseudoClassSelector):
        if sel.name == 'pass':
            steps.append(serialize(sel.arguments).strip('"\''))
    elif isinstance(sel, PseudoClassSelector):
        if sel.name == 'deferred':
            extras.append('deferred')
    return (steps, extras)
269842
def all_es_aliases(self):
        """"""

        r = self.requests.get(self.url + "/_aliases", headers=HEADER_JSON, verify=False)
        try:
            r.raise_for_status()
        except requests.exceptions.HTTPError as ex:
            logger.warning("Something went wrong when retrieving aliases on %s.",
                           self.anonymize_url(self.index_url))
            logger.warning(ex)
            return

        aliases = []
        for index in r.json().keys():
            aliases.extend(list(r.json()[index]['aliases'].keys()))

        aliases = list(set(aliases))
        return aliases
499844
def _get_name_info(name_index, name_list):
    
    argval = name_index
    if (name_list is not None
        # PyPY seems to "optimize" out constant names,
        # so we need for that:
        and name_index < len(name_list)):
        argval = name_list[name_index]
        argrepr = argval
    else:
        argrepr = repr(argval)
    return argval, argrepr
924133
def get_from_relations(self, query,aliases):
        '''
        
        '''
        return [aliases[rel.get_name()] for rel in query.get_relations() if not rel.is_negated()]
880799
def infos(cls, fqdn):
        
        if isinstance(fqdn, (list, tuple)):
            ids = []
            for fqd_ in fqdn:
                ids.extend(cls.infos(fqd_))
            return ids

        ids = cls.usable_id(fqdn)
        if not ids:
            return []

        if not isinstance(ids, (list, tuple)):
            ids = [ids]

        return [cls.info(id_) for id_ in ids]
1048364
def GetAlias(session=None):
        
        if session is not None:
            return session['alias']

        if not clc.ALIAS:  clc.v2.API._Login()
        return(clc.ALIAS)
351414
def parse_info_frags(info_frags):
    

    new_scaffolds = {}
    with open(info_frags, "r") as info_frags_handle:
        current_new_contig = None
        for line in info_frags_handle:
            if line.startswith(">"):
                current_new_contig = str(line[1:-1])
                new_scaffolds[current_new_contig] = []
            elif line.startswith("init_contig"):
                pass
            else:
                (init_contig, id_frag, orientation, pos_start, pos_end) = str(
                    line[:-1]
                ).split("\t")
                start = int(pos_start)
                end = int(pos_end)
                ori = int(orientation)
                fragid = int(id_frag)
                assert start < end
                assert ori in {-1, 1}
                new_scaffolds[current_new_contig].append(
                    [init_contig, fragid, start, end, ori]
                )

    return new_scaffolds
231003
def info2dicts(info, in_place=False):
    
    if 'packages' not in info and 'releases' not in info:
        return info
    if in_place:
        info_dicts = info
    else:
        info_dicts = info.copy()
    packages = info.get('packages')
    if packages:
        info_dicts['packages'] = list2dict(packages, 'project')
    releases = info.get('releases')
    if releases:
        info_dicts['releases'] = list2dict(releases, 'name')
    return info_dicts
621511
def aliases(self):
        """"""
        return {alias.namespace: alias.name for alias in self._proto.alias}.items()
799439
def get_comments(self):
        
        # Lazily load info
        if self.info is None:
            self.get_info()

        if 'comments' in self.info:
            return [structure['text'] for structure in self.info['comments']['comments']]
        else:
            return []
553157
def _parse_calls_data(klass, format_, infos, gt_str):
        
        data = OrderedDict()
        # The standard is very nice to parsers, we can simply split at
        # colon characters, although I (Manuel) don't know how strict
        # programs follow this
        for key, info, value in zip(format_, infos, gt_str.split(":")):
            data[key] = parse_field_value(info, value)
        return data