Return a mapping from the name of each L{InstalledOffering} in
        C{self._siteStore} to the corresponding L{IOffering} plugins.
15319
def getInstalledOfferings(self):
        
        d = {}
        installed = self._siteStore.query(InstalledOffering)
        for installation in installed:
            offering = installation.getOffering()
            if offering is not None:
                d[offering.name] = offering
        return d
247448
def list_plugins(directory=None):
    """"""
    repo = require_repo(directory)
    plugins = get_value(repo, 'plugins')
    if not plugins or not isinstance(plugins, dict):
        return None
    return plugins.keys()
1196825
def get_stores():
    '''
    
    '''
    ret = dict()
    cmd = r"Get-ChildItem -Path 'Cert:\' | " \
          r"Select-Object LocationName, StoreNames"

    items = _cmd_run(cmd=cmd, as_json=True)

    for item in items:
        ret[item['LocationName']] = list()

        for store in item['StoreNames']:
            ret[item['LocationName']].append(store)
    return ret
574388
def get_pkg_names(pkgs):
    
    result = set()
    with open(join("mapping"), "r") as f:
        data = dict(x.strip().split(":") for x in f)
    for pkg in pkgs:
        # Look up the mapped requirement. If a mapping isn't found,
        # simply use the package name.
        result.add(data.get(pkg, pkg))
    # Return a sorted list for backward compatibility.
    return sorted(result, key=lambda s: s.lower())
578979
def _get_extension_loader_mapping(self):
        

        loader_table = self._get_common_loader_mapping()
        loader_table.update(
            {
                "htm": HtmlTableFileLoader,
                "md": MarkdownTableFileLoader,
                "sqlite3": SqliteFileLoader,
                "xlsx": ExcelTableFileLoader,
                "xls": ExcelTableFileLoader,
            }
        )

        return loader_table
873046
def get_dependencies(self):
        
        all_deps = OrderedSet()
        for key, _ in list(self.__config.items()):
            if key in self.__cli:
                continue

            if key.endswith('sources'):
                all_deps |= self.get_sources(key[:len('sources') * -1 - 1])

        for key, _ in list(self.__cli.items()):
            if key.endswith('sources'):
                all_deps |= self.get_sources(key[:len('sources') * -1 - 1])

        if self.conf_file is not None:
            all_deps.add(self.conf_file)

        all_deps.add(self.get_path("sitemap", rel_to_cwd=True))

        cwd = os.getcwd()
        return [os.path.relpath(fname, cwd) for fname in all_deps if fname]
153453
def get_plugin_folders():
    """"""
    folders = []
    defaultfolder = normpath("~/.linkchecker/plugins")
    if not os.path.exists(defaultfolder) and not Portable:
        try:
            make_userdir(defaultfolder)
        except Exception as errmsg:
            msg = _("could not create plugin directory %(dirname)r: %(errmsg)r")
            args = dict(dirname=defaultfolder, errmsg=errmsg)
            log.warn(LOG_CHECK, msg % args)
    if os.path.exists(defaultfolder):
        folders.append(defaultfolder)
    return folders
1182995
def list_plugins():
    '''
    
    '''
    plugin_list = os.listdir(PLUGINDIR)
    ret = []
    for plugin in plugin_list:
        # Check if execute bit
        stat_f = os.path.join(PLUGINDIR, plugin)
        execute_bit = stat.S_IXUSR & os.stat(stat_f)[stat.ST_MODE]
        if execute_bit:
            ret.append(plugin)
    return ret
301541
def find_library(name, cached=True, internal=True):
    

    # a new one
    if not cached:
        return cdll.LoadLibrary(_so_mapping[name])

    # from the shared internal set or a new one
    if internal:
        if name not in _internal:
            _internal[name] = cdll.LoadLibrary(_so_mapping[name])
        return _internal[name]

    # a shared one
    return getattr(cdll, _so_mapping[name])
716527
def _get_plugin_module_paths(self, plugin_dir):
        '''  '''
        filepaths = [
            fp for fp in glob.glob('{}/**/*.py'.format(plugin_dir), recursive=True)
            if not fp.endswith('__init__.py')
        ]
        rel_paths = [re.sub(plugin_dir.rstrip('/') + '/', '', fp) for fp in filepaths]
        module_paths = [rp.replace('/', '.').replace('.py', '') for rp in rel_paths]

        return module_paths
754593
def get_plugins_by_name(self, *names):
        
        self._import_plugins()
        plugin_instances = []
        for name in names:
            if isinstance(name, six.string_types):
                try:
                    plugin_instances.append(self.plugins[name.lower()])
                except KeyError:
                    raise PluginNotFound("No plugin named '{0}'.".format(name))
            elif isinstance(name, type) and issubclass(name, ContentPlugin):
                # Will also allow classes instead of strings.
                plugin_instances.append(self.plugins[self._name_for_model[name.model]])
            else:
                raise TypeError("get_plugins_by_name() expects a plugin name or class, not: {0}".format(name))
        return plugin_instances
343788
function (pluginsPath) {
    var plugins = fs.readdirSync(pluginsPath);
    var loadedPlugin = [];
    plugins.forEach(function (pluginName) {
        if (pluginName !== 'index.js') {
            loadedPlugin.push(require(path.resolve(pluginsPath, path.basename(pluginName, '.js'))));
        }
    });
    return loadedPlugin;
}
827306
def _get_mapping_from_secret_type_to_class_name():
    """"""
    mapping = {}
    for key, value in globals().items():
        try:
            if issubclass(value, BasePlugin) and value != BasePlugin:
                mapping[value.secret_type] = key
        except TypeError:
            pass

    return mapping
595235
def get(self, name=None):
        
        if name is None:
            return self._plugins
        else:
            if name not in self._plugins.keys():
                return None
            else:
                return self._plugins[name]
746481
def _get_install_sources(self):
        
        if not self._sources:
            return ''
        parts = ['--no-index']
        for source in self._sources:
            parts.append("--find-links '{0}'".format(source))
        return ' '.join(parts)
988989
def getAllAsDict(self):
        """"""
        return {p: self._plugins[p].get_raw() for p in self._plugins}
640265
def get_plugin(self, name):
        
        for p in self._plugins:
            if p.name == name:
                return p
        return None