<commit_before>set -e
# OpenCV dependencies - Details available at: http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html
sudo apt-get install -y build-essential
sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev

# Download v3.4.11 .zip file and extract.
curl -sL https://github.com/Itseez/opencv/archive/3.4.11.zip > opencv.zip
unzip opencv.zip
cd opencv-3.4.11<commit_msg>Added opencv installation script<commit_after>set -e
# OpenCV dependencies - Details available at: http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html
sudo apt-get install -y build-essential
sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev

# Download v3.4.11 .zip file and extract.
curl -sL https://github.com/Itseez/opencv/archive/3.4.11.zip > opencv.zip
unzip opencv.zip

cd opencv-3.4.11-beta

  # Create a new 'build' folder.
mkdir build_opencv
cd build_opencv

  # Set build instructions for Ubuntu distro.
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D ENABLE_PRECOMPILED_HEADERS=OFF ..

  # Run 'make' with four threads.
make -j4

  # Install to OS.
sudo make install

  # Add configuration to OpenCV to tell it where the library files are located on the file system (/usr/local/lib)
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'

sudo ldconfig
echo "OpenCV installed."
{'fraction_non_alphanumeric': 0.10021905805038335, 'fraction_numerical': 0.023548740416210297, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5967259', 'n_tokens_mistral': 710, 'n_tokens_neox': 656, 'n_words': 174}