No project description provided
Project description
Threaded File Loader
Multithreaded Python package for faster file loading in machine learning.
Installation
pip install ThreadedFileLoader
Usage:
Loading Image Files:
from ThreadedFileLoader.ThreadedFileLoader import *
instance = ThreadedImageLoader("path_to_/*.jpg")
instance.start_loading()
images = instance.loaded_objects
Loading Text Files:
from ThreadedFileLoader.ThreadedFileLoader import *
instance = ThreadedTextLoader("path_to_/*.txt")
instance.start_loading()
images = instance.loaded_objects
Loading Custom File Formats
Threaded FileLoader can load different file types.
This examples shows how the ThreadedTextLoader
class
overloads the ThreadedFileLoader
class to load text files.
from ThreadedFileLoader.ThreadedFileLoader import *
class ThreadedTextLoader(ThreadedFileLoader):
def object_loader(self, path):
with open(path) as afile:
data = afile.readlines()
return data
instance = ThreadedTextLoader("path_to_/*.txt")
instance.start_loading()
texts = instance.loaded_objects
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ThreadedFileLoader-1.0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3123eff98e595a25d4604f17ea246a2312e11089e2dff9b4962364800ebba1b7 |
|
MD5 | 1738a14a94efd4c2b0ef16b276c98db2 |
|
BLAKE2b-256 | 199e60b34ef202d5234501f40cc93671111e069ca87db893bfdf7deb4a68f530 |
Close
Hashes for ThreadedFileLoader-1.0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 786d3e4214d798a3bade0a9dcbe7b307457cf5eb79f8536c83539a0d6ca5a8fa |
|
MD5 | 1277d7c6ea47b80d57f3f8e29459c588 |
|
BLAKE2b-256 | 0e000dad313c37b8abfae3f17499db632a77633dee4a6a924752461c7e254439 |