<commit_before>#!/bin/bash
###############################################################
#
#This is a bash script to execute the Django management command
# for capturing the SNMP status of all the registered locations
# in the Loggins application.
#
#Usage: Ideally this script shall be scheduled as a CRON job
#to be executed repetitively after a particular time interval.
#(Eg. After every 30 seconds)
#
###############################################################

LOGGINS_PATH_TO_ENV=''
#Example: LOGGINS_PATH_TO_ENV = '/home/darshan/projects/loggins/ENV'
LOGGINS_PROJECT_DIR=''
#Example: LOGGINS_INSTALL_DIR = '/home/darshan/projects/loggins/loggins'

if [ "$LOGGINS_PATH_TO_ENV" == "" ]; then
    echo "Please configure the path to virual environment under Loggins application"
    exit 1
fi

if [ "$LOGGINS_PROJECT_DIR" == "" ]; then
    echo "Please configure the path to project directory of Loggins application"
    exit 1
fi

source $LOGGINS_PATH_TO_ENV/bin/activate
echo "-----------Activated virtual environment-----------------"
cd $LOGGINS_PROJECT_DIR
echo "----Executing management command 'capture_snmp_state'----"
python manage.py capture_snmp_state
deactivate
echo "----------Deactivated virtual environment----------------"<commit_msg>Spelling fix<commit_after>#!/bin/bash
###############################################################
#
#This is a bash script to execute the Django management command
# for capturing the SNMP status of all the registered locations
# in the Loggins application.
#
#Usage: Ideally this script shall be scheduled as a CRON job
#to be executed repetitively after a particular time interval.
#(Eg. After every 30 seconds)
#
###############################################################

LOGGINS_PATH_TO_ENV=''
#Example: LOGGINS_PATH_TO_ENV = '/home/darshan/projects/loggins/ENV'
LOGGINS_PROJECT_DIR=''
#Example: LOGGINS_INSTALL_DIR = '/home/darshan/projects/loggins/loggins'

if [ "$LOGGINS_PATH_TO_ENV" == "" ]; then
    echo "Please configure the path to virtual environment under Loggins application"
    exit 1
fi

if [ "$LOGGINS_PROJECT_DIR" == "" ]; then
    echo "Please configure the path to project directory of Loggins application"
    exit 1
fi

source $LOGGINS_PATH_TO_ENV/bin/activate
echo "-----------Activated virtual environment-----------------"
cd $LOGGINS_PROJECT_DIR
echo "----Executing management command 'capture_snmp_state'----"
python manage.py capture_snmp_state
deactivate
echo "----------Deactivated virtual environment----------------"
{'fraction_non_alphanumeric': 0.21649484536082475, 'fraction_numerical': 0.0031720856463124504, 'mean_word_length': 4.461038961038961, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2469073', 'n_tokens_mistral': 730, 'n_tokens_neox': 685, 'n_words': 228}