Created
February 13, 2020 07:20
-
-
Save gaiar/51875bdc7f7e70ed22e5d99833bf8b3d to your computer and use it in GitHub Desktop.
Full version here: https://gist.github.com/gaiar/9cac5c741ff3c8bafe79dfa275456709
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_batch(self,bs=5): | |
bsize = bs if self.Q.qsize() > bs else self.Q.qsize() | |
if self.more() or not self.stopped: | |
frames = [] | |
for i in range(bsize): | |
frames.append(self.Q.get()) | |
return frames | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment