GithubHelp home page GithubHelp logo

niedakh / pqdm Goto Github PK

View Code? Open in Web Editor NEW
257.0 257.0 8.0 88 KB

Comfortable parallel TQDM using concurrent.futures

Home Page: https://pqdm.readthedocs.io/en/latest/

License: MIT License

Makefile 16.71% Python 83.29%
concurrent-futures parallel-computing progress-bar python tqdm

pqdm's Introduction

Parallel TQDM

image

Documentation Status

Updates

PQDM is a TQDM and concurrent futures wrapper to allow enjoyable paralellization of iterating through an Iterable with a progress bar.

Install & Use

To install :

pip install pqdm

and use :

from pqdm.processes import pqdm
# If you want threads instead:
# from pqdm.threads import pqdm

args = [1, 2, 3, 4, 5]
# args = range(1,6) would also work

def square(a):
    return a*a

result = pqdm(args, square, n_jobs=2)

For more examples variants check the Usage section of the docs.

Features

  • parellize your tqdm runs using processes or threads thanks to concurrent.futures,
  • just import pqdm from pqdm.threads or pqdm.processes to start,
  • automatic usage of tqdm.notebook when iPython/Jupyter notebook environment detected, custom tqdm class accepted
  • automatic parsing of pqdm kwargs and separating between concurrent.Executor args and tqdm args,
  • support for any iterable and passing items as kwargs, args or directly to function which is being applied
  • support bounded exectutors via https://github.com/mowshon/bounded_pool_executor

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.