<commit_before>require 'stacks/hosts/namespace'

module Stacks::Hosts::HostPolicies
  def self.ha_group()
    Proc.new do |host, machine|
      if machine.respond_to? :availability_group and machine.availability_group != nil
        member_of_group_exists = false
        host.machines.each do |allocated_machine|
          if machine.availability_group == allocated_machine.availability_group
            member_of_group_exists = true
          end
        end
        !member_of_group_exists
      else
        true
      end
    end
  end

  def self.do_not_overallocated_ram_policy
  end

  def self.do_not_overallocated_disk_policy
  end

end<commit_msg>dellis: fix availability bug again<commit_after>require 'stacks/hosts/namespace'

module Stacks::Hosts::HostPolicies
  def self.ha_group()
    Proc.new do |host, machine|
      if machine.respond_to? :availability_group and machine.availability_group != nil
        member_of_group_exists = false
        host.machines.each do |allocated_machine|
          if allocated_machine.respond_to? :availability_group and machine.availability_group == allocated_machine.availability_group
            member_of_group_exists = true
          end
        end
        !member_of_group_exists
      else
        true
      end
    end
  end

  def self.do_not_overallocated_ram_policy
  end

  def self.do_not_overallocated_disk_policy
  end

end
{'fraction_non_alphanumeric': 0.05599425699928212, 'fraction_numerical': 0.0, 'mean_word_length': 2.994269340974212, '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': '2955852', 'n_tokens_mistral': 430, 'n_tokens_neox': 412, 'n_words': 88}