<commit_before>#
#
# Author:  Michael 'entropie' Trommer <<EMAIL>>
#

require "rubygems"
require "grit"
require "ostruct"
require "redcloth"
require "nokogiri"
require "json"

require "pp"

#ReposPath = File.expand_path("~/Source/oytest")

module OY

  Source  = File.dirname(File.dirname(File.expand_path(__FILE__)))

  Actor   = Grit::Actor.new("Anonymous", "<EMAIL>")
  
  $: << File.join(Source, "lib/oy")
  $: << File.join(Source, "app")

  def puts(*args)
    args.each do |a|
      Kernel.puts "|> #{a}"
    end
  end
  
  Version = [0, 0, 1]

  def api(host = nil)
    @api ||= Api.new(host)
  end
  module_function :api
  
  def path=(str)
    @path = str
  end
  module_function "path="
    
  def path
    @path || '.'
  end
  module_function :path  
  
  def repos(with_git = true)
    if with_git
      @repos = Repos.new(OY.path)
    else
      @repos = VirtualRepos.new(OY.path)
    end
  end
  module_function :repos

  require "model/git"

  require "blob_entry.rb"
  require "git_access.rb"
  require "api.rb"
  require "repos"
  require "exceptions.rb"
  require "markup"
end

=begin
Local Variables:
  mode:ruby
  fill-column:70
  indent-tabs-mode:nil
  ruby-indent-level:2
End:
=end
<commit_msg>dont set constants if already defined<commit_after>#
#
# Author:  Michael 'entropie' Trommer <<EMAIL>>
#

require "rubygems"
require "grit"
require "ostruct"
require "redcloth"
require "nokogiri"
require "json"

require "pp"

#ReposPath = File.expand_path("~/Source/oytest")


module OY

  Source  = File.dirname(File.dirname(File.expand_path(__FILE__))) unless const_defined?(:Source)

  Actor   = Grit::Actor.new("Anonymous", "<EMAIL>") unless const_defined?(:Actor)
  
  $: << File.join(Source, "lib/oy")
  $: << File.join(Source, "app")

  def puts(*args)
    args.each do |a|
      Kernel.puts "|> #{a}"
    end
  end
  
  Version = [0, 0, 1] unless const_defined?(:Version)

  def api(host = nil)
    @api ||= Api.new(host)
  end
  module_function :api
  
  def path=(str)
    @path = str
  end
  module_function "path="
    
  def path
    @path || '.'
  end
  module_function :path  
  
  def repos(with_git = true)
    if with_git
      @repos = Repos.new(OY.path)
    else
      @repos = VirtualRepos.new(OY.path)
    end
  end
  module_function :repos

  require "model/git"

  require "blob_entry.rb"
  require "git_access.rb"
  require "api.rb"
  require "repos"
  require "exceptions.rb"
  require "markup"
end

=begin
Local Variables:
  mode:ruby
  fill-column:70
  indent-tabs-mode:nil
  ruby-indent-level:2
End:
=end

{'fraction_non_alphanumeric': 0.1419607843137255, 'fraction_numerical': 0.004705882352941176, 'mean_word_length': 3.202635914332784, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 11, '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': '160363', 'n_tokens_mistral': 1018, 'n_tokens_neox': 966, 'n_words': 221}