<commit_before>#!/bin/bash

set -e

export PATH='/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'

source /var/tmp/helpers/default.sh

readonly COMMON_FILES='/var/tmp/common'
readonly UBUNTU_RELEASE=$(detect_ubuntu_release)
readonly UBUNTU_VERSION=$(detect_ubuntu_version)
readonly AMAZON_EC2=$(detect_amazon_ec2 && echo 'true')

# Remove current Apt and DPKG overrides ...
rm -f /etc/apt/apt.conf.d/* \
      /etc/dpkg/dpkg.cfg.d/*

cat <<'EOF' > /etc/apt/apt.conf.d/99trustcdrom
APT
{
    Authentication
    {
        TrustCDROM "false":
    };
};
EOF

cat <<'EOF' > /etc/apt/apt.conf.d/99apt
APT
{
    Color "0";
    Install-Suggests "0";
    Install-Recommends "0";
    Clean-Installed "0";

    AutoRemove
    {
        SuggestsImportant "0";
    };

    Get
    {
        AllowUnauthenticated "0";
    };
};
EOF

cat <<EOF > /etc/apt/apt.conf.d/99vendor-ubuntu
Acquire
{
    Changelogs
    {
        AlwaysOnline "1";
    };
};
EOF

# Any Amazon EC2 instance can use local packages mirror, but quite often
# such mirrors are backed by an S3 buckets causing performance drop due
# to a known problem outside of the "us-east-1" region when using HTTP
# pipelining for more efficient downloads.
PIPELINE_DEPTH=5
if [[ -n $AMAZON_EC2 ]]; then
     PIPELINE_DEPTH=3
fi

cat <<EOF > /etc/apt/apt.conf.d/99apt-acquire
Acquire
{
    PDiffs "0";

    Retries "3";<commit_msg>Add missing single quotes in the heredoc.<commit_after>#!/bin/bash

set -e

export PATH='/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'

source /var/tmp/helpers/default.sh

readonly COMMON_FILES='/var/tmp/common'
readonly UBUNTU_RELEASE=$(detect_ubuntu_release)
readonly UBUNTU_VERSION=$(detect_ubuntu_version)
readonly AMAZON_EC2=$(detect_amazon_ec2 && echo 'true')

# Remove current Apt and DPKG overrides ...
rm -f /etc/apt/apt.conf.d/* \
      /etc/dpkg/dpkg.cfg.d/*

cat <<'EOF' > /etc/apt/apt.conf.d/99trustcdrom
APT
{
    Authentication
    {
        TrustCDROM "false":
    };
};
EOF

cat <<'EOF' > /etc/apt/apt.conf.d/99apt
APT
{
    Color "0";
    Install-Suggests "0";
    Install-Recommends "0";
    Clean-Installed "0";

    AutoRemove
    {
        SuggestsImportant "0";
    };

    Get
    {
        AllowUnauthenticated "0";
    };
};
EOF

cat <<'EOF' > /etc/apt/apt.conf.d/99vendor-ubuntu
Acquire
{
    Changelogs
    {
        AlwaysOnline "1";
    };
};
EOF

# Any Amazon EC2 instance can use local packages mirror, but quite often
# such mirrors are backed by an S3 buckets causing performance drop due
# to a known problem outside of the "us-east-1" region when using HTTP
# pipelining for more efficient downloads.
PIPELINE_DEPTH=5
if [[ -n $AMAZON_EC2 ]]; then
     PIPELINE_DEPTH=3
fi

cat <<EOF > /etc/apt/apt.conf.d/99apt-acquire
Acquire
{
    PDiffs "0";

    Retries "3";
{'fraction_non_alphanumeric': 0.1375, 'fraction_numerical': 0.017857142857142856, 'mean_word_length': 2.99002849002849, 'pattern_counts': {'":': 2, '<': 19, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '85392', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1039, 'n_words': 241}