Giter VIP home page Giter VIP logo

ruby-progressbar's Introduction

Ruby/ProgressBar


The ultimate text progress bar library for Ruby! It'll SMASH YOU OVER THE HEAD with a PURE RUSH of progress bar excitement!

Don't miss out on what all the kids are talking about! If you want everyone to know that your gem or app can survive in the cage then YOU WANT RUBY-PROGRESSBAR!


It's Better Than The Other 186,312 Progress Bar Libraries Because

Basic Usage

Creation

It's simple to get started:

progressbar = ProgressBar.create

Creates a basic progress bar beginning at 0, a maximum capacity of 100 and tells it to start.

Progress: |                                                                       |

Marking Progress

Every call to #increment will advance the bar by 1. Therefore:

50.times { progressbar.increment }

Would output an advancing line which would end up here:

Progress: |===================================                                    |

Animation

Basic Usage Marking Progress

Full Reference

There's gotten to be too much awesome to pack into one page. Visit the wiki for the full documentation.

Issues

If you have problems, please create a Github issue.

Credits

The Kompanee

ruby-progressbar is maintained by The Kompanee, Ltd.

The names and logos for The Kompanee are trademarks of The Kompanee, Ltd.

License

ruby-progressbar 1.0 is Copyright ยฉ 2011-2021 The Kompanee. It is free software, and may be redistributed under the terms specified in the LICENSE file. ruby-progressbar 0.9.0 is Copyright ยฉ 2008 Satoru Takabayashi

ruby-progressbar's People

Contributors

amarshall avatar apepper avatar bensomers avatar bjmfactory avatar c-lliope avatar cgriego avatar cgunther avatar darthsim avatar ddnexus avatar devwout avatar dgmstuart avatar dmytrostepaniuk avatar flori avatar hron avatar igrep avatar jfelchner avatar jim avatar l2g avatar luk4s avatar marcandre avatar marcotc avatar minad avatar nex3 avatar olivierlacan avatar orien avatar simi avatar timgaleckas avatar toy avatar vlmonk avatar zole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruby-progressbar's Issues

ProgressBar displays nothing

I seriously doubt there's a problem with this gem. It's almost certainly user error on my part, since I'm new to Ruby. But what I'm doing seems so simple that I can't imagine what's going wrong.

Here's my code:

require 'ruby-progressbar'
bar = ProgressBar.create
50.times { bar.increment }

My Gemfile has gem 'ruby-progressbar' in it, and I did run bundle install in my app's root directory. When I run bundle list I see that I have ruby-progressbar (1.5.1) installed.

When I run that code above, nothing shows up in my terminal. I'm running Mac OSX 10.9.x, which doesn't seem like it should be an issue. If I include a puts statement in that code above, I see that in the terminal, so I know the file is running, but the ProgressBar shows squat.

Is there something obvious I'm doing wrong?

Progress bar always repeats itself when finished.

I've got a fairly simple block:

io = ProgressiveIO.new(data) do |pos|
    pbar.progress = pos
end

When I'm done processing data, the bar throws a newline and then repeats itself, so I end up getting something like this for a single data object:

Progress: |====================================================================|
Progress: |====================================================================|

I'm working on code that uploads multiple chunks of IO to S3, so I'd like to see a single progress bar displayed - is that possible? Could an option be added not to display the bar again after completion?

Progress bar defaults to 80 character length when ran through Spring on Rails

I've been working on improving the ProgressReporter on minitest-reporters, and I recently switched it from using PowerBar to ruby-progressbar. This fixed a performance issue and enabled a few other improvements, but I noticed an issue minitest-reporters/minitest-reporters#106.

As I mentioned in the issue I read through LengthCalculator but my knowledge of how terminals work isn't deep enough to understand why this is happening or if there's a fix, and if that fix should be on ruby-progressbar or not. Thoughts?

better non-tty output

Great gem! The non-tty case is pretty common for us. Would it be possible to hack in better support for non-tty progress bars?

Ideally, a non-tty progress bar would have a simple format and just append to output instead of rewriting the line every time. It would also be nice to start by printing the empty bar to give a sense of scale...

For example:

Progress        |                                       |
Progress        |=========

We're using the following monkeypatch for nicer non-tty support. Might be worth adding this to the gem:

class ProgressBar
  class Base
    private

    alias :update_old :update

    NO_TTY_FMT = "%t |%b"

    def update(options = {})
      if output.tty?
        update_old(options)
        return
      end

      if !defined?(@last_update)
        # init
        @last_update = 0
        @current_length = 79
        fmt = NO_TTY_FMT.gsub("%b", "%B")
        output.puts "#{to_s(fmt)}|"
      end

      # !tty behavior
      @throttle.choke(stopped?) do
        s = to_s(NO_TTY_FMT)
        output.write s[@last_update..-1]
        output.write "|\n" if stopped?
        output.flush
        @last_update = s.length
      end
    end
  end
