<commit_before>execute "clean-up" do
  command "rm /home/vagrant/postinstall.sh || true"
end

# deadsnakes for py2.6
execute "deadsnakes key" do
  command "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY>"
  action :run
  not_if "sudo apt-key list | grep 'Launchpad Old Python Versions'"
end

cookbook_file "/etc/apt/sources.list.d/fkrull-deadsnakes-precise.list" do
  source "etc/apt/sources.list.d/fkrull-deadsnakes-precise.list"
  mode 0644
end

execute "apt-get-update" do
  command "apt-get update && touch /tmp/.apt-get-update"
  if not node['full_reprovision']:
    creates "/tmp/.apt-get-update"
  end
  action :run
end

# packages
required_packages = [
  "curl", "gcc", "memcached", "rsync", "sqlite3", "xfsprogs", "git-core",
  "build-essential", "python-dev", "libffi-dev", "python-setuptools",
  "python-coverage", "python-dev", "python-nose", "python-simplejson",
  "python-xattr", "python-eventlet", "python-greenlet", "python-pastedeploy",
  "python-netifaces", "python-pip", "python-dnspython", "python-mock",
  "python2.6", "python2.6-dev",
]
extra_packages = node['extra_packages']
(required_packages + extra_packages).each do |pkg|
  package pkg do
    action :install
  end
end

# setup environment

execute "update-path" do
  command "echo 'export PATH=/vagrant/bin:$PATH' >> /home/vagrant/.profile"
  not_if "grep /vagrant/bin /home/vagrant/.profile"
  action :run
end<commit_msg>Adding xml libraries<commit_after>execute "clean-up" do
  command "rm /home/vagrant/postinstall.sh || true"
end

# deadsnakes for py2.6
execute "deadsnakes key" do
  command "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY>"
  action :run
  not_if "sudo apt-key list | grep 'Launchpad Old Python Versions'"
end

cookbook_file "/etc/apt/sources.list.d/fkrull-deadsnakes-precise.list" do
  source "etc/apt/sources.list.d/fkrull-deadsnakes-precise.list"
  mode 0644
end

execute "apt-get-update" do
  command "apt-get update && touch /tmp/.apt-get-update"
  if not node['full_reprovision']:
    creates "/tmp/.apt-get-update"
  end
  action :run
end

# packages
required_packages = [
  "curl", "gcc", "memcached", "rsync", "sqlite3", "xfsprogs", "git-core",
  "build-essential", "python-dev", "libffi-dev", "python-setuptools",
  "python-coverage", "python-dev", "python-nose", "python-simplejson",
  "python-xattr", "python-eventlet", "python-greenlet", "python-pastedeploy",
  "python-netifaces", "python-pip", "python-dnspython", "python-mock",
  "python2.6", "python2.6-dev", "libxml2-dev", "libxml2", "libxslt1-dev",
]
extra_packages = node['extra_packages']
(required_packages + extra_packages).each do |pkg|
  package pkg do
    action :install
  end
end

# setup environment

execute "update-path" do
  command "echo 'export PATH=/vagrant/bin:$PATH' >> /home/vagrant/.profile"
  not_if "grep /vagrant/bin /home/vagrant/.profile"
  action :run
end
{'fraction_non_alphanumeric': 0.15876859218263575, 'fraction_numerical': 0.008647526807333102, 'mean_word_length': 4.415730337078652, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '7637201', 'n_tokens_mistral': 1091, 'n_tokens_neox': 1062, 'n_words': 238}