<commit_before> #!/bin/bash
 # /etc/init.d/nodered
 # version 0.3.9 2014-10-25 (YYYY-MM-DD)
 
 ### BEGIN INIT INFO
 # Provides:   nodered
 # Required-Start: $local_fs $remote_fs screen-cleanup
 # Required-Stop:  $local_fs $remote_fs
 # Should-Start:   $network
 # Should-Stop:    $network
 # Default-Start:  2 3 4 5
 # Default-Stop:   0 1 6
 # Short-Description:    Start nodered
 # Description:    Starts the NodeRED server
 ### END INIT INFO
 
 #Settings
 SERVICE='red.js'
 OPTIONS=''
 USERNAME='iot'
 APP_PATH="/home/$USERNAME/node-red"
 HISTORY=1024
 NODE_VERSION="0.12.0"
 NODE="/home/$USERNAME/.nvm/versions/node/v$NODE_VERSION/bin/node"
 INVOCATION="$NODE $SERVICE" 
 ME=`whoami`
 
 as_user() {
   if [ "$ME" = "$USERNAME" ] ; then
     bash -c "$1"
   else
     su - $USERNAME -c "$1"
   fi
 }
 
 my_start() {
   if  pgrep -u $USERNAME -f $SERVICE > /dev/null
   then
     echo "$SERVICE is already running!"
   else
     echo "Starting $SERVICE..."
     cd $APP_PATH
     as_user "cd $APP_PATH && screen -h $HISTORY -dmS nodered $INVOCATION"
     sleep 7
     if pgrep -u $USERNAME -f $SERVICE > /dev/null
     then
       echo "$SERVICE is now running."
     else<commit_msg>Update nodered-start-script.sh<commit_after> #!/bin/bash
 # /etc/init.d/nodered
 # version 0.3.9 2014-10-25 (YYYY-MM-DD)
 
 ### BEGIN INIT INFO
 # Provides:   nodered
 # Required-Start: $local_fs $remote_fs screen-cleanup
 # Required-Stop:  $local_fs $remote_fs
 # Should-Start:   $network
 # Should-Stop:    $network
 # Default-Start:  2 3 4 5
 # Default-Stop:   0 1 6
 # Short-Description:    Start nodered
 # Description:    Starts the NodeRED server
 ### END INIT INFO
 
 #Settings
 SERVICE='red.js'
 OPTIONS=''
 USERNAME='iot'
 APP_PATH="/home/$USERNAME/node-red"
 HISTORY=1024
 NODE_VERSION="0.10.9"
 NODE="/home/$USERNAME/.nvm/versions/node/v$NODE_VERSION/bin/node"
 INVOCATION="$NODE $SERVICE" 
 ME=`whoami`
 
 as_user() {
   if [ "$ME" = "$USERNAME" ] ; then
     bash -c "$1"
   else
     su - $USERNAME -c "$1"
   fi
 }
 
 my_start() {
   if  pgrep -u $USERNAME -f $SERVICE > /dev/null
   then
     echo "$SERVICE is already running!"
   else
     echo "Starting $SERVICE..."
     cd $APP_PATH
     as_user "cd $APP_PATH && screen -h $HISTORY -dmS nodered $INVOCATION"
     sleep 7
     if pgrep -u $USERNAME -f $SERVICE > /dev/null
     then
       echo "$SERVICE is now running."
     else
{'fraction_non_alphanumeric': 0.14453288646837034, 'fraction_numerical': 0.024298282362798494, 'mean_word_length': 2.7370892018779345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2467068', 'n_tokens_mistral': 927, 'n_tokens_neox': 880, 'n_words': 226}