<commit_before>#! /usr/bin/sh

username=""
password=""

url="http://10.6.8.2/cgi-bin/srun_portal"
data="ac_id=1"

if [ "$1" = "logout" ]
then
    data="$data&action=logout"
else
    data="$data&action=login&type=1&username=$username&password=$password" 
fi

curl "$url?$data"
<commit_msg>updated: shell version with more tools<commit_after>#! /usr/bin/sh
# A script for cernet login at XJTU
# shell version

# depends curl, wget or lynx

username="your_username"
password="<PASSWORD>"

url="http://10.6.8.2/cgi-bin/srun_portal"
data="ac_id=1"

if [ "$1" = "logout" ]
then
    data="$data&action=logout"
else
    data="$data&action=login&type=1&username=$username&password=$password" 
fi

cmd="curl"
no_cmd_flag="NO_COMMAND_FLAG"

type curl > /dev/null 2>&1
if [ $? -ne 0 ]
then
    type wget > /dev/null 2>&1
    if [ $? -eq 0 ]
    then
        cmd="wget -q -O -"
    else
        type lynx > /dev/null 2>&1
        if [ $? -eq 0 ]
        then
            cmd="lynx -dump"
        else
            cmd=$no_cmd_flag
        fi
    fi
fi

if [ "$cmd" = "$no_cmd_flag" ]
then
    echo "This script depends on curl, wget or lynx"
else
    $cmd "$url?$data"
fi

{'fraction_non_alphanumeric': 0.16753022452504318, 'fraction_numerical': 0.02158894645941278, 'mean_word_length': 2.955631399317406, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, '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': '7261802', 'n_tokens_mistral': 472, 'n_tokens_neox': 458, 'n_words': 103}