<commit_before># encoding utf-8

class Carto::StorageOptions::Local
  def initialize(location)
    @location = location
  end

  def upload(path, file)
    filename = Pathname.new(file.path).basename
    target_directory = File.join(Rails.public_path,
                                 'uploads',
                                 @location,
                                 path)

    FileUtils.mkdir_p(target_directory)
    FileUtils.mv(file.path, target_directory)

    identifier = File.join(target_directory, filename)
    url = File.join('http://',<commit_msg>use relative path<commit_after># encoding utf-8

class Carto::StorageOptions::Local
  def initialize(location)
    @location = location
  end

  def upload(path, file)
    filename = Pathname.new(file.path).basename
    target_directory = File.join('public/uploads',
                                 @location,
                                 path)

    FileUtils.mkdir_p(target_directory)
    FileUtils.mv(file.path, target_directory)

    identifier = File.join(target_directory, filename)
    url = File.join('http://',
{'fraction_non_alphanumeric': 0.10027598896044158, 'fraction_numerical': 0.0018399264029438822, 'mean_word_length': 2.2672672672672673, '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': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '345728', 'n_tokens_mistral': 304, 'n_tokens_neox': 293, 'n_words': 56}