e39f75d7fd34b3da79068e2936849a16fdfced06,jarbas/core/management/commands/loaddatasets.py,Command,documents,#Command#,28

Before Change


    def documents(self):
        Load datasets and return a dict similar to model Document
        suffixes = ("current-year", "last-year", "previous-years")
        for url in map(self.get_url, suffixes):
            print("Loading " + url)
            with NamedTemporaryFile() as tmp:
                urlretrieve(url, filename=tmp.name)

After Change


                    for index, row in enumerate(csv.DictReader(file_handler)):
                        row["source"] = suffix
                        row["line"] = index + 1
                        yield row

    def selected_documents(self, start, limit):
        documents = map(self.serialize, self.documents())
        for count, document in enumerate(documents):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: okfn-brasil/serenata-de-amor
Commit Name: e39f75d7fd34b3da79068e2936849a16fdfced06
Time: 2016-09-06
Author: cuducos@gmail.com
File Name: jarbas/core/management/commands/loaddatasets.py
Class Name: Command
Method Name: documents


Project Name: etal/cnvkit
Commit Name: 52796475005cb8828c73dfbb97ba9820667c9d41
Time: 2016-08-28
Author: eric.talevich@gmail.com
File Name: cnvlib/coverage.py
Class Name:
Method Name: interval_coverages_pileup


Project Name: RaRe-Technologies/gensim
Commit Name: 1aa7e115fcf87b443373c14b7b2f3dd2e3383584
Time: 2011-02-19
Author: radimrehurek@seznam.cz
File Name: src/gensim/corpora/lowcorpus.py
Class Name: LowCorpus
Method Name: __iter__