Coder Social home page Coder Social logo

tqdm_elixir's Introduction

Build Status Coverage Status Inline docs Hex.pm package version Hex.pm package license

Tqdm

Tqdm easily adds a CLI progress bar to any enumerable.

tqdm

A (partial) port of Python's tqdm to Elixir. Thanks noamraph and all other contributors for the original library!

Just wrap Lists, Maps, Streams, or anything else that implements Enumerable with Tqdm.tqdm:

for _ <- Tqdm.tqdm(1..1000) do
  :timer.sleep(10)
end

# or

1..1000
|> Tqdm.tqdm()
|> Enum.map(fn _ -> :timer.sleep(10) end)

# or even...

1..1000
|> Stream.map(fn _ -> :timer.sleep(10) end)
|> Tqdm.tqdm(total: 1000)
|> Stream.run()

# |###-------| 392/1000 39.0% [elapsed: 00:00:04.627479 left: 00:00:07, 84.71 iters/sec]

Full documentation can be found here.

Installation

  1. Add tqdm to your list of dependencies in mix.exs:
    def deps do
      [{:tqdm, "~> 0.0.2"}]
    end
  1. Ensure tqdm is added to your list of applications:
    def application do
      [applications: [:tqdm]]
    end

tqdm_elixir's People

Contributors

ericentin avatar thiagopromano avatar visciang avatar

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.