<commit_before>#!/bin/bash

### If no id_rsa.pub key yet, create new one

auth_keys="/root/.ssh/id_rsa.pub"
if [ -f "$auth_keys" ]
then
    echo "$auth_keys found, so not generating new ones."
else
    echo "$auth_keys not found, generating new ones."
    cat /dev/zero | ssh-keygen -q -N ""
    #Copy new host key to authorized_keys (so isard-hypervisor can get it also)
    #This way no password needed.
    cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
fi

# Remove all isard-hypervisor lines from known_hosts
sed -i '/isard-hypervisor/d' /root/.ssh/known_hosts

echo "Checking for isard-hypervisor ssh..."

i=0
while ! nc -z isard-hypervisor 22; do   
  sleep 0.5
  ((i++))
  if [[ "$i" == '25' ]]; then
    break
  fi  
  echo "Checking for isard-hypervisor shh"
done

if [[ "$i" -ne '25' ]]; then
  echo "Adding isard-hypervisor keys"
  ssh-keyscan -T 10 isard-hypervisor > /root/.ssh/known_hosts
else
  echo "Assuming that there is no isard-hypervisor available"
fi <commit_msg>append isard-hyper instead of replacing<commit_after>#!/bin/bash

### If no id_rsa.pub key yet, create new one

auth_keys="/root/.ssh/id_rsa.pub"
if [ -f "$auth_keys" ]
then
    echo "$auth_keys found, so not generating new ones."
else
    echo "$auth_keys not found, generating new ones."
    cat /dev/zero | ssh-keygen -q -N ""
    #Copy new host key to authorized_keys (so isard-hypervisor can get it also)
    #This way no password needed.
    cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
fi

# Remove all isard-hypervisor lines from known_hosts
sed -i '/isard-hypervisor/d' /root/.ssh/known_hosts

echo "Checking for isard-hypervisor ssh..."

i=0
while ! nc -z isard-hypervisor 22; do   
  sleep 0.5
  ((i++))
  if [[ "$i" == '25' ]]; then
    break
  fi  
  echo "Checking for isard-hypervisor shh"
done

if [[ "$i" -ne '25' ]]; then
  echo "Adding isard-hypervisor keys"
  ssh-keyscan -T 10 isard-hypervisor >> /root/.ssh/known_hosts
else
  echo "Assuming that there is no isard-hypervisor available"
fi 
{'fraction_non_alphanumeric': 0.1294176207068193, 'fraction_numerical': 0.010950721752115481, 'mean_word_length': 3.152892561983471, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '877732', 'n_tokens_mistral': 763, 'n_tokens_neox': 718, 'n_words': 238}