1ea07c3d761ffadb60aef09d6c6887dc09f8952d,pliers/extractors/api.py,ClarifaiAPIExtractor,_extract,#ClarifaiAPIExtractor#,154

Before Change


        // ExitStack lets us use several file context managers simultaneous
        with ExitStack() as stack:
            files = [stack.enter_context(s.get_filename()) for s in stims]
            fps = [stack.enter_context(open(f, "rb")) for f in files]
            tags = self.tagger.tag_images(fps, select_classes=self.select_classes)

        extracted = []

After Change


        extracted = []
        for i, res in enumerate(tags["outputs"]):
            data = res["data"]["concepts"]
            concepts = []
            values = []
            for d in data:
                concepts.append(d["name"])
                values.append(d["value"])
            extracted.append(ExtractorResult([values], stims[i],
                             self, features=concepts))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tyarkoni/pliers
Commit Name: 1ea07c3d761ffadb60aef09d6c6887dc09f8952d
Time: 2017-06-26
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api.py
Class Name: ClarifaiAPIExtractor
Method Name: _extract


Project Name: Pinafore/qb
Commit Name: f617c357258a6c7f403a5c044355782c7077fc52
Time: 2018-04-06
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/vw.py
Class Name: VWGuesser
Method Name: train


Project Name: xinntao/BasicSR
Commit Name: 23a45d5eb839c763c94c0e413ad599d9f9b5e184
Time: 2018-09-06
Author: wxt1994@126.com
File Name: codes/scripts/create_lmdb.py
Class Name:
Method Name: