Return set of canonical names of linked packages in `prefix`.
359186
def linked(prefix):
        """"""
        logger.debug(str(prefix))

        if not isdir(prefix):
            return set()

        meta_dir = join(prefix, 'conda-meta')
        if not isdir(meta_dir):
            # We might have nothing in linked (and no conda-meta directory)
            return set()

        return set(fn[:-5] for fn in os.listdir(meta_dir)
                   if fn.endswith('.json'))
966115
def _get_prefixes(self):
        """"""
        prefixes = {
            "@": "o",
            "+": "v",
        }
        feature_prefixes = self.server.features.get('PREFIX')
        if feature_prefixes:
            modes = feature_prefixes[1:len(feature_prefixes)//2]
            symbols = feature_prefixes[len(feature_prefixes)//2+1:]
            prefixes = dict(zip(symbols, modes))
        return prefixes
778299
def getPrefixDirectories(self, engineRoot, delimiter=' '):
		
		return delimiter.join(self.resolveRoot(self.prefixDirs, engineRoot))
393449
def prefixed_name(self) -> Tuple[YangIdentifier, Optional[YangIdentifier]]:
        """"""
        i1 = self.yang_identifier()
        try:
            next = self.peek()
        except EndOfInput:
            return (i1, None)
        if next != ":":
            return (i1, None)
        self.offset += 1
        return (self.yang_identifier(), i1)
196304
def get_name_variants(pkg):
    # type: (STRING_TYPE) -> Set[STRING_TYPE]
    

    if not isinstance(pkg, six.string_types):
        raise TypeError("must provide a string to derive package names")
    from pkg_resources import safe_name
    from packaging.utils import canonicalize_name

    pkg = pkg.lower()
    names = {safe_name(pkg), canonicalize_name(pkg), pkg.replace("-", "_")}
    return names
597309
def related_identifiers(self):
        """"""
        yield dict(
            identifier=u'https://github.com/{0}/tree/{1}'.format(
                self.repository['full_name'], self.release['tag_name']
            ),
            relation='isSupplementTo',
        )
1259249
def subpackets(*items):
    """"""
    prefixed = [subpacket_prefix_len(item) for item in items]
    return util.prefix_len('>H', b''.join(prefixed))
679946
def _stdlib_paths():
    
    attr_candidates = [
        'prefix',
        'real_prefix',  # virtualenv: only set inside a virtual environment.
        'base_prefix',  # venv: always set, equal to prefix if outside.
    ]
    prefixes = (getattr(sys, a) for a in attr_candidates if hasattr(sys, a))
    version = 'python%s.%s' % sys.version_info[0:2]
    return set(os.path.abspath(os.path.join(p, 'lib', version))
               for p in prefixes)
429356
def get_subpackages(name):
    """"""
    splist = []
    for dirpath, _dirnames, _filenames in os.walk(name):
        if osp.isfile(osp.join(dirpath, '__init__.py')):
            splist.append(".".join(dirpath.split(os.sep)))
    return splist
659523
def prefix_list(self, prefix, values):
        
        return list(map(lambda value: prefix + " " + value, values))
1192306
def attributes(self):
        """"""
        return [
            obj[len(IMPL_PREFIX) :] for obj in dir(self) if obj.startswith(IMPL_PREFIX)
        ]
341655
def get_paths(cls, packages):
        """"""
        allowable_packages = dict((app_config.name, app_config) for app_config in apps.get_app_configs())
        app_configs = [allowable_packages[p] for p in packages if p in allowable_packages]
        # paths of requested packages
        return [os.path.join(app.path, 'locale') for app in app_configs]
491402
def StringizeLibSymlinks(symlinks):
    """"""
    if SCons.Util.is_List(symlinks):
        try:
            return [ (k.get_path(), v.get_path()) for k,v in symlinks ]
        except (TypeError, ValueError):
            return symlinks
    else:
        return symlinks
79811
def get_dep_names_of_package(
        package,
        keep_version_pins=False,
        recursive=False,
        verbose=False,
        include_build_requirements=False
        ):
    

    # First, obtain the dependencies:
    dependencies = get_package_dependencies(
        package, recursive=recursive, verbose=verbose,
        include_build_requirements=include_build_requirements,
    )
    if verbose:
        print("get_dep_names_of_package_folder: " +
              "processing dependency list to names: " +
              str(dependencies))

    # Transform dependencies to their stripped down names:
    # (they can still have version pins/restrictions, conditionals, ...)
    dependency_names = set()
    for dep in dependencies:
        # If we are supposed to keep exact version pins, extract first:
        pin_to_append = ""
        if keep_version_pins and "(==" in dep and dep.endswith(")"):
            # This is a dependency of the format: 'pkg (==1.0)'
            pin_to_append = "==" + dep.rpartition("==")[2][:-1]
        elif keep_version_pins and "==" in dep and not dep.endswith(")"):
            # This is a dependency of the format: 'pkg==1.0'
            pin_to_append = "==" + dep.rpartition("==")[2]
        # Now get true (and e.g. case-corrected) dependency name:
        dep_name = get_package_name(dep) + pin_to_append
        dependency_names.add(dep_name)
    return dependency_names
622106
def symlinks(self):
        """"""
        if not self._P.Block.Symlinks:
            return []
        return [decode_ay(path) for path in self._P.Block.Symlinks]
22422
Map<String, String> packageNameMap() {
        if (packageNames == null) {
            return emptyMap();
        }

        Map<String, String> names = new LinkedHashMap<String, String>();
        for (PackageName name : packageNames) {
            names.put(name.getUri(), name.getPackage());
        }
        return names;
    }
486471
def type_names(prefix, sizerange):
        
        namelist = []
        for i in sizerange: namelist.append(prefix + str(i))
        return tuple(namelist)