Get the classes that support parsing a given artifact.
557721
def GetClassesByArtifact(cls, artifact_name):
    """"""
    return [
        cls.classes[c]
        for c in cls.classes
        if artifact_name in cls.classes[c].supported_artifacts
    ]
709215
def _getSuitableClasses(self, data):
        """"""
        classes = None
        if data[EI.CLASS] == ELFCLASS.BITS_32:
            if data[EI.DATA] == ELFDATA.LSB:
                classes = LSB_32
            elif data[EI.DATA] == ELFDATA.MSB:
                classes = MSB_32

        elif data[EI.CLASS] == ELFCLASS.BITS_64:
            if data[EI.DATA] == ELFDATA.LSB:
                classes = LSB_64
            elif data[EI.DATA] == ELFDATA.MSB:
                classes = MSB_64

        return classes
31281
def get_suitable_vis_classes(obj):
    """"""

    ret = []
    for class_ in classes_vis():
        if isinstance(obj, class_.input_classes):
            ret.append(class_)
    return ret
890799
def get_classes(self):
        
        instances = self._get_instances(ast.ClassDef)
        instances = [
            PyClass(instance, self.package)
            for instance in instances
        ]
        return instances
410085
def _get_parsers(self, name):
        

        parserlist = BaseParser.__subclasses__()
        forced = name is None

        if isinstance(name, (six.text_type, six.binary_type)):
            parserlist = [p for p in parserlist if p.__name__ == name]
            if not parserlist:
                raise ValueError("could not find parser: {}".format(name))

        elif name is not None:
            raise TypeError("parser must be {types} or None, not {actual}".format(
                types=" or ".join([six.text_type.__name__, six.binary_type.__name__]),
                actual=type(parser).__name__,
            ))

        return not forced, parserlist
1113998
def get_classes(self):
        
        for idx, digest in enumerate(self.analyzed_vms):
            dx = self.analyzed_vms[digest]
            for vm in dx.vms:
                filename = self.analyzed_digest[digest]
                yield idx, filename, digest, vm.get_classes()
1308018
def _iter_lexerclasses(plugins=True):
    """"""
    for key in sorted(LEXERS):
        module_name, name = LEXERS[key][:2]
        if name not in _lexer_cache:
            _load_lexers(module_name)
        yield _lexer_cache[name]
    if plugins:
        for lexer in find_plugin_lexers():
            yield lexer
131135
def classes(self):
        """"""
        defclass = lib.EnvGetNextDefclass(self._env, ffi.NULL)

        while defclass != ffi.NULL:
            yield Class(self._env, defclass)

            defclass = lib.EnvGetNextDefclass(self._env, defclass)
979601
def classes(self) -> Iterator[str]:
        """"""
        yield from (
            c[:-6]
            for c in self.path_map.keys() if c.endswith('.class')
        )
406245
def getCollectionClass(cls, name) :
        """'"""
        try :
            return cls.collectionClasses[name]
        except KeyError :
            raise KeyError( "There is no Collection Class of type: '%s'; currently supported values: [%s]" % (name, ', '.join(getCollectionClasses().keys())) )
441736
def get_backend_class():
    """"""
    # this will (intentionally) blow up if the setting does not exist
    assert hasattr(settings, 'INBOUND_EMAIL_PARSER')
    assert getattr(settings, 'INBOUND_EMAIL_PARSER') is not None

    package, klass = settings.INBOUND_EMAIL_PARSER.rsplit('.', 1)
    module = import_module(package)
    return getattr(module, klass)
221693
def GetArtifactParserDependencies(rdf_artifact):
  
  deps = set()
  processors = parser.Parser.GetClassesByArtifact(rdf_artifact.name)
  for p in processors:
    deps.update(p.knowledgebase_dependencies)
  return deps
835575
def parse(artifacts:, queries:)
      raise ArgumentError, 'Error: Must have artifacts' if artifacts.nil?
      raise ArgumentError, 'Error: Must have queries' unless queries.is_a?(Array)

      # Example
      # [
      #   {
      #     node_index: 0,
      #     path: "/tmp/circle-artifacts.NHQxLku/cherry-pie.png",
      #     pretty_path: "$CIRCLE_ARTIFACTS/cherry-pie.png",
      #     url: "https://circleci.com/gh/circleci/mongofinil/22/artifacts/0/tmp/circle-artifacts.NHQxLku/cherry-pie.png"
      #   },
      #   {
      #     node_index: 0,
      #     path: "/tmp/circle-artifacts.NHQxLku/rhubarb-pie.png",
      #     pretty_path: "$CIRCLE_ARTIFACTS/rhubarb-pie.png",
      #     url: "https://circleci.com/gh/circleci/mongofinil/22/artifacts/0/tmp/circle-artifacts.NHQxLku/rhubarb-pie.png"
      #   }
      # ]

      results = ResultSet.new

      artifacts.body.each do |artifact|
        url = artifact['url']
        if url.nil?
          STDERR.puts "Warning: No URL found on #{artifact}"
          next
        end

        query = queries.find { |q| url.include?(q.url_substring) }
        next if query.nil?
        result = Result.new(query: query, url: url)
        results.add_result(result)
      end

      results
    end
1182804
def sphinx_class(self):
        """"""
        classdoc = ':class:`{cls} <{pref}.{cls}>`'.format(
            cls=self.instance_class.__name__,
            pref=self.instance_class.__module__,
        )
        return classdoc
929234
def get_model_classes(self):
        
        self._import_plugins()
        return [plugin.model for plugin in self.plugins.values()]
210789
protected ClassLoader getClassLoader(Set<Artifact> artifacts) throws Exception {
        Set<URL> classpathURLs = new LinkedHashSet<URL>();

        addCustomClasspaths(classpathURLs, true);

        // add ourselves to top of classpath
        URL mainClasses = new File(project.getBuild().getOutputDirectory()).toURI().toURL();
        getLog().debug("Adding to classpath : " + mainClasses);
        classpathURLs.add(mainClasses);

        for (Artifact artifact : artifacts) {
            File file = artifact.getFile();
            if (file != null) {
                classpathURLs.add(file.toURI().toURL());
            }
        }

        addCustomClasspaths(classpathURLs, false);

        if (logClasspath) {
            getLog().info("Classpath (" + classpathURLs.size() + " entries):");
            for (URL url : classpathURLs) {
                getLog().info("  " + url.getFile().toString());
            }
        }
        return new URLClassLoader(classpathURLs.toArray(new URL[classpathURLs.size()]));
    }
39984
def sphinx_class(self):
        """"""
        classdoc = self.prop.sphinx_class().replace(
            ':class:`', '{info} of :class:`'
        )
        return classdoc.format(info=self.class_info)