<commit_before>if File.exists? (shell_proxy_path = File.expand_path("../shell-proxy/lib", __FILE__))
  $:.unshift shell_proxy_path
end
require 'shell-proxy'

UNDERSCORE_VM_VERSION = "0.0.0"

module Plugin
  def self.uuid
    @current_id ||= 0
    @current_id += 1
    :"unique_plugin_method_#{@current_id}"
  end
  module Ruby
  end
end

Dir[File.expand_path("../plugin/*.rb", __FILE__)].each do |f|
  require f
end
Dir[File.expand_path("../plugin/**/*.rb", __FILE__)].each do |f|
  require f
end

class Manager < ShellProxy
  @@plugins = Hash.new { |h, k| h[k] = Array.new }

  def self.add_hook(to, &block)
    uuid = Plugin.uuid
    @@plugins[to] << uuid
    define_method(uuid, &block)
  end

  attr_reader :name
  def initialize(name)
    @name = name
  end

  def build(io = nil)
  __main__(io) do
    def for_all(name, iter, &block)
      __for(bare("${__#{name}_LIST}"), iter, &block)
    end
    build_main
  end
  end

  def build_main
    __function("_#{name}") do
      __case(raw("$1")) do |c|
        c.when("-h|--help") do
          echo raw("usage: _#{name} [version] [opts]")
        end
        c.when("-v|--version") do
          echo raw("_#{name} version #{UNDERSCORE_VM_VERSION}")
        end<commit_msg>Helpers for path fragments<commit_after>if File.exists? (shell_proxy_path = File.expand_path("../shell-proxy/lib", __FILE__))
  $:.unshift shell_proxy_path
end
require 'shell-proxy'

UNDERSCORE_VM_VERSION = "0.0.0"

module Plugin
  def self.uuid
    @current_id ||= 0
    @current_id += 1
    :"unique_plugin_method_#{@current_id}"
  end
  module Ruby
  end
end

Dir[File.expand_path("../plugin/*.rb", __FILE__)].each do |f|
  require f
end
Dir[File.expand_path("../plugin/**/*.rb", __FILE__)].each do |f|
  require f
end

class Manager < ShellProxy
  @@plugins = Hash.new { |h, k| h[k] = Array.new }

  def self.add_hook(to, &block)
    uuid = Plugin.uuid
    @@plugins[to] << uuid
    define_method(uuid, &block)
  end

  def path_fragment
    raw("#{root}/bin")
  end

  def root(type=nil)
    if type == :var
      raw("#{name}_ROOT")
    else
      raw("${#{name}_ROOT}")
    end
  end

  attr_reader :name
  def initialize(name)
    @name = name
  end

  def build(io = nil)
  __main__(io) do
    def for_all(name, iter, &block)
      __for(bare("${__#{name}_LIST}"), iter, &block)
    end
    build_main
  end
  end

  def build_main
    __function("_#{name}") do
      __case(raw("$1")) do |c|
        c.when("-h|--help") do
          echo raw("usage: _#{name} [version] [opts]")
        end
        c.when("-v|--version") do
          echo raw("_#{name} version #{UNDERSCORE_VM_VERSION}")
        end
{'fraction_non_alphanumeric': 0.16280834914611006, 'fraction_numerical': 0.004554079696394687, 'mean_word_length': 2.9226190476190474, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2033874', 'n_tokens_mistral': 992, 'n_tokens_neox': 990, 'n_words': 224}