<commit_before>---
  - name: Install Python 2.7 and Pip 2.7
    sudo: yes
    apt:  pkg={{ item }} state=latest
    with_items:
    - python
    - python-pip

  - name: Install virtualenv
    sudo: no
    shell: bash -c "pip install virtualenv"

  - name: Install virtualenvwrapper
    sudo: no
    shell: bash -c "pip install virtualenvwrapper"

  - name: Export BASH_PROFILE
    sudo: no
    shell: bash -c "export BASH_PROFILE=~/.bash_profile"

  - name: Configure virtualenvwrapper home directory
    sudo: no
    shell: bash -c "echo 'export WORKON_HOME=/vagrant/.venvs' >> $BASH_PROFILE"
    args:
      creates: /vagrant/.installed

  - name: Configure the virtualenvwrapper script path
    sudo: no
    shell: bash -c "echo 'source $(which virtualenvwrapper.sh)' >> $BASH_PROFILE"
    args:
      creates: /vagrant/.installed

  - name: Source the shell environment
    sudo: no
    shell: bash -c "source $BASH_PROFILE"

  - name: Setup the project path variable
    sudo: no
    shell: bash -c "export project_path=/vagrant/application/web"

  - name: create virtual environment|bind project|cd into project|activate virtual environment
    sudo: no
    shell: bash -c "mkvirtualenv -a $project_path -p $(which python) web"
    args:
      creates: /vagrant/.installed

  - name: Setup the project path variable
    sudo: no
    shell: bash -c "touch /vagrant/.installed"
    args:
      creates: /vagrant/.installed


<commit_msg>idempotent ansible shell tasks<commit_after>---
  - name: Install Python 2.7 and Pip 2.7
    sudo: yes
    apt:  pkg={{ item }} state=latest
    with_items:
    - python
    - python-pip

  - name: Install virtualenv
    sudo: no
    shell: bash -c "pip install virtualenv"

  - name: Install virtualenvwrapper
    sudo: no
    shell: bash -c "pip install virtualenvwrapper"

  - name: Export BASH_PROFILE
    sudo: no
    shell: bash -c "export BASH_PROFILE=~/.bash_profile"

  - name: Configure virtualenvwrapper home directory
    sudo: no
    shell: bash -c "echo 'export WORKON_HOME=/vagrant/.venvs' >> $BASH_PROFILE"
    args:
      creates: /vagrant/.installed

  - name: Configure the virtualenvwrapper script path
    sudo: no
    shell: bash -c "echo 'source $(which virtualenvwrapper.sh)' >> $BASH_PROFILE"
    args:
      creates: /vagrant/.installed

  - name: Source the shell environment
    sudo: no
    shell: bash -c "source $BASH_PROFILE"

  - name: Setup the project path variable
    sudo: no
    shell: bash -c "export project_path=/vagrant/application/web"

  - name: create virtual environment|bind project|cd into project|activate virtual environment
    sudo: no
    shell: bash -c "mkvirtualenv -a $project_path -p $(which python) web"
    args:
      creates: /vagrant/.installed

  - name: Create the guard file to make this playbooks steps idempotent
    sudo: no
    shell: bash -c "touch /vagrant/.installed"
    args:
      creates: /vagrant/.installed



{'fraction_non_alphanumeric': 0.09832707408671902, 'fraction_numerical': 0.0027313076135199728, 'mean_word_length': 2.7904269081500646, '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': '3933897', 'n_tokens_mistral': 999, 'n_tokens_neox': 914, 'n_words': 308}