<commit_before>#!/bin/bash

#IMG="swarm:pss"
IMG="ethdevops/swarm:latest"
WSFLAGS="--ws --wsapi=pss,bzz,admin --wsaddr=0.0.0.0 --wsorigins=*"
BZZFLAGS="--httpaddr=0.0.0.0"

case $1 in
	"start")
		#docker network create --internal --subnet 10.1.3.0/24 pssnet
		docker network create --subnet 10.1.3.0/24 pssnet
		#docker run -p 8500:8500 -p 8546:8546 -d --ip 10.1.3.11 --network pssnet --rm -e PATH=/:/bin:/usr/bin:/usr/local/bin -e PASSWORD=<PASSWORD> --name pss1 -h ps1 $IMG $BZZFLAGS $WSFLAGS
		docker run -d --ip 10.1.3.11 --network pssnet --rm -e PATH=/:/bin:/usr/bin:/usr/local/bin -e PASSWORD=<PASSWORD> --name pss1 -h ps1 $IMG $BZZFLAGS $WSFLAGS
		# wait for nodes to start
		sleep 5
		ENODE=`docker exec pss1 /geth attach /root/.ethereum/bzzd.ipc --exec admin.nodeInfo.enode`
		ENODENEW=`echo -n $ENODE | sed -e "s/^\"\(.*\)@127.0.0.1:\([0-9]*\).*$/\1@10.1.3.11:\2/g"`
		echo "b$i: '$ENODE'"
		echo "a$i: '$ENODENEW'"
		for i in {2..4}; do
			#docker run -d --ip 10.1.3.1$i -p 1850$i:8500 --network pssnet --rm -e PATH=/:/bin:/usr/bin:/usr/local/bin -e PASSWORD=<PASSWORD> --name pss$i -h ps$i $IMG --nat extip:10.1.3.1$i --bootnodes=$ENODENEW $BZZFLAGS $WSFLAGS
			docker run -d --ip 10.1.3.1$i --network pssnet --rm -e PATH=/:/bin:/usr/bin:/usr/local/bin -e PASSWORD=<PASSWORD> --name pss$i -h ps$i $IMG --nat extip:10.1.3.1$i --bootnodes=$ENODENEW $BZZFLAGS $WSFLAGS
		done
		;;
	"status")
		for i in {1..4}; do
			docker exec pss$i /geth attach /root/.ethereum/bzzd.ipc --exec admin.peers
		done
		;;
	"stop")
		for i in {4..1}; do
			docker stop pss$i
		done
		docker network rm pssnet
		;;
esac<commit_msg>Correct new flags in swarm invocation<commit_after>#!/bin/bash

IMG="lash/swarm:psss"
#IMG="ethdevops/swarm:latest"
WSFLAGS="--ws --wsapi=pss,bzz,admin --wsaddr=0.0.0.0 --wsorigins=*"
BZZFLAGS="--httpaddr=0.0.0.0"

case $1 in
	"start")
		docker network create --subnet 10.1.3.0/24 pssnet
		echo "docker run -d --ip 10.1.3.11 --network pssnet --rm -e PATH=/:/bin:/usr/bin:/usr/local/bin -e PASSWORD=<PASSWORD> --name pss1 -h ps1 $IMG --nat=extip:10.1.3.11 $BZZFLAGS $WSFLAGS"
		docker run -d --ip 10.1.3.11 --network pssnet --rm -e PATH=/:/bin:/usr/bin:/usr/local/bin -e PASSWORD=<PASSWORD> --name pss1 -h ps1 $IMG --nat=extip:10.1.3.11 $BZZFLAGS $WSFLAGS
		# wait for nodes to start
		sleep 5
		ENODE=`docker exec pss1 geth attach /root/.ethereum/bzzd.ipc --exec admin.nodeInfo.enode`
		#ENODENEW=`echo -n $ENODE | sed -e "s/^\"\(.*\)@127.0.0.1:\([0-9]*\).*$/\1@10.1.3.11:\2/g"`
		ENODENEW=`echo -n $ENODE | sed -e "s/\"//g"`
		echo "b$i: '$ENODE'"
		echo "a$i: '$ENODENEW'"
		for i in {2..4}; do
			docker run -d --ip 10.1.3.1$i --network pssnet --rm -e PATH=/:/bin:/usr/bin:/usr/local/bin -e PASSWORD=<PASSWORD> --name pss$i -h ps$i $IMG --nat=extip:10.1.3.1$i --bootnodes=$ENODENEW $BZZFLAGS $WSFLAGS
		done
		;;
	"status")
		for i in {1..4}; do
			docker exec pss$i geth attach /root/.ethereum/bzzd.ipc --exec admin.peers
		done
		;;
	"stop")
		for i in {4..1}; do
			docker stop pss$i
		done
		docker network rm pssnet
		;;
esac
{'fraction_non_alphanumeric': 0.2119226989846053, 'fraction_numerical': 0.06059613494923027, 'mean_word_length': 2.8463476070528966, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 23, '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': '6013433', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1384, 'n_words': 329}