c50ffb52761973c43aa78e876cd9159fd75f0b56,jarbas/core/management/commands/loaddatasets.py,Command,handle,#Command#,55

Before Change


        if options.get("drop", False):
            self.drop_documents()

        documents = self.selected_documents(options["start"], options["limit"])
        Document.objects.bulk_create(Document(**doc) for doc in documents)
        print("Now we have {:,} document".format(Document.objects.count()))

    def serialize(self, document):
        Read the dict generated by DictReader and fix content types

After Change


        if options.get("drop", False):
            self.drop_documents()

        source = options["source"]
        datasets = self.load_local(source) if source else self.load_remote()
        documents = self.documents_from(datasets)
        self.bulk_create_by(documents, options["batch_size"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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


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


Project Name: polyaxon/polyaxon
Commit Name: 6403b085745ab7443eacc0887f7958f07af2acd9
Time: 2019-08-02
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/tasks/experiments.py
Class Name:
Method Name: experiments_set_metrics