<commit_before>apt_package "automake" do
  action :install
end

apt_package "libtool" do
  action :install
end

apt_package "libbz2-dev" do
  action :install
end

apt_package "libpq-dev" do
  action :install
end

apt_package "libgeos++-dev" do
  action :install
end

apt_package "libxml2-dev" do
  action :install
end

apt_package "build-essential" do
  action :install
end

apt_package "protobuf-c-compiler" do
  action :install
end

apt_package "libprotobuf-c0-dev" do
  action :install
end

include_recipe "collectd::default"

zk_addr = File.open("/home/ubuntu/zookeeper.txt", "r").read
metrics_addr = File.open("/home/ubuntu/metrics.txt", "r").read

template "/etc/collectd/collectd.conf" do
  source "collectd/collectd.conf.erb"
  owner "ubuntu"
  group "ubuntu"
  variables({
    :zk => zk_addr,
    :metrics => metrics_arr
  })
end

execute "apt-get install -y python-pip"
execute "pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz"
<commit_msg>Fix typo.<commit_after>apt_package "automake" do
  action :install
end

apt_package "libtool" do
  action :install
end

apt_package "libbz2-dev" do
  action :install
end

apt_package "libpq-dev" do
  action :install
end

apt_package "libgeos++-dev" do
  action :install
end

apt_package "libxml2-dev" do
  action :install
end

apt_package "build-essential" do
  action :install
end

apt_package "protobuf-c-compiler" do
  action :install
end

apt_package "libprotobuf-c0-dev" do
  action :install
end

include_recipe "collectd::default"

zk_addr = File.open("/home/ubuntu/zookeeper.txt", "r").read
metrics_addr = File.open("/home/ubuntu/metrics.txt", "r").read

template "/etc/collectd/collectd.conf" do
  source "collectd/collectd.conf.erb"
  owner "ubuntu"
  group "ubuntu"
  variables({
    :zk => zk_addr,
    :metrics => metrics_addr
  })
end

execute "apt-get install -y python-pip"
execute "pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz"

{'fraction_non_alphanumeric': 0.12028183190739809, 'fraction_numerical': 0.004026170105686965, 'mean_word_length': 4.416893732970027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6485274', 'n_tokens_mistral': 737, 'n_tokens_neox': 710, 'n_words': 173}