<commit_before># a rake task
namespace :misc do
  desc "Update bookmark privacy"
  task :private_update => :environment do
    Bookmark.all.each do |post|
      if post.private != 1
        post.private = 0
        post.save
      end
    end
  end

  desc "set default role if none"
  task :set_default_role => :environment do
    User.all.each do |user|
      if user.roles == nil
        user.roles = "guest"
        user.save
      end
    end
  end

  desc "remove lost bookmarks"
  task :lost_bookmarks => :environment do
    Bookmark.all.each do |d|
      if d.user == nil
        d.destroy
      end
    end
  end
end<commit_msg>adding task to shorten not shorten links<commit_after># a rake task
namespace :misc do
  desc "Update bookmark privacy"
  task :private_update => :environment do
    Bookmark.all.each do |post|
      if post.private != 1
        post.private = 0
        post.save
      end
    end
  end

  desc "set default role if none"
  task :set_default_role => :environment do
    User.all.each do |user|
      if user.roles == nil
        user.roles = "guest"
        user.save
      end
    end
  end

  desc "get all short urls"
  task :get_shorts => :environment do
    Link.all.each do |l|
      l.shorten if l.short_url == nil
      if l.short_url
        Rails.logger.info("#{l.url} shorten to #{l.short_url}")
        l.save
      end
    end
  end

  desc "remove lost bookmarks"
  task :lost_bookmarks => :environment do
    Bookmark.all.each do |d|
      if d.user == nil
        d.destroy
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08745980707395498, 'fraction_numerical': 0.002572347266881029, 'mean_word_length': 2.0390625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '1505441', 'n_tokens_mistral': 523, 'n_tokens_neox': 507, 'n_words': 167}