<commit_before>#!/bin/bash

DATABASE=crowdblog
TIMESTAMP=`date +"%Y%m%d-%H%M%S"`
FILENAME=$TIMESTAMP.sql

echo "Capture the database"
bundle exec heroku pgbackups:capture

echo "Download the backup"
wget -O $FILENAME `bundle exec heroku pgbackups:url`

echo "Restore the database"
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d $DATABASE $FILENAME

echo "Done"<commit_msg>Modified the DB script for Heroku toolbelt<commit_after>#!/bin/bash

DATABASE=crowdblog
TIMESTAMP=`date +"%Y%m%d-%H%M%S"`
FILENAME=$TIMESTAMP.sql

echo "Capture the database"
heroku pgbackups:capture

echo "Download the backup"
wget -O $FILENAME `heroku pgbackups:url`

echo "Restore the database"
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d $DATABASE $FILENAME

echo "Done"
{'fraction_non_alphanumeric': 0.13248407643312102, 'fraction_numerical': 0.0, 'mean_word_length': 5.288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2584596', 'n_tokens_mistral': 300, 'n_tokens_neox': 284, 'n_words': 81}