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 chunks(l, n): | |
| """ Yield successive n-sized chunks from l. | |
| http://stackoverflow.com/a/312464/1572077 | |
| """ | |
| for i in xrange(0, len(l), n): | |
| yield l[i:i+n] |
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
| import threading | |
| from queue import Queue | |
| class AsyncThread(threading.Thread): | |
| """ | |
| Based off of ssynchronous downloading script pull from stackoverflow | |
| http://stackoverflow.com/questions/18883964/asynchronous-file-downloads-in-python | |
| """ | |
| def __init__(self, queue, func): |
NewerOlder