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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78bca7385a1e14d5188e71f926a436f327346abc5b746a1bdde196acbfcde256 |
|
MD5 | 7b399141687693055537978895bcc9e5 |
|
BLAKE2b-256 | 444c13a63eb4ee87e330db834af8b35b317817bebef1b9719ffb6b35d33f82c8 |
Close
Hashes for ThreadedFileLoader-1.0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64d38ad4f908cb2615e99cd6aa6435ae2d978e98ec02cd13a3d35c1e790bd094 |
|
MD5 | 0aa5c14e29b7afe57e5290d851805679 |
|
BLAKE2b-256 | 662ef0687c8ca43102170100c0efaa4d3d0a98a3364352d7ca03db11de3a95c7 |