end

Progress bar should not automatically finish, there should be an option :autofinish

I want to have a progress bar always at the bottom of the screen but want to update the total multiple times since I have separate tasks which are unknown before. As soon as a progressbar is #finished, starting it again starts a new progress bar.

For restarting I have to do something like this:

    def progress_start(total)
      @progress.progress = 0
      @progress.total = total + 1 # +1 to avoid the automatic finishing :(
      @progress.start
    end

Enumerable

It would be great to mix ruby-progressbar into Enumerable. @toy's gem has a nicely designed mixin:

https://github.com/toy/progress/blob/master/lib/progress/with_progress.rb

I saw in an earlier issue that you were (rightly) worried about threading, pollution, etc. Those are all valid concerns, but this feature is incredibly useful. Perhaps it could be optional?

Possible format:

1.upto(1000).pb.each { ... }
1.upto(1000).pb(title: "factoring").map { ... }

We've adapted @toy's mixin for use with ruby-progressbar. We use it on Enumerable and Moped::Cursor. Let me know if you want to take a look.

license question

Hi, you distribute gem under MIT license, but original gem had ruby license (ruby or gpl2). Was it properly relicensed, i.e. was it sanctioned by Satoru Takabayashi? I want to package it for Debian and it 's very strict in such questions.

Bug with format %P

When I try to use %P in format: '%t %a |%b%P%%%i|%f' on the end of process, when 100.00%, get error:

Elapsed Time: 00:00:34 |==================100.00%|Time: 00:00:34
rake aborted!
FloatDomainError: NaN
ruby-progressbar/components/progressable.rb:84:in `floor'
ruby-progressbar/components/progressable.rb:84:in `percentage_completed_with_precision'
ruby-progressbar/formatter.rb:49:in `percentage_with_precision'
ruby-progressbar/format/base.rb:16:in `block in process'
ruby-progressbar/format/base.rb:15:in `each'
ruby-progressbar/format/base.rb:15:in `process'
ruby-progressbar/formatter.rb:16:in `format'
ruby-progressbar/base.rb:137:in `to_s'
ruby-progressbar/base.rb:188:in `block in update'
ruby-progressbar/components/throttle.rb:12:in `choke'
ruby-progressbar/base.rb:186:in `update'
ruby-progressbar/base.rb:177:in `with_update'
ruby-progressbar/base.rb:29:in `start'
ruby-progressbar/base.rb:20:in `initialize'
ruby-progressbar.rb:10:in `new'
ruby-progressbar.rb:10:in `create'
...............................

Multiple progress bars not supported

When I try and create two progress bars, they are rendered on top of each other. They should be rendered separately somehow, so that there is a finer breakdown of progress.

Feature Implemented: Change format after some time.

Rationale

Users generally don't care about too many details if an operation is fast, but they will care if it's taking long than a few seconds.

Interface

Added options to create:

:after_elapsed_format # string
:after_elapsed        # time in seconds

Behavior

Shows :after_elapsed_format instead of :format after :after_elapsed seconds have passed.

:after_elapsed_format defaults to :format plus ETA %e at the end.

:after_elapsed defaults to 4 seconds; set to :nil to always show :format instead.

warnings running rspec --format Fuubar

Make a new rails 4.1.4 app
Change Gemfile to:

source 'https://rubygems.org'
ruby '2.1.2'

gem 'rails', '4.1.4'
gem 'sqlite3'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc

group :development, :test do
  gem 'fuubar', '~> 2.0.0.rc'
  gem 'rspec-rails', "3.0.2"
end

bundle
rails generate rspec:install
rspec --format Fuubar

