<commit_before>#!/bin/bash

#Start a new container running the image, and map your local directory into the container
sudo docker run -v $(pwd):/usr/src/yasp -di --name yasp --net=host yasp/yasp:latest
#Start the external dependencies in separate containers.
sudo docker run -d --name postgres --net=host postgres:9.5
sudo docker run -d --name redis --net=host redis:3
sudo docker run -d --name cassandra --net=host cassandra:3
#Create Postgres DB
sudo docker exec -i postgres psql -U postgres < sql/init.sql
#Create Postgres tables
sudo docker exec -i postgres psql -U postgres yasp < sql/create_tables.sql
#Create Cassandra keyspace
sudo docker exec -i cassandra cqlsh < sql/cassandra.cql
#Create Cassandra tables
sudo docker exec -i cassandra cqlsh -k yasp < sql/create_tables.cql

#Import a Postgres dump:
#sudo docker exec -i postgres pg_restore -d yasp -U postgres --clean < ../dump.pgdump
#Run a script in production:
#sudo docker run -d --name task --restart=always --net=host yasp/yasp:latest sh -c 'curl -H "Metadata-Flavor: Google" -L http://metadata.google.internal/computeMetadata/v1/project/attributes/env > /usr/src/yasp/.env && node dev/preloader.js'<commit_msg>add cassandra listen address to dev script<commit_after>#!/bin/bash

#Start a new container running the image, and map your local directory into the container
sudo docker run -v $(pwd):/usr/src/yasp -di --name yasp --net=host yasp/yasp:latest
#Start the external dependencies in separate containers.
sudo docker run -d --name postgres --net=host postgres:9.5
sudo docker run -d --name redis --net=host redis:3
sudo docker run -d --name cassandra --net=host -e "CASSANDRA_LISTEN_ADDRESS=127.0.0.1" cassandra:3
#Create Postgres DB
sudo docker exec -i postgres psql -U postgres < sql/init.sql
#Create Postgres tables
sudo docker exec -i postgres psql -U postgres yasp < sql/create_tables.sql
#Create Cassandra keyspace
sudo docker exec -i cassandra cqlsh < sql/cassandra.cql
#Create Cassandra tables
sudo docker exec -i cassandra cqlsh -k yasp < sql/create_tables.cql

#Import a Postgres dump:
#sudo docker exec -i postgres pg_restore -d yasp -U postgres --clean < ../dump.pgdump
#Run a script in production:
#sudo docker run -d --name task --restart=always --net=host yasp/yasp:latest sh -c 'curl -H "Metadata-Flavor: Google" -L http://metadata.google.internal/computeMetadata/v1/project/attributes/env > /usr/src/yasp/.env && node dev/preloader.js'
{'fraction_non_alphanumeric': 0.10845360824742269, 'fraction_numerical': 0.006597938144329897, 'mean_word_length': 4.043659043659043, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '6561518', 'n_tokens_mistral': 831, 'n_tokens_neox': 773, 'n_words': 297}