04229ae7c14ebdbc043831e5ffe47a561dcdf31c,theanolm/iterators.py,BatchIterator,__len__,#BatchIterator#,113

Before Change


        num_sequences = 0

        while True:
            line = self.input_file.readline()
            if len(line) == 0:
                break
            if type(line) == bytes:
                line = line.decode("utf-8")

After Change


            sequence = self._read_sequence()
            if sequence is None:
                break
            if len(sequence) < 2:
                continue                
            num_sequences += 1

        return (num_sequences + self.batch_size - 1) // self.batch_size
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: senarvi/theanolm
Commit Name: 04229ae7c14ebdbc043831e5ffe47a561dcdf31c
Time: 2015-10-16
Author: seppo.git@marjaniemi.com
File Name: theanolm/iterators.py
Class Name: BatchIterator
Method Name: __len__


Project Name: Calamari-OCR/calamari
Commit Name: e3673091d04ef00cea5d7d8bcac69c0dee40e585
Time: 2021-01-19
Author: wick.chr@gmail.com
File Name: calamari_ocr/utils/multiprocessing.py
Class Name:
Method Name: run


Project Name: deeptools/HiCExplorer
Commit Name: d36053405d5006ecf63e3708552339969a983022
Time: 2019-08-14
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/chicSignificantInteractions.py
Class Name:
Method Name: main