<commit_before>#!/bin/bash
PUBLIC_KEY=~/.ssh/id_rsa.pub

if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
  echo -e "\nCopies SSH public key to the given Raspberry Pi host. Uses ~/.ssh/id_rsa.pub by default.\n"
  echo -e "Usage: $0 <host> [ssh-public-key-file]\n"
  exit 1
fi

HOST=$1

if [ "$2" != "" ]; then
  if [ ! -f "$2" ]; then
    echo "File not found: $2"
    exit 1
  else
    PUBLIC_KEY=$2
  fi
fi

ansible-playbook -k -i $HOST, setup.yml -e "ssh_public_key=$PUBLIC_KEY" -e ansible_ssh_user=pi<commit_msg>Remove offending key from known_hosts in firstrun.sh<commit_after>#!/bin/bash
PUBLIC_KEY=~/.ssh/id_rsa.pub

if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
  echo -e "\nCopies SSH public key to the given Raspberry Pi host. Uses ~/.ssh/id_rsa.pub by default.\n"
  echo -e "Usage: $0 <host> [ssh-public-key-file]\n"
  exit 1
fi

HOST=$1

if [ "$2" != "" ]; then
  if [ ! -f "$2" ]; then
    echo "File not found: $2"
    exit 1
  else
    PUBLIC_KEY=$2
  fi
fi

if grep -q $HOST ~/.ssh/known_hosts; then
  echo -e "\nRemoving $HOST from ~/.ssh/known_hosts..\n\n"
  ssh-keygen -R $HOST
fi

ansible-playbook -k -i $HOST, setup.yml -e "ssh_public_key=$PUBLIC_KEY" -e ansible_ssh_user=pi
{'fraction_non_alphanumeric': 0.17905405405405406, 'fraction_numerical': 0.016891891891891893, 'mean_word_length': 2.872549019607843, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5139193', 'n_tokens_mistral': 542, 'n_tokens_neox': 498, 'n_words': 143}