Returns dependencies which are dependent on NAR files (i.e. contain
NarInfo)
972636
public final List<NarArtifact> getNarArtifacts() throws MojoExecutionException {
    final List<NarArtifact> narDependencies = new LinkedList<>();

    FilterArtifacts filter = new FilterArtifacts();

    filter.addFilter(new GroupIdFilter(cleanToBeTokenizedString(this.includeGroupIds),
        cleanToBeTokenizedString(this.excludeGroupIds)));

    filter.addFilter(new ArtifactIdFilter(cleanToBeTokenizedString(this.includeArtifactIds),
        cleanToBeTokenizedString(this.excludeArtifactIds)));

    filter.addFilter(getArtifactScopeFilter());

    @SuppressWarnings("unchecked")
    Set<Artifact> artifacts = getMavenProject().getArtifacts();

    // perform filtering
    try {
      artifacts = filter.filter(artifacts);
    } catch (ArtifactFilterException e) {
      throw new MojoExecutionException(e.getMessage(), e);
    }

    for (final Object element : artifacts) {
      final Artifact dependency = (Artifact) element;

      if ("nar".equalsIgnoreCase(dependency.getType())) {
        getLog().debug("Examining artifact for NarInfo: " + dependency);

        final NarInfo narInfo = getNarInfo(dependency);
        if (narInfo != null) {
          getLog().debug("    - added as NarDependency");
          narDependencies.add(new NarArtifact(dependency, narInfo));
        }
      }
    }
    getLog().debug("Dependencies contained " + narDependencies.size() + " NAR artifacts.");
    return narDependencies;
  }
479985
def dependencies(self, tkn: str) -> Set[str]:
        
        return set(self.dependency_list(tkn))
619667
function getDirectRequires(p) {
      return p.dependencies.filter(function(d) {
        return DIRECT_REQUIRES_REG.test(d);
      }).map(function(d) {
        return "require('"+ getDependencyPath(d, p) +"');";
      }).join('\n');
    }
522351
def check_dependencies():
    
    available = []
    try:
        shell('ebook-convert')
        available.append('calibre')
    except OSError:
        pass
    try:
        shell('pandoc --help')
        available.append('pandoc')
    except OSError:
        pass
    if not available:
        sys.exit(error('No generator found, you cannot use md2ebook.'))
    check_dependency_epubcheck()
    return available
982916
def get_dependencies(self, filename):
        
        if self.is_partial(filename):
            return self.templates
        elif self.is_template(filename):
            return [self.get_template(filename)]
        elif self.is_static(filename):
            return [filename]
        else:
            return []
9802
function getDependencies(component, Prism) {
    // Cast require to an Array
    const deps = [].concat(component.require || []);

    if (Prism) {
        return deps.filter(
            dep =>
                // Remove dependencies that are already loaded
                !Prism.languages[dep]
        );
    }
    return deps;
}
1030001
function getLockfileDependencies(root) {
  var deps = {};
  if (root.name && root.version) {
    deps[root.name + "@" + root.version] = {
      "pm": "npm",
      "name": root.name,
      "version": root.version
    };
  }

  if (root.dependencies) {
    for (var name in root.dependencies) {
      var dep = root.dependencies[name];
      if (dep.version) {
        deps[name + "@" + dep.version] = {
          "pm": "npm",
          "name": name,
          "version": dep.version
        };
      }

      var childDeps = getLockfileDependencies(root.dependencies[name]);
      for (var attr in childDeps) {
        deps[attr] = childDeps[attr];
      }
    }
  }

  return Object.keys(deps).map(function (k) { return deps[k];});
}
984196
function getInverseDependencies(resolutionResponse) {
  const cache = new Map();

  resolutionResponse.dependencies.forEach(module => {
    resolveModuleRequires(resolutionResponse, module).forEach(dependency => {
      getModuleDependents(cache, dependency).add(module);
    });
  });

  return cache;
}
1133532
def node_dependencies(context: Context):
    
    args = ['--loglevel', {0: 'silent', 1: 'warn', 2: 'info'}[context.verbosity]]
    if not context.use_colour:
        args.append('--color false')
    args.append('install')
    return context.shell('npm', *args)
572981
def check_dependency(self, dependency_path):
        """"""
        stored_hash = self._stamp_file_hashes.get(dependency_path)

        # This file was newly added, or we don't have a file
        # with stored hashes yet. Assume out of date.
        if not stored_hash:
            return False

        return stored_hash == _sha1_for_file(dependency_path)
30752
private static List<DependencyError> checkAlwaysForbiddenSection(final Dependencies dependencies, final ClassInfo classInfo) {

        final List<DependencyError> errors = new ArrayList<DependencyError>();

        final Iterator<String> importedPackages = classInfo.getImports().iterator();
        while (importedPackages.hasNext()) {
            final String importedPackage = importedPackages.next();
            final NotDependsOn ndo = Utils.findForbiddenByName(dependencies.getAlwaysForbidden(), importedPackage);
            if (ndo != null) {
                errors.add(new DependencyError(classInfo.getName(), importedPackage, ndo.getComment()));
            }
        }

        return errors;
    }
