<commit_before>apt_repository 'postgresql' do
  uri 'http://apt.postgresql.org/pub/repos/apt/'
  distribution 'focal-pgdg'
  components ['main']
  key 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
end

package 'postgresql'

service 'postgresql' do
  action [:stop, :disable]
end

execute 'find_line_number' do
  command 'line_numb=$(sudo grep -n local /etc/postgresql/12/main/pg_hba.conf | sudo grep postgres | sudo grep peer | sudo cut -d: -f1) && echo $line_numb > ~/test.txt'
end

execute 'sed_peer_to_trust' do
  command 'sudo sed -i \'\'$line_numb\'s/peer/trust/\' /etc/postgresql/12/main/pg_hba.conf'
end

execute 'change_log_dir_permissions' do
  command 'sudo chmod -R 777 /var/log/postgresql'
end

apt_repository 'postgresql' do
  action :remove
end<commit_msg>Fix focal build<commit_after>apt_repository 'postgresql' do
  uri 'http://apt.postgresql.org/pub/repos/apt/'
  distribution 'focal-pgdg'
  components ['main']
  key 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
end

package 'postgresql'

service 'postgresql' do
  action [:stop, :disable]
end

execute 'find_line_number' do
  command 'line_numb=$(sudo grep -n local /etc/postgresql/12/main/pg_hba.conf | sudo grep postgres | sudo grep peer | sudo cut -d: -f1) && echo $line_numb > ~/test.txt'
end

execute 'sed_peer_to_trust' do
  command 'test -f /etc/postgresql/12/main/pg_hba.conf && sudo sed -i \'\'$line_numb\'s/peer/trust/\' /etc/postgresql/12/main/pg_hba.conf'
end

execute 'change_log_dir_permissions' do
  command 'sudo chmod -R 777 /var/log/postgresql'
end

apt_repository 'postgresql' do
  action :remove
end
{'fraction_non_alphanumeric': 0.13661883967560823, 'fraction_numerical': 0.01372426699937617, 'mean_word_length': 4.311258278145695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5446522', 'n_tokens_mistral': 649, 'n_tokens_neox': 615, 'n_words': 144}