<commit_before>#!/bin/bash

bash initcfg.sh
sed -i 's/sspanelv2/mudbjson/g' userapiconfig.py
ip_addr=`ifconfig -a|grep inet|grep -v inet6|grep -v "127.0.0."|grep -v -e "192\.168\..[0-9]\+\.[0-9]\+"|grep -v -e "10\.[0-9]\+\.[0-9]\+\.[0-9]\+"|awk '{print $2}'|tr -d "addr:"`
ip_count=`echo $ip_addr|grep -e "^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$" -c`
if [[ $ip_count == 1 ]]; then
	echo "server IP is "${ip_addr}
	sed -i 's/127\.0\.0\.1/'${ip_addr}'/g' userapiconfig.py
	port=`python -c 'import random;print(random.randint(10000, 65536))'`
	python mujson_mgr.py -a -p ${port}
else
	echo "unable to detect server IP"
fi
<commit_msg>update initmudbjson.sh<commit_after>#!/bin/bash

bash initcfg.sh
sed -i "s/API_INTERFACE = .\+\?\#/API_INTERFACE = \'mudbjson\' \#/g" userapiconfig.py
ip_addr=`ifconfig -a|grep inet|grep -v inet6|grep -v "127.0.0."|grep -v -e "192\.168\..[0-9]\+\.[0-9]\+"|grep -v -e "10\.[0-9]\+\.[0-9]\+\.[0-9]\+"|awk '{print $2}'|tr -d "addr:"`
ip_count=`echo $ip_addr|grep -e "^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$" -c`
if [[ $ip_count == 1 ]]; then
	echo "server IP is "${ip_addr}
	sed -i 's/SERVER_PUB_ADDR = .\+/SERVER_PUB_ADDR = '${ip_addr}'/g' userapiconfig.py
	port=`python -c 'import random;print(random.randint(10000, 65536))'`
	python mujson_mgr.py -a -p ${port}
else
	echo "unable to detect server IP"
fi

{'fraction_non_alphanumeric': 0.27765237020316025, 'fraction_numerical': 0.07148231753197894, 'mean_word_length': 3.4186046511627906, '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': '1625672', 'n_tokens_mistral': 698, 'n_tokens_neox': 632, 'n_words': 126}