Last active
November 26, 2024 17:10
-
-
Save MarioAriasC/599204342860a161d4fe12b12f0d3de9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| # install this gem first | |
| require 'unicode_plot' | |
| require 'json' | |
| hf_json = JSON.parse(File.read(ARGV[0])) | |
| hf_results = hf_json["results"] | |
| hf_barplot_data = {} | |
| hf_results.each do |result| | |
| command = result["command"] | |
| hf_barplot_data[command] = result["mean"] | |
| end | |
| UnicodePlot.barplot(width: 100, data: hf_barplot_data, title: "").render |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment