<commit_before>#!/bin/bash
### BEGIN INIT INFO
# Provides: dualShock
# Required-Start:    $local_fs bluetooth
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start dualshock motor controller
### END INIT INFO
#
# set -e

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/local/bin/dualShock.py

dualShock_already_running_check () {
	ps -e | grep dualShock.py > /dev/null
}

. /lib/lsb/init-functions

case "$1" in
	start)
if (dualShock_already_running_check "$1"); then
	log_warning_msg "dualShock is already running"
else {
		while true; do
				#waiting for the controller to be connected
				if [ -a /dev/input/js0 ]; then
						python $DAEMON &>>/var/log/dualShock &
						break
				else
						sleep 1
						#echo "waiting..."
				fi
		done
}
fi
		;;
	stop)
			killall dualShock.py
		;;
	*)
		echo "Usage: /etc/init.d/dualShock.sh {start|stop}" >&2
		exit 1
		;;
esac

exit 0<commit_msg>fixed wrong spaces in script<commit_after>#!/bin/bash
### BEGIN INIT INFO
# Provides: dualShock
# Required-Start:    $local_fs bluetooth
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start dualshock motor controller
### END INIT INFO
#
# set -e

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/local/bin/dualShock.py

dualShock_already_running_check () {
	ps -e | grep dualShock.py > /dev/null
}

. /lib/lsb/init-functions

case "$1" in
	start)
if (dualShock_already_running_check "$1"); then
	log_warning_msg "dualShock is already running"
else {
	while true; do
		#waiting for the controller to be connected
		if [ -a /dev/input/js0 ]; then
			python $DAEMON &>>/var/log/dualShock &
			break
		else
			sleep 1
			#echo "waiting..."
		fi
	done
}
fi
		;;
	stop)
			killall dualShock.py
		;;
	*)
		echo "Usage: /etc/init.d/dualShock.sh {start|stop}" >&2
		exit 1
		;;
esac

exit 0
{'fraction_non_alphanumeric': 0.13354531001589826, 'fraction_numerical': 0.01483836777954425, 'mean_word_length': 3.025586353944563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5187832', 'n_tokens_mistral': 833, 'n_tokens_neox': 722, 'n_words': 187}