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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c25b698ed31f57b979486148135a2dc154db9a692e11b7bfeaa22602bf856f58 |
|
MD5 | ff78a467f1a2170e75b64d2522e1442f |
|
BLAKE2b-256 | 34d3ca4d730abc586a8537258dadc9a64990cba63a55b29f559fb613c3d342f8 |
Close
Hashes for ThreadedFileLoader-1.0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcb9b81ca81de416bcfca571d7dc434fdb252a569dbccce958baeda01c11bedc |
|
MD5 | 5d7d719f061d415cf7abfb70f44d1358 |
|
BLAKE2b-256 | 87c559bfd5cba270f60239c2c6c6111e27a02e03f9f3a66946be31d26e57231d |