<commit_before>class Photo < Post
  require 'carrierwave/orm/mongomapper'
  include MongoMapper::Document
  mount_uploader :image, ImageUploader
  
  xml_accessor :remote_photo
  xml_reader :album_id 

  key :album_id, ObjectId

   
  belongs_to :album, :class_name => 'Album'
  timestamps!

  validates_presence_of :album

  def self.instantiate params = {}
    image_file = params[:image]
    params.delete :image
    photo = Photo.new(params)
    photo.image.store! image_file
    photo
  end

  def remote_photo
    @remote_photo ||= User.owner.url.chop + image.url
  end

  def remote_photo= remote_path
    @remote_photo = remote_path
    image.download! remote_path
    image.store!
  end
end<commit_msg>RS IZ remote photo url does not change on marshaling'<commit_after>class Photo < Post
  require 'carrierwave/orm/mongomapper'
  include MongoMapper::Document
  mount_uploader :image, ImageUploader
  
  xml_accessor :remote_photo
  xml_reader :album_id 

  key :album_id, ObjectId

   
  belongs_to :album, :class_name => 'Album'
  timestamps!

  validates_presence_of :album

  def self.instantiate params = {}
    image_file = params[:image]
    params.delete :image
    photo = Photo.new(params)
    photo.image.store! image_file
    photo
  end

  def remote_photo
    @remote_photo ||= User.owner.url.chop + image.url
  end

  def remote_photo= remote_path
    image.download! remote_path
    image.store!
  end
end
{'fraction_non_alphanumeric': 0.08041958041958042, 'fraction_numerical': 0.0, 'mean_word_length': 3.6012861736334405, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5857741', 'n_tokens_mistral': 494, 'n_tokens_neox': 470, 'n_words': 112}