/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar.rb:10: warning: `*' interpreted as argument prefix
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/length_calculator.rb:42: warning: assigned but unused variable - rows
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/estimated_timer.rb:69: warning: `*' interpreted as argument prefix
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/rate.rb:52: warning: `*' interpreted as argument prefix
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/base.rb:145: warning: private attribute?
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/base.rb:145: warning: private attribute?
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/base.rb:152: warning: method redefined; discarding old last_update_length
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/formatter.rb:33: warning: instance variable @format_string not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb:32: warning: instance variable @stopped_at not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb:32: warning: instance variable @stopped_at not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/length_calculator.rb:12: warning: instance variable @current_length not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/formatter.rb:33: warning: instance variable @format_string not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb:32: warning: instance variable @stopped_at not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb:32: warning: instance variable @stopped_at not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/length_calculator.rb:12: warning: instance variable @current_length not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb:32: warning: instance variable @stopped_at not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb:28: warning: instance variable @started_at not initialized
/home/rp/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb:32: warning: instance variable @stopped_at not initialized

Playback crashes on progress bar display

Trying to play a remote YouTube video. It plays for a second or so and then crashes when updating the progress bar:

/Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/components/bar.rb:33:in `*': negative argument (ArgumentError)            | 0%
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/components/bar.rb:33:in `empty_string'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/formatter.rb:82:in `incomplete_space'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/format/base.rb:26:in `block in process'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/format/base.rb:25:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/format/base.rb:25:in `process'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/formatter.rb:15:in `format'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/base.rb:112:in `to_s'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/base.rb:160:in `block in update'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/components/throttle.rb:12:in `choke'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/base.rb:154:in `update'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/base.rb:148:in `with_update'
    from /Library/Ruby/Gems/2.0.0/gems/ruby-progressbar-1.1.1/lib/progress_bar/base.rb:95:in `title='
    from /Library/Ruby/Gems/2.0.0/gems/airstream-0.4.7/bin/airstream:101:in `<top (required)>'
    from /usr/bin/airstream:23:in `load'
    from /usr/bin/airstream:23:in `<main>'

I'm on OSX 10.9.4, ruby 2.0.0p451. Video URL was retrieved using youtube-dl -g.

Breaks when printing to console

Sometimes its useful to print to the console during a script's output. Could be to inform the user of various smaller steps that occur, or other similar actions.

There was another progress bar library i once tried that had a terrible syntax, but had a #log method, which allowed you to print lines. On each line, the progress bar would be erased, the line printed, and the progress bar would be drawn upon the next line.

To the end user, you get a terminal where there is a bar at the bottom (or lowest portion, anyway) of the window, with a log of events above it

Using Estimated Timer in the Bar Format with Unknown Progress Raises Exception

Due to the fact that the timers are trying to calculate the time remaining when the total of the bar is nil, it's raising an exception:

/Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/components/estimated_timer.rb:53:in `*': nil can't be coerced into Float (TypeError)
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/components/estimated_timer.rb:53:in `estimated_seconds_remaining'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/components/estimated_timer.rb:37:in `estimated_time'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/components/estimated_timer.rb:30:in `to_s'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/format/base.rb:16:in `block in process'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/format/base.rb:15:in `each'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/format/base.rb:15:in `process'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/formatter.rb:16:in `format'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/base.rb:132:in `to_s'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/base.rb:176:in `block in update'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/components/throttle.rb:12:in `choke'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/base.rb:174:in `update'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/base.rb:163:in `with_update'
        from /Users/jfelchner/Repo/ruby-progressbar/lib/ruby-progressbar/base.rb:42:in `increment'
        from test.rb:6:in `block in <main>'
        from test.rb:5:in `times'
        from test.rb:5:in `<main>'

negative argument

Hi,

When the terminal window is resized to something small the negative argument error is thrown.

This has been reported to us by a few of our users and I was also able to reproduce - wpscanteam/wpscan#185

Thanks,
Ryan

multiple outputs

I get the following output. Not sure why. Other progressbar works fine, just this one seems to messed up

> tc.rb
Country Loading ======================== 100% Time: 00:00:00
Country Loading ======================== 100% Time: 00:00:00
Country Loading ======================== 100% Time: 00:00:00
Country Loading ======================== 100% Time: 00:00:00
Country Loading ======================== 100% Time: 00:00:00
Country Loading ======================== 100% Time: 00:00:00
Country Loading ======================== 100% Time: 00:00:00
Country Loading ======================== 100% Time: 00:00:00

for this code

#!/usr/bin/env ruby19
# encoding: UTF-8"

require 'ruby-progressbar'

begin

  pbar = ProgressBar.create(
      :title        => "Country Loading",
      :starting_at  => 0,
      :total        => 249,
      :length       => 60,
      :format       => '%t %B %p%% %E' )

  CSV.parse( DATA, :col_sep        => ';',
                   :headers        => true,
                   :return_headers => false 
            ).each do |line|

    pbar.increment
    countries.insert( :alpha2         => line["alpha2"].upcase,
                      :alpha3         => line["alpha3"].upcase,
                      :lower_country  => line["name"].downcase,
                      :country_name   => line["full_name"],
                      :fname          => line["img_fname"].strip )

   end

rescue => e
  p e.message
  puts "backtrace:\n" + e.backtrace.join( "\n  " ) + "\n"
  exit 1

end

exit 0

