<commit_before>desc 'Copy database config, git assets, views, widget assets'
task :app_helpers => [ 'app_helpers:db', 'app_helpers:git', 'app_helpers:views', 'app_helpers:widgets' ]

namespace :plugins do
  desc 'Adds plugins defined in config/plugins.rb'
  task :install => 'app_helpers:git:plugins:install'
  
  desc 'Updates plugins defined in config/plugins.rb'
  task :update  => 'app_helpers:git:plugins:update'
  
  desc 'Removes plugins defined in config/plugins.rb'
  task :remove  => 'app_helpers:git:plugins:remove'
end

namespace :app_helpers do
  
  desc 'Removes files created by rake app_helpers'
  task :remove => [ 'app_helpers:db:remove', 'app_helpers:git:remove', 'app_helpers:views:remove', 'app_helpers:widgets:remove' ]
    
  def app_helper_resource(type, to, reverse=false, overwrite=true)
    from = "#{File.dirname(__FILE__)}/../resources/#{type}"
    from, to = to, from if reverse
    puts "=> Removing old #{type}..."
    puts to
    return if File.exists?(to) && !overwrite
    if File.directory?(from)
      FileUtils.remove_dir(to, true) if File.exists?(to)
      FileUtils.mkdir_p to
    else
      File.unlink(to) if File.exists?(to)
    end
    puts "=> Copying #{type}..."
    (File.directory?(from) ? Dir["#{from}/*"] : [from]).each do |f|
      if File.directory? f
        FileUtils.mkdir_p "#{to}/#{File.basename(f)}"
        FileUtils.cp_r f, to
      else
        FileUtils.cp f, to
      end
    end if File.exists?(from)
  end
  
end
<commit_msg>Adding app_helpers:git:plugins:remove to app_helpers:remove task<commit_after>desc 'Copy database config, git assets, views, widget assets'
task :app_helpers => [ 'app_helpers:db', 'app_helpers:git', 'app_helpers:views', 'app_helpers:widgets' ]

namespace :plugins do
  desc 'Adds plugins defined in config/plugins.rb'
  task :install => 'app_helpers:git:plugins:install'
  
  desc 'Updates plugins defined in config/plugins.rb'
  task :update  => 'app_helpers:git:plugins:update'
  
  desc 'Removes plugins defined in config/plugins.rb'
  task :remove  => 'app_helpers:git:plugins:remove'
end

namespace :app_helpers do
  
  desc 'Removes files created by rake app_helpers'
  task :remove => [ 'app_helpers:db:remove', 'app_helpers:git:remove', 'app_helpers:git:plugins:remove', 'app_helpers:views:remove', 'app_helpers:widgets:remove' ]
    
  def app_helper_resource(type, to, reverse=false, overwrite=true)
    from = "#{File.dirname(__FILE__)}/../resources/#{type}"
    from, to = to, from if reverse
    puts "=> Removing old #{type}..."
    puts to
    return if File.exists?(to) && !overwrite
    if File.directory?(from)
      FileUtils.remove_dir(to, true) if File.exists?(to)
      FileUtils.mkdir_p to
    else
      File.unlink(to) if File.exists?(to)
    end
    puts "=> Copying #{type}..."
    (File.directory?(from) ? Dir["#{from}/*"] : [from]).each do |f|
      if File.directory? f
        FileUtils.mkdir_p "#{to}/#{File.basename(f)}"
        FileUtils.cp_r f, to
      else
        FileUtils.cp f, to
      end
    end if File.exists?(from)
  end
  
end

{'fraction_non_alphanumeric': 0.14094616639477978, 'fraction_numerical': 0.0, 'mean_word_length': 3.7461300309597525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '5593974', 'n_tokens_mistral': 1023, 'n_tokens_neox': 1064, 'n_words': 253}