<commit_before>#!/usr/bin/env ruby

require "rubygems"
require 'net/http'
require 'open-uri' 
require "zip/zip"
require 'yaml'
require 'fileutils'
require 'open-uri'
require "buildr"
gem 'hpricot', '>= 0.6'

current_script = Dir.pwd + "/#{$0}"
script_folder = File.dirname(current_script)

load "#{script_folder}/../build/dependencies.rb"
load "#{script_folder}/../build/repositories.rb"

original_dir = Dir.pwd

config = YAML::load( File.open( "#{script_folder}/config.yml" ) )

def find_apache_mirror
  begin
    doc = Hpricot(open("http://www.apache.org/dyn/closer.cgi"))
    doc.search("//div[@='section-content']//strong")[0].inner_html
  rescue SocketError
    puts "WARNING: Cannot find a valid apache mirror" 
    return ""
  end<commit_msg>typo in gem require<commit_after>#!/usr/bin/env ruby

require "rubygems"
gem 'hpricot', '>= 0.6'

require 'net/http'
require 'open-uri' 
require "zip/zip"
require 'yaml'
require 'fileutils'
require 'open-uri'
require "buildr"
require "hpricot"

current_script = Dir.pwd + "/#{$0}"
script_folder = File.dirname(current_script)

load "#{script_folder}/../build/dependencies.rb"
load "#{script_folder}/../build/repositories.rb"

original_dir = Dir.pwd

config = YAML::load( File.open( "#{script_folder}/config.yml" ) )

def find_apache_mirror
  begin
    doc = Hpricot(open("http://www.apache.org/dyn/closer.cgi"))
    doc.search("//div[@='section-content']//strong")[0].inner_html
  rescue SocketError
    puts "WARNING: Cannot find a valid apache mirror" 
    return ""
  end
{'fraction_non_alphanumeric': 0.16940249507550886, 'fraction_numerical': 0.005252790544977019, 'mean_word_length': 4.541818181818182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7122391', 'n_tokens_mistral': 570, 'n_tokens_neox': 544, 'n_words': 114}