373344
def get_dependencies():
    """"""

    dependencies = []

    # Numpy
    dep_attrs = {
        "name": "numpy",
        "min_version": "1.1.0",
        "description": "required",
    }
    try:
        import numpy
        dep_attrs["version"] = numpy.version.version
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # wxPython
    dep_attrs = {
        "name": "wxPython",
        "min_version": "2.8.10.1",
        "description": "required",
    }
    try:
        import wx
        dep_attrs["version"] = wx.version()
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # Matplotlib
    dep_attrs = {
        "name": "matplotlib",
        "min_version": "1.1.1",
        "description": "required",
    }
    try:
        import matplotlib
        dep_attrs["version"] = matplotlib._version.get_versions()["version"]
    except ImportError:
        dep_attrs["version"] = None
    except AttributeError:
        # May happen in old matplotlib versions
        dep_attrs["version"] = matplotlib.__version__

    dependencies.append(dep_attrs)

    # Pycairo
    dep_attrs = {
        "name": "pycairo",
        "min_version": "1.8.8",
        "description": "required",
    }
    try:
        import cairo
        dep_attrs["version"] = cairo.version
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # Python GnuPG
    dep_attrs = {
        "name": "python-gnupg",
        "min_version": "0.3.0",
        "description": "for opening own files without approval",
    }
    try:
        import gnupg
        dep_attrs["version"] = gnupg.__version__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # xlrd
    dep_attrs = {
        "name": "xlrd",
        "min_version": "0.9.2",
        "description": "for loading Excel files",
    }
    try:
        import xlrd
        dep_attrs["version"] = xlrd.__VERSION__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # xlwt
    dep_attrs = {
        "name": "xlwt",
        "min_version": "0.7.2",
        "description": "for saving Excel files",
    }
    try:
        import xlwt
        dep_attrs["version"] = xlwt.__VERSION__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # Jedi
    dep_attrs = {
        "name": "jedi",
        "min_version": "0.8.0",
        "description": "for tab completion and context help in the entry line",
    }
    try:
        import jedi
        dep_attrs["version"] = jedi.__version__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # pyrsvg
    dep_attrs = {
        "name": "pyrsvg",
        "min_version": "2.32",
        "description": "for displaying SVG files in cells",
    }
    try:
        import rsvg
        dep_attrs["version"] = True
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # pyenchant
    dep_attrs = {
        "name": "pyenchant",
        "min_version": "1.6.6",
        "description": "for spell checking",
    }
    try:
        import enchant
        dep_attrs["version"] = enchant.__version__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    return dependencies
485358
function getDependencis(file, moduleId) {
    var res = [];

    if (!fs.existsSync(file)) {
        return res;
    }

    var codeAST = amd.getAst(fs.readFileSync(file));
    var info = amd.analyseModule(codeAST);

    var dependencies = info.actualDependencies || [];

    return dependencies.slice(info.factoryAst.params.length).map(function (id) {
        return amd.resolveModuleId(id, moduleId);
    });
}
154237
function getServerDependencies() {
    var grunt = require('grunt');
    var pkg = grunt.file.readJSON('package.json');
    var directDependencies = Object.keys(pkg.dependencies);
    var dependencies = {};
    var clientRegExp = /norman.*client/;
    directDependencies.forEach(function (dependency) {
        // ignore client packages
        if (clientRegExp.test(dependency)) return;
        grunt.log.debug('Found server module ' + dependency);
        dependencies[dependency + '/**/*'] = 1;

        var depPkg = grunt.file.readJSON('node_modules/' + dependency + '/package.json');

        // add peer dependencies if any
        if (depPkg.peerDependencies) {
            Object.keys(depPkg.peerDependencies).forEach(function (peer) {
                grunt.log.debug('Found server module ' + peer);
                dependencies[peer + '/**/*'] = 1;
            });
        }

        // add dependencies if needed
        if (depPkg.dependencies) {
            Object.keys(depPkg.dependencies).forEach(function (dep) {
                grunt.log.debug('Found server module ' + dep);
                dependencies[dep + '/**/*'] = 1;
            });
        }
    });
    return Object.keys(dependencies);
}
13639
def package_depends_on(self, name_a, name_b):
        
        assert self._context
        if self._dependency_lookup is None:
            self._dependency_graph = self._context.get_dependency_graph()
            self._dependency_lookup = accessibility(self._dependency_graph)

        downstream = self._dependency_lookup.get(name_a, [])
        accessible = (name_b in downstream)
        if accessible:
            neighbours = self._dependency_graph.neighbors(name_a)
            return 2 if name_b in neighbours else 1
        else:
            return 0
1261536
def needs(self):
        """"""
        result = []
        for dep in self.dependencies:
            module = dep.split(".")[0].lower()
            if module not in result:
                result.append(module)

        return result
642328
def dependencies( scopes = nil)
      if scopes
        unless scopes.is_a? Array
           scopes = [scopes]
        end
      end
          
      if Naether.platform == 'java'
        if scopes.nil?
          deps = @project.getDependenciesNotation()
        else
          deps = @project.getDependenciesNotation( scopes )
        end
        
      elsif scopes
        list = Naether::Java.convert_to_java_list( scopes )

        deps = @project._invoke('getDependenciesNotation', 'Ljava.util.List;', list)
      else
        deps = @project.getDependenciesNotation()
      end

      
      Naether::Java.convert_to_ruby_array( deps, true )
    end