# alpha2, alpha3, name, img_fname
__END__
alpha2;alpha3;name;full_name;img_fname
XZ;UNO;Global;Global;UNNA0001.GIF
XB;XAB;Northern Hemisphere;Northern Hemisphere;UNNA0001.GIF
XC;XAC;Southern Hemisphere;Southern Hemisphere;UNNA0001.GIF
XD;XAD;Selected Countries;Selected Countries;UNNA0001.GIF
XE;XAE;Selected Global;Selected Global;UNNA0001.GIF
XF;XAF;African Countries;African Countries;OAUN0001.GIF
AD;AND;Andorra;Principality of Andorra;ANDR0001.GIF
... # listing 249 entries

adding a debug to print each line, it looks like the last few entries it puts out a new progress bar

...
VN,VNM,Vietnam,Socialist Republic of Vietnam,VIET0001.GIF
VU,VUT,Vanuatu,Republic of Vanuatu,VANT0001.GIF
Country Loading ======================== 100% Time: 00:00:00
WF,WLF,Wallis and Futuna,Territory of the Wallis and Futuna Islands,WAFU0001.GIF
Country Loading ======================== 100% Time: 00:00:00
WS,WSM,Samoa,Independent State of Samoa,SAMO0001.GIF
Country Loading ======================== 100% Time: 00:00:00
YE,YEM,Yemen,Republic of Yemen,YEMN0001.GIF
Country Loading ======================== 100% Time: 00:00:00
YT,MYT,Mayotte,Department of Mayotte,FRAN0001.GIF
Country Loading ======================== 100% Time: 00:00:00
ZA,ZAF,South Africa,Republic of South Africa,SOAF0001.GIF
Country Loading ======================== 100% Time: 00:00:00
ZM,ZMB,Zambia,Republic of Zambia,ZAMB0001.GIF
Country Loading ======================== 100% Time: 00:00:00
ZW,ZWE,Zimbabwe,Republic of Zimbabwe,ZBWE0001.GIF
Country Loading ======================== 100% Time: 00:00:00

redirect stdout

What about adding something like this, instead of only providing the log method?

class ProgressOut
  def initialize(progress); @progress = progress end
  def flush; end
  def write(s)
    s = s.rstrip
    @progress.log(s) unless s.empty?
  end
end

def method_with_progress
     progress = ProgressBar.create
      $stdout = ProgressOut.new(progress)
      method
ensure
      $stdout = STDOUT
end

Install problem on Ubuntu LTS 12.04

$ sudo gem install ruby-progressbar
[sudo] password for nluna:
Fetching: ruby-progressbar-1.0.2.gem (100%)
Successfully installed ruby-progressbar-1.0.2
1 gem installed
Installing ri documentation for ruby-progressbar-1.0.2...

