• Stars
    star
    174
  • Rank 219,104 (Top 5 %)
  • Language
    C++
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

(unofficial) tqdm-like single header c++ pretty progress bar

cpptqdm

Python tqdm is nice. Need something similar for C++. That's this.

Simple usage

#include "tqdm.h"

tqdm bar;
for(int i = 0; i < N; i++) {
    bar.progress(i, N);
    // stuff
}
bar.finish();

Looks like

 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–                  | 46.2%  [4200000 | 103.66 kHz | 35s<47s]

See it live

g++ test.cpp -std=c++11 && ./a.out

example

FAQ

Won't this slow down my loops?

If your loops are faster than ~200MHz, then maybe!

Themes?

You bet. set_theme_basic(), set_theme_line(), set_theme_circles().

For fun, what if I wanted to use this in python?

If you have ROOT, you can do the following. Note that due to the fact it uses ROOT to call C++ code in Python, loops faster than 1kHz start to get slowed down by the overhead.

import time
import ROOT as r

r.gROOT.ProcessLine(".L tqdm.h")

bar = r.tqdm()

N = 10000
for i in range(N):
    bar.progress(i,N)
    time.sleep(0.001)

More Repositories

1

niceplots

Single PHP file for indexing plots (images) in a folder. Live searchable, sortable, etc.
PHP
12
star
2

tidfit

small 1D fitter
Python
11
star
3

yahist

1D and 2D histogram objects
Python
10
star
4

matplottery

Histogram plotting with matplotlib
Python
9
star
5

pyfeyn

feynman diagrams with PyROOT
Python
9
star
6

jumpcount

JavaScript
7
star
7

RobinhoodNet

Portable .NET client for the popular Robinhood zero commission trading REST API
C#
5
star
8

pdroot

utilities for working with ROOT files and pandas
Python
3
star
9

lhe2root

Convert LHE to ROOT
Python
2
star
10

notmythesis

This is not my thesis
TeX
2
star
11

pixtegral

Fast* integrator for 1D functions
Python
2
star
12

plottery

A ROOT plotter that makes you feel like a millionaire ("lottery", get it?)
Python
2
star
13

syncfiles

My dotfiles and utility scripts
Python
2
star
14

stats

basic summary of numbers/words on the command line
Python
2
star
15

daskucsd

Jupyter Notebook
1
star
16

dotfiles

1
star
17

statistics

Playground for various statistics stuff
Jupyter Notebook
1
star
18

StopFatJets

Files for fat jet study for stop->lsp+W where W->qq and the qq (and corresponding jj) has small dR when (stop-lsp) mass increases
C++
1
star
19

monitoring

Setup instructions for privately-hosted grafana/elasticsearch monitoring of condor jobs
Python
1
star
20

toyMCboost

Toy MC for merged jets from boosting
C++
1
star
21

condorBabyMaker

Makes and delivers babies using condors instead of storks
C++
1
star
22

ThreadGantt.jl

Gantt plots for inspecting threaded work in Julia
Julia
1
star
23

covid19

Jupyter Notebook
1
star
24

WZ

Files used for WZ project
C++
1
star
25

fourtop

Looking for four top
C++
1
star
26

redis-htcondor

redis+htcondor to analyze nanoaod with uproot
Jupyter Notebook
1
star