<commit_before>#!/bin/bash -x

env

wait_state_running ()
{
echo "[$(date)] Waiting for running state ..."
MAX_TESTS=20
SLEEP_AMOUNT=10
OVER=0
TESTS=0
while [[ $OVER != 1 ]] && [[ $TESTS -le $MAX_TESTS ]]; do
  DESCRIPTION=$(ec2-api-tools/bin/ec2-describe-instances ${INSTANCE})
  PRIVATEIP=$(echo "$DESCRIPTION" | awk '{printf $15}')
  STATE_RAW=$(echo "$DESCRIPTION" | awk '{print $5}' | head -2)
  STATE=$(echo $STATE_RAW | sed 's/^\s*//')
  echo "[$(date)] $STATE"
  if [[ "$STATE" != "running" ]]; then
    OVER=0
    TESTS=$(echo $(( TESTS+=1 )))
    sleep $SLEEP_AMOUNT
  else
    OVER=1
  fi
done
}

wait_ping ()
{
echo "[$(date)] Waiting for ping ..."
MAX_TESTS=20
SLEEP_AMOUNT=10
OVER=0
TESTS=0
while [[ $OVER != 1  ]] && [[ $TESTS -le $MAX_TESTS ]]; do
  ping -c1 $PRIVATEIP
  if [[ $? == 0 ]]; then
    OVER=1<commit_msg>Modifying state check to account for eip.<commit_after>#!/bin/bash -x

env

wait_state_running ()
{
echo "[$(date)] Waiting for running state ..."
MAX_TESTS=20
SLEEP_AMOUNT=10
OVER=0
TESTS=0
while [[ $OVER != 1 ]] && [[ $TESTS -le $MAX_TESTS ]]; do
  DESCRIPTION=$(ec2-api-tools/bin/ec2-describe-instances ${INSTANCE})
  PRIVATEIP=$(echo "$DESCRIPTION" | awk '{printf $15}')
  STATE_RAW=$(echo "$DESCRIPTION" | awk '{print $5}' | head -2)
  STATE=$(echo $STATE_RAW | sed 's/^\s*//')

  if [[ "$STATE" == ip-* ]]; then
    STATE_RAW=$(echo "$DESCRIPTION" | awk '{print $6}' | head -2)
    STATE=$(echo $STATE_RAW | sed 's/^\s*//')
  fi

  echo "[$(date)] $STATE"
  if [[ "$STATE" != "running" ]]; then
    OVER=0
    TESTS=$(echo $(( TESTS+=1 )))
    sleep $SLEEP_AMOUNT
  else
    OVER=1
  fi
done
}

wait_ping ()
{
echo "[$(date)] Waiting for ping ..."
MAX_TESTS=20
SLEEP_AMOUNT=10
OVER=0
TESTS=0
while [[ $OVER != 1  ]] && [[ $TESTS -le $MAX_TESTS ]]; do
  ping -c1 $PRIVATEIP
  if [[ $? == 0 ]]; then
    OVER=1
{'fraction_non_alphanumeric': 0.21548456957227938, 'fraction_numerical': 0.029236599891716297, 'mean_word_length': 3.5742574257425743, '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': '3042397', 'n_tokens_mistral': 818, 'n_tokens_neox': 740, 'n_words': 179}