unrecognized option `--charset = UTF-8'

For help on options, try 'rdoc --help'

ERROR: While generating documentation for ruby-progressbar-1.0.2
... MESSAGE: exit
... RDOC args: --ri --op /var/lib/gems/1.8/doc/ruby-progressbar-1.0.2/ri --charset = UTF-8 lib README.md LICENSE --title ruby-progressbar-1.0.2 Documentation --quiet

I think it is supposed to be "--charset UTF-8" (no equal sign). Also you need quotes around "ruby-progressbar-1.0.2 Documentation".

Output on Heroku

Hey there,

I'm trying to get the progress bar to show up in the Heroku logs. Heroku uses STDOUT for logging so I would think it would work. Any ideas why it might not?

Thank you!

negative argument in version 1.1.0

Hi,

Seems that there is another negative argument error in the bar.rb file on line 29 in version 1.1.0.

It is much harder to trigger than the original, requires quite a bit or repeated resizing of the window.

 [ERROR] negative argument       
Trace :
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/components/bar.rb:29:in *'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/components/bar.rb:29:in standard_complete_string'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/components/bar.rb:18:in to_s'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/formatter.rb:77:in complete_bar'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/format/base.rb:26:in block in process'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/format/base.rb:25:in each'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/format/base.rb:25:in process'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/formatter.rb:15:in format'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/base.rb:112:in to_s'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/base.rb:160:in block in update'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/components/throttle.rb:12:in choke'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/base.rb:154:in update'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/base.rb:148:in with_update'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ruby-progressbar-1.1.0/lib/progress_bar/base.rb:48:in progress='
/Users/ryan/Tools/wpscan/lib/common/models/wp_user/brute_forcable.rb:34:in block (2 levels) in brute_force'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/request/callbacks.rb:99:in call'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/request/callbacks.rb:99:in block in execute_callbacks'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/request/callbacks.rb:98:in map'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/request/callbacks.rb:98:in execute_callbacks'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/request/operations.rb:35:in finish'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/easy_factory.rb:75:in block in set_callback'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ethon-0.5.10/lib/ethon/easy/response_callbacks.rb:43:in call'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ethon-0.5.10/lib/ethon/easy/response_callbacks.rb:43:in block in complete'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ethon-0.5.10/lib/ethon/easy/response_callbacks.rb:43:in map'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ethon-0.5.10/lib/ethon/easy/response_callbacks.rb:43:in complete'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ethon-0.5.10/lib/ethon/multi/operations.rb:147:in check'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ethon-0.5.10/lib/ethon/multi/operations.rb:159:in run'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/ethon-0.5.10/lib/ethon/multi/operations.rb:42:in perform'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/hydra/runnable.rb:21:in run'
/Users/ryan/.rvm/gems/ruby-1.9.3-p392/gems/typhoeus-0.6.2/lib/typhoeus/hydra/memoizable.rb:50:in run'
/Users/ryan/Tools/wpscan/lib/common/models/wp_user/brute_forcable.rb:49:in block in brute_force'
/Users/ryan/Tools/wpscan/lib/common/models/wp_user/brute_forcable.rb:30:in each'
/Users/ryan/Tools/wpscan/lib/common/models/wp_user/brute_forcable.rb:30:in brute_force'
/Users/ryan/Tools/wpscan/lib/common/collections/wp_users/brute_forcable.rb:18:in block in brute_force'
/Users/ryan/Tools/wpscan/lib/common/collections/wp_users/brute_forcable.rb:18:in each'
/Users/ryan/Tools/wpscan/lib/common/collections/wp_users/brute_forcable.rb:18:in brute_force'
$ gem list | grep progress
ruby-progressbar (1.1.0)

Related: #42

Version 1.7.4

Hi there,

Could you push the new version of the ruby-progressbar to rubygems?

Cheers.

Flush and/or redraw on non-tty output?

I would love to use the ruby-progressbar output in a jenkins job. As it stands now, that output is not customizable for non-tty, so this is a multi-part request.

  1. allow non-tty customization (ok if it is a different config var)
  2. allow for output 'redraw' on a new line on progress step
    • I imagine this looking something like:

      |=                   |
      |==                  |
      |===                 |
      

Use awesome Unicode characters, if available, for prettier progress...

Stolen shamelessly from RVC

  if ENV['LANG'] =~ /UTF/ and RUBY_VERSION >= '1.9.1'
    PROGRESS_BAR_LEFT = "\u2772"
    PROGRESS_BAR_MIDDLE = "\u25AC"
    PROGRESS_BAR_RIGHT = "\u2773"
  else
    PROGRESS_BAR_LEFT = "["
    PROGRESS_BAR_MIDDLE = "="
    PROGRESS_BAR_RIGHT = "]"
  end

This produces a much prettier progress bar and end-cap in Unicode locales, and it would be awesome for progressbar to automatically do the same.

ETA & smoothing bugs

Hello,

The following code refuses to display an ETA:

N = 200000
p = ProgressBar.create(total: N, format: "%a |%B| %c/%C (%P%%)%f", smoothing: 1)
N.times do
  sleep(0.0001)
  p.increment
end

The problem is that this bug induces the following bug when you are forced to use smoothing: the ETA takes forever to reach it's "correct" value when the first items were processed very quickly. Here is a demo:

N = 200000
p = ProgressBar.create(total: N, format: "%a |%B| %c/%C (%P%%)%f")
N.times do
  sleep(0.01) if i > 20000
  p.increment
end

I guess in that case I should use the :starting_at option, but given #66 it seems I'm stuck no matter what. Any quick monkey patching to at least repair the smoothing: 1 bug? I don't mind jumping values in ETA.

:starting_at should be taken into account by ETA

If you have a process of n items that take 1 sec each to complete and you start a progress bar, you will have a pretty accurate ETA right from the beginning of the process and it will decrease quite consistently with the time used by the process.

Now imagine you start the same process, but you skip the first half of items: you set the right :starting_at but the ETA will not take into account that you started at 50%, so you will have a very low ETA at the beginning, because it considers that it processed half the items in the very short time passed. Then the ETA will constantly increase during the process, because the average will be longer and longer.

The ETA should keep into account that the total time elapsed did not included the skipped items. That way it will be accurate since the beginning, and will display the right ETA.

Progress bar is reprinted every time I use progress=

I am trying to update the progress during a download:

progressbar = ProgressBar.create(title: 'File', length: 100, format: "%t: |%B| %P%%")
Net::SCP.download!(HOST, USER, path, "#{destination}/#{filename.split('/').last}", recursive: recursive) do |_, name, sent, total|
    progressbar.progress = sent.fdiv(total) * 100
  end

Every time the progress is updated (which seems like several times per second, not sure on exact value) the bar is completely reprinted. My console is just being flooded with progress bars. The %P formatter seems to be working, it's just the bar spam that is the issue. What am I doing wrong?

This is using Terminal on Mac OS 10.9.3.

HTML5 output?

This would be a lot simpler than the CLI variant, as you could just use <progress />. None the less, I have code already set up using Ruby-Progressbar, so a much more minimal change in the code would be nice to make it friendly to browsers would be nice. ๐Ÿ˜„

Get console width from curses

It can be done with following patch:
diff -r f7a41c02d896 timetable_converter/lib/progressbar.rb
--- a/timetable_converter/lib/progressbar.rb Fri May 08 09:57:42 2009 +0200
+++ b/timetable_converter/lib/progressbar.rb Mon May 11 10:28:01 2009 +0200
@@ -131,20 +131,8 @@
end

 def get_width
  • FIXME: I don't know how portable it is.

  • default_width = 80
  • begin
  •  tiocgwinsz = 0x5413
    
  •  data = [0, 0, 0, 0].pack("SSSS")
    
  •  if @out.ioctl(tiocgwinsz, data) >= 0 then
    
  •    rows, cols, xpixels, ypixels = data.unpack("SSSS")
    
  •    if cols >= 0 then cols else default_width end
    
  •  else
    
  •    default_width
    
  •  end
    
  • rescue Exception
  •  default_width
    
  • end
  • require 'curses'
  • Curses.init_screen.maxx
    end

def show

Cannot load ruby progressbar

When I install ruby-progressbar 1.5.0 on centos, the permission for ruby-progressbar.rb file in lib directory is for root user only (-rw-------). As the result, I get "cannot load such file -- ruby-progressbar" error when trying to run as non-root user.

Issue w/ruby-progressbar after using ocra

I built a script that uses this gem (v1.0.1) and I really like it. It's a lot easier and more customizable than others. That being said, I'm having some issues with it after building an executable with ocra. If I just run the script via the interpreter in a regular shell, it runs fine. However, if I create an executable with ocra and then run it, it appears that every time progress is incremented as in "pbar.progress += 2", it prints a new line to the screen rather than just incrementing the bar. A small example is shown below:

Gathering Dynamic HSI Information - Time: 00:00:00 |>> | 0%
Gathering Dynamic HSI Information - Time: 00:00:01 |>> | 0%
Gathering Dynamic HSI Information - Time: 00:00:03 |>> | 1%
Gathering Dynamic HSI Information - Time: 00:00:06 |>> | 1%
Gathering Dynamic HSI Information - Time: 00:00:08 |>> | 2%
Gathering Dynamic HSI Information - Time: 00:00:09 |>> | 2%
Gathering Dynamic HSI Information - Time: 00:00:11 |>> | 3%
Gathering Dynamic HSI Information - Time: 00:00:19 |>> | 4%
Gathering Dynamic HSI Information - Time: 00:00:21 |>> | 4%
Gathering Dynamic HSI Information - Time: 00:00:23 |=>> | 5%
Gathering Dynamic HSI Information - Time: 00:00:25 |=>> | 5%
Gathering Dynamic HSI Information - Time: 00:00:27 |=>> | 6%
Gathering Dynamic HSI Information - Time: 00:00:29 |=>> | 7%

This is how I'm using it:

pbardyn = ProgressBar.create(:title => "Gathering Dynamic HSI Information -", 
:format => '%t %a |%b>>%i| %p%', :smoothing => 1.0, :total => 335)
    until pbardyn.progress > 329
       ['xxx', 'yyy', 'zzz'].each {|cmd|
       t.cmd "#{cmd}"
       sleep 0.5
       pbardyn.progress += 2 }
    end
pbardyn.finish

Also, i'm using the following:

ruby 1.9.3p194 (2012-04-20) [i386-mingw32]

Is there someway I can modify my usage to avoid this or is this an issue with the gem?

One more bug with format %P

When I use %P in format and in progress sets property :total=nil, get error:

TypeError: nil can't be coerced into Float
ruby-progressbar/components/progressable.rb:84:in `/'
ruby-progressbar/components/progressable.rb:84:in `percentage_completed_with_precision'
ruby-progressbar/formatter.rb:49:in `percentage_with_precision'
ruby-progressbar/format/base.rb:16:in `block in process'
ruby-progressbar/format/base.rb:15:in `each'
ruby-progressbar/format/base.rb:15:in `process'
ruby-progressbar/formatter.rb:16:in `format'
ruby-progressbar/base.rb:137:in `to_s'
ruby-progressbar/base.rb:188:in `block in update'
ruby-progressbar/components/throttle.rb:12:in `choke'
ruby-progressbar/base.rb:186:in `update'
ruby-progressbar/base.rb:131:in `log'

Version 1.7.4 not on Rubygems

I have new builds failing today because another package (rails_best_practices) is referencing ruby-progessbar v1.7.4, but it isn't available on Rubygems.

Can the new versions from today be released to Rubygems?

Problem with file permissions in v1.1.0

When starting rails console after upgrading to version 1.1.0, I get the following error:

Sapphire:wos Will$ rails c
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- ruby-progressbar (LoadError)

This is because the file permissions on ruby-progressbar.rb prevent anyone but the file owner (root in my case) from reading the file:

Sapphire:wos Will$ ls -lh /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ruby-progressbar-1.1.0/lib/
total 16
drwxr-xr-x  13 root  wheel   442B Jun  8 11:45 progress_bar
-rw-------   1 root  wheel   816B Jun  8 11:45 progressbar.rb
-rw-------   1 root  wheel   577B Jun  8 11:45 ruby-progressbar.rb

By contrast, in version 1.0.2, the files are readable by anyone. BTW all other gems on my system are installed with similar file permissions - all files are readable.

Sapphire:wos Will$ ls -lh /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ruby-progressbar-1.0.2/lib/
total 16
drwxr-xr-x  13 root  wheel   442B Jun  8 02:02 progress_bar
-rw-r--r--   1 root  wheel   816B Jun  8 02:02 progressbar.rb
-rw-r--r--   1 root  wheel   577B Jun  8 02:02 ruby-progressbar.rb

Ruby Gems stuck on 1.7.1

I am using Rubocop and getting a bundle error on travis:

$ bundle install --jobs=3 --retry=3 --deployment
Fetching source index from https://rubygems.org/
Could not find ruby-progressbar-1.7.4 in any of the sources

Looked at my Gemfile.lock and found:

    rubocop (0.29.1)
      astrolabe (~> 1.3)
      parser (>= 2.2.0.1, < 3.0)
      powerpack (~> 0.1)
      rainbow (>= 1.99.1, < 3.0)
      ruby-progressbar (~> 1.4)
    ruby-progressbar (1.7.4)

And when I go to rubygems:
https://rubygems.org/gems/ruby-progressbar
Looks like the version is stuck at 1.7.1

I can of course lock my version of the gem within my Gemfile to fix the issue. Just wanted to report the issue.

New line spam on Windows

When using the progressbar library on Windows, instead of updating the progress bar in place it generates a new line for every update.

Failed items

Is there any way to mark failed items? I think it will useful features. For example something like progressbar.increment_fail or just progressbar.fail and this will produce output:

|======*=====*=====|

So I may see how many elements during progress are failed.

Don't rely on git ls-files in gemspec file

I have been building a Debian package of ruby-progressbar (for Kali Linux) and the source package is built on top of the .tar.gz archive (such as those that can be downloaded in the "releases" section of github, aka "git archive" output) and those archives do not contain any ".git" directory. Thus "git ls-files" doesn't work and should be avoided in the gemspec file.

Worse than that, the version of rubygems in use here seems to not understand that this is an external call and not a plain list because the error message I get is weird:

Invalid gemspec in [ruby-progressbar.gemspec]: No such file or directory - git ls-files

Test failure with ruby-progressbar 1.0.1

Using ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux] I'm getting the following two test failures with ruby-progressbar 1.0.1:

Failures:

  1) ProgressBar::Time#now when Time is being mocked by Timecop retrieves the unmocked Timecop time
     Failure/Error: subject { ProgressBar::Time.now ::TimeMockedWithTimecop }
       (<TimeMockedWithTimecop (class)>).now(no args)
           expected: 0 times
           received: 1 time
     # ./lib/progress_bar/time.rb:6:in `send'
     # ./lib/progress_bar/time.rb:6:in `old_now'
     # ./spec/../spec/support/timecop.rb:16:in `now'
     # ./spec/progress_bar/time_spec.rb:20
     # ./spec/progress_bar/time_spec.rb:26

  2) ProgressBar::Time#now when Time is being mocked by Delorean retrieves the unmocked Delorean time
     Failure/Error: subject { ProgressBar::Time.now ::TimeMockedWithDelorean }
       (<TimeMockedWithDelorean (class)>).now(no args)
           expected: 0 times
           received: 1 time
     # ./lib/progress_bar/time.rb:6:in `send'
     # ./lib/progress_bar/time.rb:6:in `old_now'
     # ./spec/../spec/support/timecop.rb:16:in `now'
     # ./spec/progress_bar/time_spec.rb:31
     # ./spec/progress_bar/time_spec.rb:37

