<commit_before>#!/bin/bash

R=`(asadmin list-libraries | grep -q postgresql-9.1-901.jdbc4.jar) && echo yes`
if [ "$R" != 'yes' ]; then
  asadmin add-library ~/.m2/repository/postgresql/postgresql/9.1-901.jdbc4/postgresql-9.1-901.jdbc4.jar
fi

asadmin delete-jdbc-resource jdbc/Tyrell
asadmin delete-jdbc-connection-pool TyrellPool

asadmin create-jdbc-connection-pool\
  --datasourceclassname org.postgresql.ds.PGSimpleDataSource\
  --restype javax.sql.DataSource\
  --isconnectvalidatereq=true\
  --validationmethod auto-commit\
  --ping true\
  --description "Tyrell Connection Pool"\
  --property "ServerName=127.0.0.1:User=${USER}:Password=<PASSWORD>:PortNumber=5432:DatabaseName=${USER}_TYRELL_DEV" TyrellPool
asadmin create-jdbc-resource --connectionpoolid TyrellPool jdbc/Tyrell

asadmin set domain.resources.jdbc-connection-pool.TyrellPool.property.JDBC30DataSource=true<commit_msg>Make sure domain is created and setup<commit_after>#!/bin/bash

R=`(asadmin list-domains | grep -q 'tyrell ') && echo yes`
if [ "$R" != 'yes' ]; then
  asadmin create-domain tyrell
fi

R=`(asadmin list-domains | grep -q 'tyrell running') && echo yes`
if [ "$R" != 'yes' ]; then
  asadmin start-domain tyrell
fi

R=`(asadmin list-libraries | grep -q postgresql-9.1-901.jdbc4.jar) && echo yes`
if [ "$R" != 'yes' ]; then
  asadmin add-library ~/.m2/repository/postgresql/postgresql/9.1-901.jdbc4/postgresql-9.1-901.jdbc4.jar
  asadmin restart-domain tyrell
fi

asadmin delete-jdbc-resource jdbc/Tyrell
asadmin delete-jdbc-connection-pool TyrellPool

asadmin create-jdbc-connection-pool\
  --datasourceclassname org.postgresql.ds.PGSimpleDataSource\
  --restype javax.sql.DataSource\
  --isconnectvalidatereq=true\
  --validationmethod auto-commit\
  --ping true\
  --description "Tyrell Connection Pool"\
  --property "ServerName=127.0.0.1:User=${USER}:Password=<PASSWORD>:PortNumber=5432:DatabaseName=${USER}_TYRELL_DEV" TyrellPool
asadmin create-jdbc-resource --connectionpoolid TyrellPool jdbc/Tyrell

asadmin set domain.resources.jdbc-connection-pool.TyrellPool.property.JDBC30DataSource=true
{'fraction_non_alphanumeric': 0.14059500959692897, 'fraction_numerical': 0.029750479846449136, 'mean_word_length': 4.743801652892562, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2589237', 'n_tokens_mistral': 773, 'n_tokens_neox': 712, 'n_words': 135}