Show only usefull packages
502873
def filter_pypi(self, entry):
        """"""
        for package in self.packages:
            if entry.title.lower().startswith(package):
                return entry
1268898
def _get_all_ns_packages(self):
        """"""
        pkgs = self.distribution.namespace_packages or []
        return sorted(flatten(map(self._pkg_names, pkgs)))
251938
def toggle_show_cd_only(self, checked):
        """"""
        self.parent_widget.sig_option_changed.emit('show_cd_only', checked)
        self.show_cd_only = checked
        if checked:
            if self.__last_folder is not None:
                self.set_current_folder(self.__last_folder)
        elif self.__original_root_index is not None:
            self.setRootIndex(self.__original_root_index)
541414
def output_package(dist):
        """"""
        if dist_is_editable(dist):
            return '%s (%s, %s)' % (
                dist.project_name,
                dist.version,
                dist.location,
            )
        return '%s (%s)' % (dist.project_name, dist.version)
957142
def remove_obsolete_items(self):
        """"""
        self.rdata = [(filename, data) for filename, data in self.rdata
                      if is_module_or_package(filename)]
111507
def find_all(name, opts={})
      # opts ||= {}
      all = [@packages.select {|x| x.name.to_s == name.to_s },
      find_all_by_provides(name, opts)].flatten.compact
      filter(all, opts)
    end
80446
def show_deps(self):
        

        pkgs = pkg_resources.Environment()

        for pkg in pkgs[self.project_name]:
            if not self.version:
                print(pkg.project_name, pkg.version)

            i = len(pkg._dep_map.values()[0])
            if i:
                while i:
                    if not self.version or self.version and \
                            pkg.version == self.version:
                        if self.version and i == len(pkg._dep_map.values()[0]):
                            print(pkg.project_name, pkg.version)
                        print("  " + str(pkg._dep_map.values()[0][i - 1]))
                    i -= 1
            else:
                self.logger.info(\
                    "No dependency information was supplied with the package.")
                return 1
        return 0
77548
function findPackages(packagesPath) {
  return fs.readdirSync(packagesPath).reduce((acc, d) => {
    const fullpath = path.resolve(packagesPath, d);

    if (fs.statSync(fullpath).isDirectory()) {
      try {
        fs.statSync(path.resolve(fullpath, 'package.json'));
        acc.push(fullpath);
      }
      catch (err) {
        if (err.code === 'ENOENT') {
          return acc.concat(findPackages(fullpath));
        }
        throw err;
      }
    }

    return acc;
  }, []);
}
625857
function packageFilter(pkg, root) {
  pkg.main = pkg.glslify || (
    path.extname(pkg.main || '') !== '.js' &&
    pkg.main
  ) || 'index.glsl'

  return pkg
}
674868
def remove_extra_packages(self, packages, dry_run=False):
        

        removal_list = self.determine_extra_packages(packages)
        if not removal_list:
            print("No packages to be removed")
        else:
            if dry_run:
                print("The following packages would be removed:\n    %s\n" %
                      "\n    ".join(removal_list))
            else:
                print("Removing packages\n")
                args = [
                    "pip",
                    "uninstall",
                    "-y",
                ]
                args.extend(list(removal_list))
                subprocess.check_call(args)
991207
def pkg_list(self):
        
        options = [
            "-l",
            "--list"
        ]
        flag = ["--index", "--installed", "--name"]
        name = INDEX = installed = False
        for arg in self.args[2:]:
            if flag[0] == arg:
                INDEX = True
            if flag[1] in arg:
                installed = True
            if flag[2] == arg:
                name = True
            if arg not in flag:
                usage("")
                raise SystemExit()
        if (len(self.args) > 1 and len(self.args) <= 5 and
                self.args[0] in options):
            if self.args[1] in self.meta.repositories:
                PackageManager(binary=None).package_list(self.args[1],
                                                         name,
                                                         INDEX,
                                                         installed)
            else:
                usage(self.args[1])
        else:
            usage("")
765258
def show():
    """"""
    env = get_environment()

    for key, val in sorted(env.env.items(), key=lambda item: item[0]):
        click.secho('%s = %s' % (key, val))
1362275
def matching(self):
        
        for sbo in self.package_not_found:
            for pkg in self.data:
                if sbo in pkg and pkg not in self.blacklist:
                    self.package_found.append(pkg)
9803
def listed(self):
        
        print("\nPackages in the queue:\n")
        for pkg in self.packages():
            if pkg:
                print("{0}{1}{2}".format(self.meta.color["GREEN"], pkg,
                                         self.meta.color["ENDC"]))
                self.quit = True
        if self.quit:
            print("")
1020324
def package_remove(name):
    '''
    
    '''
    DETAILS = _load_state()
    DETAILS['packages'].pop(name)
    _save_state(DETAILS)
    return DETAILS['packages']
1068194
def filter_package_list(package_list):
    
    remote_pkgs = []
    local_pkgs = []

    possible_remotes = filter(lambda i: not os.path.exists(i), package_list)
    juicer.utils.Log.log_debug("Considering %s possible remotes" % len(possible_remotes))

    for item in possible_remotes:
        remote_pkgs.extend(juicer.utils.Remotes.assemble_remotes(item))
    juicer.utils.Log.log_notice("Remote packages: %s" % str(remote_pkgs))

    possible_locals = filter(os.path.exists, package_list)
    possible_locals = filter(is_rpm, possible_locals)
    juicer.utils.Log.log_debug("Considering %s possible locals" % len(possible_locals))

    for item in possible_locals:
        for match in find_pattern(item):
            local_pkgs.append(match)
    juicer.utils.Log.log_notice("Local packages: %s" % str(local_pkgs))

    filtered_package_list = dedupe(remote_pkgs + local_pkgs)
    return filtered_package_list
688417
def package_releases(request, package_name, show_hidden=False):
    
    session = DBSession()
    package = Package.by_name(session, package_name)
    return [rel.version for rel in package.sorted_releases]