Finished in 0.82176 seconds
102 examples, 2 failures

Prefix Percentage with Spaces To Pad Single and Double-Digit Values

Would be great to have a flag for percentage which zero-pads the numbers when in single and double figures so that anything to the right of it isn't pushed out.

Currently:

0% | ------------------ | 
12% | ----------------- | 
100%  | --------------- | 

Ideal:

  0% | ------------------ | 
 12% | ------------------ | 
100% | ------------------ | 

The same could also work for total items and completed items.

Abysmally Slow Performance

I've been using the pre-1.0 versions of this gem for a few months now, and have been completely satisfied with. However, I recently upgraded to v1.0.1 only to discover that the new progress bar is prohibitively slow with the default settings compared to the previous versions.

After profiling a simple loop reading over a 1000 line file,

result = RubyProf.profile do
   pbar = ProgressBar.new("Parsing File", 1000, STDOUT)
    File.open('test.txt') do |f|
      f.each do |line|
        pbar.inc
       end
     end
   end

printer = RubyProf::GraphHtmlPrinter.new(result)
printer.print(File.open('test.html', 'w'), :min_percent=>0)  

I found that v1.0.1 performed 29.46 times slower. Of course this includes the deprecations warnings, but the profiling shows that those contributions are minimal at best.

A quick glance through the profiling results (https://gist.github.com/3693262 - I only had the results as html, you can download the raw contents to view them in a browser) shows that the 1.0 version repeatedly has to recalculate the terminal width. I don't have the time to figure out how to best fix this. Maybe it's a simple as a configuration variable? I tried explicitly setting the length of the progress bar to 80 and did recover some performance, but it was still multiple times slower than the pre-1.0 versions.

Anyway, I hope this can be fixed. For the moment, I will have to revert back, because parsing a 100k+ line file is now unnecessarily slow.

Zlib::BufError when using ruby-progressbar gem

I use the following Ruby snippet to download a 8.9MB file.

require 'open-uri'
require 'net/http'
require 'uri'

def http_download(uri, filename)
  uri.open(read_timeout: 500) do |file|
    open filename, 'w' do |io|
      file.each_line do |line|
        io.write line
      end
    end
  end
end

I want to add the ruby-progressbar gem to visualize the download process:

require 'open-uri'
require 'ruby-progressbar'
require 'net/http'
require 'uri'

def http_download_with_ruby_progressbar(uri, filename)
  progressbar = nil
  uri.open(
    read_timeout: 500,
    content_length_proc: lambda { |total|
      if total && 0 < total.to_i
        progressbar = ProgressBar.create(title: filename, total: total)
      end
      },
      progress_proc: lambda { |step|
        progressbar.progress = step if progressbar
      }
  ) do |file|
    open filename, 'w' do |io|
      file.each_line do |line|
        io.write line
      end
    end
  end
end

However, it now fails with the following error:

/home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/response.rb:357:in `finish': 
buffer error (Zlib::BufError)oooooo  |   8.0MB   8.6MB/s ETA:   0:00:00

    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/response.rb:357:in `finish'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/response.rb:262:in `ensure in inflater'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/response.rb:262:in `inflater'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/response.rb:274:in `read_body_0'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/response.rb:201:in `read_body'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:328:in `block (2 levels) in open_http'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1415:in `block (2 levels) in transport_request'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/response.rb:162:in `reading_body'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1414:in `block in transport_request'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1405:in `catch'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1405:in `transport_request'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1378:in `request'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:319:in `block in open_http'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:853:in `start'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:313:in `open_http'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:724:in `buffer_open'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:210:in `block in open_loop'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:208:in `catch'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:208:in `open_loop'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:149:in `open_uri'
    from /home/user/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:704:in `open'

Feature Request: output throttling

We're dealing with large amounts of very simple operations, which take comparable amount of time to the progress bar printing - the same order of magnitude. So we don't want to print after every operation but say just 10 times a second. At the moment we achieve this by counting operations ourselves and doing

progressbar = ProgressBar.create(:total => ops.count)
counter = 0
ops.each { |op|
  op.perform
  counter += 1
  throttle { progressbar.progress = counter }
}
# we'll probably miss the last operation due to throttling
progressbar.finish unless progressbar.finished?

where throttle is a method that only yields if the time since the last yield is no less than set delay (e.g. 0.1 sec). This works alright, but feels clumsy as progressbar already has a counter. Could output throttling be added to the library, so we could do:

progressbar = ProgressBar.create(:throttle_period => 0.1, :total => ops.count)
ops.each { |op|
  op.perform
  progressbar.increment # only outputs no faster than 10 times a second
}
# don't have to manually finish either

I can just port our throttling helper to ProgressBar if you're ok with the proposal.

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.