Giter Site home page Giter Site logo

progressmeter.jl's Introduction

ProgressMeter.jl

Progress meter for long-running operations in Julia

Installation

Within julia, execute

Pkg.add("ProgressMeter")

Usage

This works for functions that process things in loops. Here's a demonstration of how to use it:

using ProgressMeter

function my_long_running_function(filenames::Array)
    n = length(filenames)
    p = Progress(n, 1)   # minumum update interval: 1 second
    for f in filenames
        # Here's where you do all the hard, slow work
        next!(p)
    end
end

You should see a green status line that indicates progress during this computation, including ETA and final duration.

If your computation runs so quickly that it never needs to show progress, no extraneous output will be displayed.

Optionally, a description string can be specified which will be prepended to the output, and a progress meter M characters long can be shown. E.g.

p = Progress(n, 1, "Computing initial pass...", 50)

will yield

Computing initial pass...53%|###########################                       |  ETA: 0:09:02

in a manner similar to python-progressbar.

progressmeter.jl's People

Contributors

abahm avatar burrowsa avatar quinnj avatar timholy avatar

Watchers

 avatar  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.