<commit_before>#!/usr/bin/env bash

echo "Copying data to Scorecard"

# ensure we're not copying an empty file
num_lines=`cat /home/numbergen/gbm-IATI-Dashboard/web/summary_stats.csv | wc -l`
if [ $num_lines -lt 2 ]
then
    echo "Not enough data to copy"
    exit 1
fi

# copy relevant generated CSVs to scorecard repo
cp /home/numbergen/gbm-IATI-Dashboard/web/summary_stats.csv /var/www/grand-bargain-monitoring/data/app/summary_stats.csv

echo "Updated Scorecard data"<commit_msg>Update script to fetch data for socrecard<commit_after>#!/usr/bin/env bash

echo "Copying data to Scorecard"

# ensure we're not copying an empty file
num_lines=`cat /home/numbergen/gbm-IATI-Dashboard/web/summary_stats.csv | wc -l`
if [ $num_lines -lt 2 ]
then
    echo "Not enough data to copy"
    exit 1
fi

# copy relevant generated CSVs to scorecard repo
cp /home/numbergen/gbm-IATI-Dashboard/web/summary_stats.csv /var/www/grand-bargain-monitoring/data/app/summary_stats.csv

echo "Copied Scorecard data"

echo "Fetching humanitarian data from Dashboard"

wget http://dashboard.iatistandard.org/humanitarian.csv -O /var/www/grand-bargain-monitoring/data/remote/humanitarian.csv --backups=10 --waitretry=60

echo "Fetched humanitarian data"

echo "Removing execution of data"

chmod -x /var/www/grand-bargain-monitoring/data/remote/humanitarian.csv
chmod -x /var/www/grand-bargain-monitoring/data/app/summary_stats.csv

echo "Removed execution of humanitarian data"
{'fraction_non_alphanumeric': 0.10529938059187888, 'fraction_numerical': 0.0055058499655884375, 'mean_word_length': 4.385185185185185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 5, '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': '656888', 'n_tokens_mistral': 525, 'n_tokens_neox': 510, 'n_words': 130}