<commit_before>module NearestTimeZone
  class Dump

    def self.dump
      data_folder = "../../../data"
      
      File.open(File.expand_path("#{data_folder}/cities.dump", __FILE__),"w") do |f|
        f.write Marshal.dump(City.all)
      end

      File.open(File.expand_path("#{data_folder}/time_zones.dump", __FILE__),"w") do |f|
        f.write Marshal.dump(TimeZone.all)
      end

      File.open(File.expand_path("#{data_folder}/kdtree.dump", __FILE__),"w") do |f|
        City.kdtree.persist(f)
      end
    end

  end
end<commit_msg>Fix issue with saving binary data correctly <commit_after>module NearestTimeZone
  class Dump

    def self.dump
      data_folder = "../../../data"
      
      File.open(File.expand_path("#{data_folder}/cities.dump", __FILE__),"wb") do |f|
        f.write Marshal.dump(City.all)
      end

      File.open(File.expand_path("#{data_folder}/time_zones.dump", __FILE__),"wb") do |f|
        f.write Marshal.dump(TimeZone.all)
      end

      File.open(File.expand_path("#{data_folder}/kdtree.dump", __FILE__),"wb") do |f|
        City.kdtree.persist(f)
      end
    end

  end
end
{'fraction_non_alphanumeric': 0.15425531914893617, 'fraction_numerical': 0.0, 'mean_word_length': 2.6655844155844157, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2948952', 'n_tokens_mistral': 405, 'n_tokens_neox': 398, 'n_words': 68}