d733b902552295be41b1f88c8343b5e7b4ff8a9b,TTS/speaker_encoder/dataset.py,MyDataset,__parse_items,#MyDataset#,53

Before Change


        
        speakers = list({item[-1] for item in self.items})
        self.speaker_to_utters = {}
        self.speakers = []
        for speaker in speakers:
            speaker_utters = [item[1] for item in self.items if item[2] == speaker]
            if len(speaker_utters) < self.num_utter_per_speaker and self.skip_speakers:
                print(

After Change


    def __parse_items(self):
        self.speaker_to_utters = {}
        for i in self.items:
            path_ = i[1]
            speaker_ = i[2]
            if speaker_ in self.speaker_to_utters.keys():
                self.speaker_to_utters[speaker_].append(path_)
            else:
                self.speaker_to_utters[speaker_] = [path_, ]

            if self.skip_speakers:
                self.speaker_to_utters = {k: v for (k, v) in self.speaker_to_utters.items() if
                                          len(v) >= self.num_utter_per_speaker}

            self.speakers = [k for (k, v) in self.speaker_to_utters]

    // def __parse_items(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

Instances


Project Name: mozilla/TTS
Commit Name: d733b902552295be41b1f88c8343b5e7b4ff8a9b
Time: 2020-09-16
Author: nicolas.mueller@aisec.fraunhofer.de
File Name: TTS/speaker_encoder/dataset.py
Class Name: MyDataset
Method Name: __parse_items


Project Name: sentinel-hub/eo-learn
Commit Name: c43c84a6373d198635d76549ba699cef4027f3ab
Time: 2020-02-04
Author: jovan.visnjic@sinergise.com
File Name: io/eolearn/io/processing_api.py
Class Name: SentinelHubInputTask
Method Name: __init__


Project Name: NeuroTechX/moabb
Commit Name: 8d66949a4703a04df75e8ab836c9eb22c26ecc09
Time: 2018-04-03
Author: alexandre.barachant@gmail.com
File Name: moabb/datasets/bnci.py
Class Name:
Method Name: _load_data_001_2014


Project Name: mozilla/TTS
Commit Name: d733b902552295be41b1f88c8343b5e7b4ff8a9b
Time: 2020-09-16
Author: nicolas.mueller@aisec.fraunhofer.de
File Name: TTS/speaker_encoder/dataset.py
Class Name: MyDataset
Method Name: __parse_items


Project Name: sympy/sympy
Commit Name: 491635f0fc00102c6729b704b30f64d1f271be23
Time: 2020-07-13
Author: milan.cs16@iitp.ac.in
File Name: sympy/solvers/ode/ode.py
Class Name:
Method Name: constant_renumber


Project Name: pytorch/pytorch
Commit Name: 249c21346208b682d128e28fe4480262f8b76cd8
Time: 2021-02-27
Author: benjamin.lefaudeux@gmail.com
File Name: torch/distributed/optim/zero_redundancy_optimizer.py
Class Name: ZeroRedundancyOptimizer
Method Name: state_dict