<commit_before>#!/usr/bin/env bash

# install opencv on travis build server
# uses cache to speed up install if generated build files are available

# install opencv dependencies
sudo apt-get -qq install build-essential
sudo apt-get -qq install libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

mkdir -p opencv-cache # make cache directory if not already available

if [ "$(ls -A opencv-cache)" ]; then
    echo "installing pre-build packages"
    find opencv-cache -maxdepth 1 -type f -name "*.deb" -exec sudo dpkg -i "{}" \;
    sudo apt-get -f install -y # fix dependencies
else
    echo "no packages available, building opencv"
    git clone https://github.com/opencv/opencv.git
    cd opencv
    git checkout 2.4.13
    mkdir build<commit_msg>set env variables for install script<commit_after>#!/usr/bin/env bash

# install opencv on travis build server
# uses cache to speed up install if generated build files are available

# install opencv dependencies
sudo apt-get -qq install build-essential
sudo apt-get -qq install libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

export CXX=g++
export CC=gcc

mkdir -p opencv-cache # make cache directory if not already available

if [ "$(ls -A opencv-cache)" ]; then
    echo "installing pre-build packages"
    find opencv-cache -maxdepth 1 -type f -name "*.deb" -exec sudo dpkg -i "{}" \;
    sudo apt-get -f install -y # fix dependencies
else
    echo "no packages available, building opencv"
    git clone https://github.com/opencv/opencv.git
    cd opencv
    git checkout 2.4.13
    mkdir build
{'fraction_non_alphanumeric': 0.0903954802259887, 'fraction_numerical': 0.008788449466415568, 'mean_word_length': 3.4401114206128134, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7186044', 'n_tokens_mistral': 530, 'n_tokens_neox': 478, 'n_words': 192}