text:
function add_build_args_for_remote_install() {
    # entrypoint is used as AIRFLOW_SOURCES_FROM/TO in order to avoid costly copying of all sources of
    # Airflow - those are not needed for remote install at all. Entrypoint is later overwritten by
    # ENTRYPOINT_FILE - downloaded entrypoint.sh so this is only for the purpose of iteration on Dockerfile
    EXTRA_DOCKER_PROD_BUILD_FLAGS+=(
        "--build-arg" "AIRFLOW_SOURCES_FROM=entrypoint.sh"
        "--build-arg" "AIRFLOW_SOURCES_TO=/entrypoint"
    )
    if [[ ${AIRFLOW_VERSION} =~ [^0-9]*1[^0-9]*10[^0-9]([0-9]*) ]]; then
        # All types of references/versions match this regexp for 1.10 series
        # for example v1_10_test, 1.10.10, 1.10.9 etc. ${BASH_REMATCH[1]} is the () group matches last
        # minor digit of version and it's length is 0 for v1_10_test, 1 for 1.10.9 and 2 for 1.10.10+
        if [[ ${#BASH_REMATCH[1]} == "1" ]]; then
            # This is only for 1.10.0 - 1.10.9
            EXTRA_DOCKER_PROD_BUILD_FLAGS+=(
                "--build-arg" "CONSTRAINT_REQUIREMENTS=https://raw.githubusercontent.com/apache/airflow/1.10.10/requirements/requirements-python${PYTHON_MAJOR_MINOR_VERSION}.txt"
                "--build-arg" "ENTRYPOINT_FILE=https://raw.githubusercontent.com/apache/airflow/1.10.10/entrypoint.sh"
            )
        else
            EXTRA_DOCKER_PROD_BUILD_FLAGS+=(
                # For 1.10.10+ and v1-10-test it's ok to use AIRFLOW_VERSION as reference
                "--build-arg" "CONSTRAINT_REQUIREMENTS=https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_VERSION}/requirements/requirements-python${PYTHON_MAJOR_MINOR_VERSION}.txt"
                "--build-arg" "ENTRYPOINT_FILE=https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_VERSION}/entrypoint.sh"
            )
        fi
    else
        # For all other (master, 2.0+) we just match ${AIRFLOW_VERSION}
        EXTRA_DOCKER_PROD_BUILD_FLAGS+=(
            "--build-arg" "CONSTRAINT_REQUIREMENTS=https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_VERSION}/requirements/requirements-python${PYTHON_MAJOR_MINOR_VERSION}.txt"
            "--build-arg" "ENTRYPOINT_FILE=https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_VERSION}/entrypoint.sh"
        )
    fi
}

# Retrieves version of airflow stored in the production image (used to display the actual
# Version we use if it was build from PyPI or GitHub
function get_airflow_version_from_production_image() {
     docker run --entrypoint /bin/bash "${AIRFLOW_PROD_IMAGE}" -c 'echo "${AIRFLOW_VERSION}"'
}

# Removes the "Forced answer" (yes/no/quit) given previously, unless you specifically want to remember it.
#
# This is the default behaviour of all rebuild scripts to ask independently whether you want to
# rebuild the image or not. Sometimes however we want to remember answer previously given. For
# example if you answered "no" to rebuild the image, the assumption is that you do not
# want to rebuild image also for other rebuilds in the same pre-commit execution.
#
# All the pre-commit checks therefore have `export REMEMBER_LAST_ANSWER="true"` set
# So that in case they are run in a sequence of commits they will not rebuild. Similarly if your most
# recent answer was "no" and you run `pre-commit run mypy` (for example) it will also reuse the
# "no" answer given previously. This happens until you run any of the breeze commands or run all
# precommits `pre-commit run` - then the "LAST_FORCE_ANSWER_FILE" will be removed and you will
# be asked again.
function forget_last_answer() {
    if [[ ${REMEMBER_LAST_ANSWER:="false"} != "true" ]]; then
        print_info
        print_info "Forgetting last answer from ${LAST_FORCE_ANSWER_FILE}:"
        print_info
        rm -f "${LAST_FORCE_ANSWER_FILE}"
    else
        if [[ -f "${LAST_FORCE_ANSWER_FILE}" ]]; then
            print_info
            print_info "Still remember last answer from ${LAST_FORCE_ANSWER_FILE}:"
            print_info "$(cat "${LAST_FORCE_ANSWER_FILE}")"
            print_info
        fi
    fi
}

# Confirms if hte image should be rebuild and interactively checks it with the user.
# In case iit needs to be rebuild. It only ask the user if it determines that the rebuild
# is needed and that the rebuild is not already forced. It asks the user using available terminals
# So that the script works also from within pre-commit run via git hooks - where stdin is not
# available - it tries to find usable terminal and ask the user via this terminal.
function confirm_image_rebuild() {
    ACTION="rebuild"
    if [[ ${FORCE_PULL_IMAGES:=} == "true" ]]; then
        ACTION="pull and rebuild"
    fi
    if [[ -f "${LAST_FORCE_ANSWER_FILE}" ]]; then
        # set variable from last answered response given in the same pre-commit run - so that it can be
        # answered in teh first pre-commit check (build) and then used in another (pylint/mypy/flake8 etc).
        # shellcheck disable=SC1090
        source "${LAST_FORCE_ANSWER_FILE}"
    fi
    set +e
    local RES
    if [[ ${CI:="false"} == "true" ]]; then
        print_info
        print_info "CI environment - forcing rebuild for image ${THE_IMAGE_TYPE}."
        print_info
        RES="0"
    elif [[ -n "${FORCE_ANSWER_TO_QUESTIONS:=""}" ]]; then
        print_info
        print_info "Forcing answer '${FORCE_ANSWER_TO_QUESTIONS}'"
        print_info
        case "${FORCE_ANSWER_TO_QUESTIONS}" in
            [yY][eE][sS]|[yY])
                RES="0" ;;
            [qQ][uU][iI][tT]|[qQ])
                RES="2" ;;
            *)
                RES="1" ;;
        esac
    elif [[ -t 0 ]]; then
        # Check if this script is run interactively with stdin open and terminal attached
        "${AIRFLOW_SOURCES}/confirm" "${ACTION} image ${THE_IMAGE_TYPE}-python${PYTHON_MAJOR_MINOR_VERSION}"
        RES=$?
    elif [[ ${DETECTED_TERMINAL:=$(tty)} != "not a tty" ]]; then
        # Make sure to use output of tty rather than stdin/stdout when available - this way confirm
        # will works also in case of pre-commits (git does not pass stdin/stdout to pre-commit hooks)
        # shellcheck disable=SC2094
        "${AIRFLOW_SOURCES}/confirm" "${ACTION} image ${THE_IMAGE_TYPE}-python${PYTHON_MAJOR_MINOR_VERSION}" \
            <"${DETECTED_TERMINAL}" >"${DETECTED_TERMINAL}"
        RES=$?
        export DETECTED_TERMINAL
    elif [[ -c /dev/tty ]]; then
        export DETECTED_TERMINAL=/dev/tty
        # Make sure to use /dev/tty first rather than stdin/stdout when available - this way confirm
        # will works also in case of pre-commits (git does not pass stdin/stdout to pre-commit hooks)
        # shellcheck disable=SC2094
        "${AIRFLOW_SOURCES}/confirm" "${ACTION} image ${THE_IMAGE_TYPE}-python${PYTHON_MAJOR_MINOR_VERSION}" \
            <"${DETECTED_TERMINAL}" >"${DETECTED_TERMINAL}"
        RES=$?
    else
        print_info
        print_info "No terminal, no stdin - quitting"
        print_info
        # No terminal, no stdin, no force answer - quitting!
        RES="2"
    fi
    set -e
    if [[ ${RES} == "1" ]]; then
        print_info
        print_info "Skipping rebuilding the image ${THE_IMAGE_TYPE}-python${PYTHON_MAJOR_MINOR_VERSION}"
        print_info
        export SKIP_REBUILD="true"
        # Force "no" also to subsequent questions so that if you answer it once, you are not asked
        # For all other pre-commits and you will continue using the images you already have
        export FORCE_ANSWER_TO_QUESTIONS="no"
        echo 'export FORCE_ANSWER_TO_QUESTIONS="no"' > "${LAST_FORCE_ANSWER_FILE}"
    elif [[ ${RES} == "2" ]]; then
        echo >&2
        echo >&2 "ERROR: The ${THE_IMAGE_TYPE} needs to be rebuilt - it is outdated. "
        echo >&2 "   Make sure you build the images bu running"
        echo >&2
        echo >&2 "      ./breeze --python ${PYTHON_MAJOR_MINOR_VERSION}" build-image
        echo >&2
        echo >&2 "   If you run it via pre-commit as individual hook, you can run 'pre-commit run build'."
        echo >&2
        exit 1
    else
        # Force "yes" also to subsequent questions
        export FORCE_ANSWER_TO_QUESTIONS="yes"
    fi
}

# Builds local image manifest
# It contains only one .json file - result of docker inspect - describing the image
# We cannot use docker registry APIs as they are available only with authorisation
# But this image can be pulled without authentication
function build_ci_image_manifest() {
    verbose_docker inspect "${AIRFLOW_CI_IMAGE}" > "manifests/${AIRFLOW_CI_BASE_TAG}.json"
    verbose_docker build \
    --build-arg AIRFLOW_CI_BASE_TAG="${AIRFLOW_CI_BASE_TAG}" \
    --tag="${AIRFLOW_CI_LOCAL_MANIFEST_IMAGE}" \
    -f- . <<EOF
ARG AIRFLOW_CI_BASE_TAG
FROM scratch

COPY "manifests/${AIRFLOW_CI_BASE_TAG}.json" .

CMD ""
EOF
}

#
# Retrieves information about layers in the local IMAGE
# it stores list of SHAs of image layers in the file pointed at by TMP_MANIFEST_LOCAL_SHA
#
function get_local_image_info() {
    TMP_MANIFEST_LOCAL_JSON=$(mktemp)
    TMP_MANIFEST_LOCAL_SHA=$(mktemp)
    set +e
    # Remove the container just in case
    verbose_docker rm --force "local-airflow-manifest"  >/dev/null 2>&1
    # Create manifest from the local manifest image
    if ! verbose_docker create --name "local-airflow-manifest" \
        "${AIRFLOW_CI_LOCAL_MANIFEST_IMAGE}"  >/dev/null 2>&1 ; then
        echo
        echo "Local manifest image not available"
        echo
        LOCAL_MANIFEST_IMAGE_UNAVAILABLE="true"
        return
    fi
    set -e
     # Create manifest from the local manifest image
    verbose_docker cp "local-airflow-manifest:${AIRFLOW_CI_BASE_TAG}.json" "${TMP_MANIFEST_LOCAL_JSON}" >/dev/null 2>&1
    sed 's/ *//g' "${TMP_MANIFEST_LOCAL_JSON}" | grep '^"sha256:' >"${TMP_MANIFEST_LOCAL_SHA}"
    verbose_docker rm --force "local-airflow-manifest" >/dev/null 2>&1
}

#
# Retrieves information about layers in the remote IMAGE
# it stores list of SHAs of image layers in the file pointed at by TMP_MANIFEST_REMOTE_SHA
# This cannot be done easily with existing APIs of Dockerhub because they require additional authentication
# even for public images. Therefore instead we are downloading a specially prepared manifest image
# which is built together with the main image. This special manifest image is prepared during
# building of the main image and contains single JSON file being result of docker inspect on that image
# This image is from scratch so it is very tiny
function get_remote_image_info() {
    set +e
    # Pull remote manifest image
    if ! verbose_docker pull "${AIRFLOW_CI_REMOTE_MANIFEST_IMAGE}" >/dev/null; then
        echo
        echo "Remote docker registry unreachable"
        echo
        REMOTE_DOCKER_REGISTRY_UNREACHABLE="true"
        return
    fi
    set -e

    # Docker needs the file passed to --cidfile to not exist, so we can't use mktemp
    TMP_CONTAINER_ID="remote-airflow-manifest-$$.container_id"
    FILES_TO_CLEANUP_ON_EXIT+=("$TMP_CONTAINER_ID")

    TMP_MANIFEST_REMOTE_JSON=$(mktemp)
    TMP_MANIFEST_REMOTE_SHA=$(mktemp)
    # Create container out of the manifest image without running it
    verbose_docker create --cidfile "${TMP_CONTAINER_ID}" "${AIRFLOW_CI_REMOTE_MANIFEST_IMAGE}"
    # Extract manifest and store it in local file
    verbose_docker cp "$(cat "${TMP_CONTAINER_ID}"):${AIRFLOW_CI_BASE_TAG}.json" "${TMP_MANIFEST_REMOTE_JSON}"
    # Filter everything except SHAs of image layers
    sed 's/ *//g' "${TMP_MANIFEST_REMOTE_JSON}" | grep '^"sha256:' >"${TMP_MANIFEST_REMOTE_SHA}"
    verbose_docker rm --force "$( cat "${TMP_CONTAINER_ID}")"
}

# The Number determines the cut-off between local building time and pull + build time.
# It is a bit experimental and it will have to be kept
# updated as we keep on changing layers. The cut-off point is at the moment when we do first
# pip install "https://github.com/apache/airflow/archive/${AIRFLOW_BRANCH}.tar...
# you can get it via this command:
# docker history --no-trunc  apache/airflow:master-python3.6-ci | \
#      grep ^sha256 | grep -n "pip uninstall" | awk 'BEGIN {FS=":"} {print $1 }'
#
# This command returns the number of layer in docker history where pip uninstall is called. This is the
# line that will take a lot of time to run and at this point it's worth to pull the image from repo
# if there are at least NN changed layers in your docker file, you should pull the image.
#
# Note that this only matters if you have any of the important files changed since the last build
# of your image such as Dockerfile.ci, setup.py etc.
#
MAGIC_CUT_OFF_NUMBER_OF_LAYERS=34

# Compares layers from both remote and local image and set FORCE_PULL_IMAGES to true in case
# More than the last NN layers are different.
function compare_layers() {
    NUM_DIFF=$(diff  -y --suppress-common-lines "${TMP_MANIFEST_REMOTE_SHA}" "${TMP_MANIFEST_LOCAL_SHA}" | \
        wc -l || true)
    rm -f "${TMP_MANIFEST_REMOTE_JSON}" "${TMP_MANIFEST_REMOTE_SHA}" "${TMP_MANIFEST_LOCAL_JSON}" "${TMP_MANIFEST_LOCAL_SHA}"
    echo
    echo "Number of layers different between the local and remote image: ${NUM_DIFF}"
    echo
    # This is where setup py is rebuilt - it will usually take a looooot of time to build it, so it is
    # Better to pull here
    if (( NUM_DIFF >= MAGIC_CUT_OFF_NUMBER_OF_LAYERS )); then
        echo
        echo
        echo "WARNING! Your image and the dockerhub image differ significantly"
        echo
        echo "Forcing pulling the images. It will be faster than rebuilding usually."
        echo "You can avoid it by setting SKIP_CHECK_REMOTE_IMAGE to true"
        echo
        export FORCE_PULL_IMAGES="true"
    else
        echo
        echo "No need to pull the image. Local rebuild will be faster"
        echo
    fi
}

# Prints summary of the build parameters
function print_build_info() {
    print_info
    print_info "Airflow ${AIRFLOW_VERSION} Python: ${PYTHON_MAJOR_MINOR_VERSION}. Image description: ${IMAGE_DESCRIPTION}"
    print_info
}

# Retrieves CI environment variables needed - depending on the CI system we run it in.
# We try to be CI - agnostic and our scripts should run the same way on different CI systems
# (This makes it easy to move between different CI systems)
# This function maps CI-specific variables into a generic ones (prefixed with CI_) that
# we used in other scripts
function get_ci_environment() {
    export CI_EVENT_TYPE="manual"
    export CI_TARGET_REPO="apache/airflow"
    export CI_TARGET_BRANCH="master"
    export CI_SOURCE_REPO="apache/airflow"
    export CI_SOURCE_BRANCH="master"
    export CI_BUILD_ID="default-build-id"
    export CI_JOB_ID="default-job-id"
    if [[ ${CI:=} != "true" ]]; then
        echo
        echo "This is not a CI environment!. Staying with the defaults"
        echo
    else
        if [[ ${TRAVIS:=} == "true" ]]; then
            export CI_TARGET_REPO="${TRAVIS_REPO_SLUG}"
            export CI_TARGET_BRANCH="${TRAVIS_BRANCH}"
            export CI_BUILD_ID="${TRAVIS_BUILD_ID}"
            export CI_JOB_ID="${TRAVIS_JOB_ID}"
            if [[ "${TRAVIS_PULL_REQUEST:=}" == "true" ]]; then
                export CI_EVENT_TYPE="pull_request"
                export CI_SOURCE_REPO="${TRAVIS_PULL_REQUEST_SLUG}"
                export CI_SOURCE_BRANCH="${TRAVIS_PULL_REQUEST_BRANCH}"
            elif [[ "${TRAVIS_EVENT_TYPE:=}" == "cron" ]]; then
                export CI_EVENT_TYPE="schedule"
            else
                export CI_EVENT_TYPE="push"
            fi
        elif [[ ${GITHUB_ACTIONS:=} == "true" ]]; then
            export CI_TARGET_REPO="${GITHUB_REPOSITORY}"
            export CI_TARGET_BRANCH="${GITHUB_BASE_REF}"
            export CI_BUILD_ID="${GITHUB_RUN_ID}"
            export CI_JOB_ID="${GITHUB_JOB}"
            if [[ ${GITHUB_EVENT_NAME:=} == "pull_request" ]]; then
                export CI_EVENT_TYPE="pull_request"
                # default name of the source repo (assuming it's forked without rename)
                export SOURCE_AIRFLOW_REPO=${SOURCE_AIRFLOW_REPO:="airflow"}
                # For Pull Requests it's ambiguous to find the PR and we need to
                # assume that name of repo is airflow but it could be overridden in case it's not
                export CI_SOURCE_REPO="${GITHUB_ACTOR}/${SOURCE_AIRFLOW_REPO}"
                export CI_SOURCE_BRANCH="${GITHUB_HEAD_REF}"
                BRANCH_EXISTS=$(git ls-remote --heads \
                    "https://github.com/${CI_SOURCE_REPO}.git" "${CI_SOURCE_BRANCH}" || true)
                if [[ ${BRANCH_EXISTS} == "" ]]; then
                    echo
                    echo "https://github.com/${CI_SOURCE_REPO}.git Branch ${CI_SOURCE_BRANCH} does not exist"
                    echo
                    echo
                    echo "Fallback to https://github.com/${CI_TARGET_REPO}.git Branch ${CI_TARGET_BRANCH}"
                    echo
                    # Fallback to the target repository if the repo does not exist
                    export CI_SOURCE_REPO="${CI_TARGET_REPO}"
                    export CI_SOURCE_BRANCH="${CI_TARGET_BRANCH}"
                fi
            elif [[ ${GITHUB_EVENT_TYPE:=} == "schedule" ]]; then
                export CI_EVENT_TYPE="schedule"
            else
                export CI_EVENT_TYPE="push"
            fi
        else
            echo
            echo "ERROR! Unknown CI environment. Exiting"
            exit 1
        fi
    fi
    echo
    echo "Detected CI build environment"
    echo
    echo "CI_EVENT_TYPE=${CI_EVENT_TYPE}"
    echo "CI_TARGET_REPO=${CI_TARGET_REPO}"
    echo "CI_TARGET_BRANCH=${CI_TARGET_BRANCH}"
    echo "CI_SOURCE_REPO=${CI_SOURCE_REPO}"
    echo "CI_SOURCE_BRANCH=${CI_SOURCE_BRANCH}"
    echo "CI_BUILD_ID=${CI_BUILD_ID}"
    echo "CI_JOB_ID=${CI_JOB_ID}"
    echo
}

# Prepares all variables needed by the CI build. Depending on the configuration used (python version
# DockerHub user etc. the variables are set so that other functions can use those variables.
function prepare_ci_build() {
    export AIRFLOW_CI_BASE_TAG="${DEFAULT_BRANCH}-python${PYTHON_MAJOR_MINOR_VERSION}-ci"
    export AIRFLOW_CI_LOCAL_MANIFEST_IMAGE="local/${DOCKERHUB_REPO}:${AIRFLOW_CI_BASE_TAG}-manifest"
    export AIRFLOW_CI_REMOTE_MANIFEST_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${AIRFLOW_CI_BASE_TAG}-manifest"
    export AIRFLOW_CI_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${AIRFLOW_CI_BASE_TAG}"
    if [[ ${ENABLE_REGISTRY_CACHE="false"} == "true" ]]; then
        if [[ ${CACHE_REGISTRY_PASSWORD:=} != "" ]]; then
            echo "${CACHE_REGISTRY_PASSWORD}" | docker login \
                --username "${CACHE_REGISTRY_USERNAME}" \
                --password-stdin \
                "${CACHE_REGISTRY}"
        fi
        export CACHE_IMAGE_PREFIX=${CACHE_IMAGE_PREFX:=${GITHUB_ORGANISATION}/${GITHUB_REPO}}
        export CACHED_AIRFLOW_CI_IMAGE="${CACHE_REGISTRY}/${CACHE_IMAGE_PREFIX}/${AIRFLOW_CI_BASE_TAG}"
        export CACHED_PYTHON_BASE_IMAGE="${CACHE_REGISTRY}/${CACHE_IMAGE_PREFIX}/python:${PYTHON_MAJOR_MINOR_VERSION}-slim-buster"
    else
        export CACHED_AIRFLOW_CI_IMAGE=""
        export CACHED_PYTHON_BASE_IMAGE=""
    fi
    export AIRFLOW_BUILD_CI_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}/${AIRFLOW_CI_BASE_TAG}"
    export AIRFLOW_CI_IMAGE_DEFAULT="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${DEFAULT_BRANCH}-ci"
    export PYTHON_BASE_IMAGE="python:${PYTHON_MAJOR_MINOR_VERSION}-slim-buster"
    export BUILT_IMAGE_FLAG_FILE="${BUILD_CACHE_DIR}/${BRANCH_NAME}/.built_${PYTHON_MAJOR_MINOR_VERSION}"
    if [[ "${DEFAULT_PYTHON_MAJOR_MINOR_VERSION}" == "${PYTHON_MAJOR_MINOR_VERSION}" ]]; then
        export DEFAULT_IMAGE="${AIRFLOW_CI_IMAGE_DEFAULT}"
    else
        export DEFAULT_IMAGE=""
    fi
    export THE_IMAGE_TYPE="CI"
    export IMAGE_DESCRIPTION="Airflow CI"
    export AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD="true"
    export AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS:="${DEFAULT_CI_EXTRAS}"}"
    export ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS:=""}"
    export ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS:=""}"
    export AIRFLOW_IMAGE="${AIRFLOW_CI_IMAGE}"
    go_to_airflow_sources
    fix_group_permissions
}

# Only rebuilds CI image if needed. It checks if the docker image build is needed
# because any of the important source files (from common/_files_for_rebuild_check.sh) has
# changed or in any of the edge cases (docker image removed, .build cache removed etc.
# In case rebuild is needed, it determines (by comparing layers in local and remote image)
# Whether pull is needed before rebuild.
function rebuild_ci_image_if_needed() {
    if [[ ${SKIP_CI_IMAGE_CHECK:="false"} == "true" ]]; then
        echo
        echo "Skip checking CI image"
        echo
        return
    fi
    if [[ -f "${BUILT_IMAGE_FLAG_FILE}" ]]; then
        print_info
        print_info "${THE_IMAGE_TYPE} image already built locally."
        print_info
    else
        print_info
        print_info "${THE_IMAGE_TYPE} image not built locally: pulling and building"
        print_info
        export FORCE_PULL_IMAGES="true"
        export FORCE_BUILD_IMAGES="true"
    fi

    NEEDS_DOCKER_BUILD="false"
    check_if_docker_build_is_needed
    if [[ ${NEEDS_DOCKER_BUILD} == "true" ]]; then
        if [[ ${SKIP_CHECK_REMOTE_IMAGE:=} != "true" && ${DOCKER_CACHE} == "pulled" ]]; then
            # Check if remote image is different enough to force pull
            # This is an optimisation pull vs. build time. When there
            # are enough changes (specifically after setup.py changes) it is faster to pull
            # and build the image rather than just build it
            echo
            echo "Checking if the remote image needs to be pulled"
            echo
            get_remote_image_info
            if [[ ${REMOTE_DOCKER_REGISTRY_UNREACHABLE:=} != "true" ]]; then
                get_local_image_info
                if [[ ${LOCAL_MANIFEST_IMAGE_UNAVAILABLE:=} != "true" ]]; then
                    compare_layers
                else
                    FORCE_PULL_IMAGES="true"
                fi
            fi
        fi
        SKIP_REBUILD="false"
        if [[ ${CI:=} != "true" && "${FORCE_BUILD:=}" != "true" ]]; then
            confirm_image_rebuild
        fi
        if [[ ${SKIP_REBUILD} != "true" ]]; then
            SYSTEM=$(uname -s)
            if [[ ${SYSTEM} != "Darwin" ]]; then
                ROOT_FILES_COUNT=$(find "airflow" "tests" -user root | wc -l | xargs)
                if [[ ${ROOT_FILES_COUNT} != "0" ]]; then
                    ./scripts/ci/ci_fix_ownership.sh
                fi
            fi
            print_info
            print_info "Build start: ${THE_IMAGE_TYPE} image."
            print_info
            build_ci_image
            update_all_md5_files
            build_ci_image_manifest
            print_info
            print_info "Build completed: ${THE_IMAGE_TYPE} image."
            print_info
        fi
    else
        print_info
        print_info "No need to build - none of the important files changed: ${FILES_FOR_REBUILD_CHECK[*]}"
        print_info
    fi
}

# Interactive version of confirming the ci image that is used in pre-commits
# it displays additional information - what the user should do in order to bring the local images
# back to state that pre-commit will be happy with
function rebuild_ci_image_if_needed_and_confirmed() {
    NEEDS_DOCKER_BUILD="false"
    THE_IMAGE_TYPE="CI"

    check_if_docker_build_is_needed

    if [[ ${NEEDS_DOCKER_BUILD} == "true" ]]; then
        print_info
        print_info "Docker image build is needed!"
        print_info
    else
        print_info
        print_info "Docker image build is not needed!"
        print_info
    fi

    if [[ "${NEEDS_DOCKER_BUILD}" == "true" ]]; then
        echo
        echo "Some of your images need to be rebuild because important files (like package list) has changed."
        echo
        echo "You have those options:"
        echo "   * Rebuild the images now by answering 'y' (this might take some time!)"
        echo "   * Skip rebuilding the images and hope changes are not big (you will be asked again)"
        echo "   * Quit and manually rebuild the images using one of the following commands"
        echo "        * ./breeze build-image"
        echo "        * ./breeze build-image --force-pull-images"
        echo
        echo "   The first command works incrementally from your last local build."
        echo "   The second command you use if you want to completely refresh your images from dockerhub."
        echo
        SKIP_REBUILD="false"
        confirm_image_rebuild

        if [[ ${SKIP_REBUILD} != "true" ]]; then
            rebuild_ci_image_if_needed
        fi
    fi
}

# Builds the CI image in the CI environment.
# Depending on the type of build (push/pr/scheduled) it will either build it incrementally or
# from the scratch without cache (the latter for scheduled builds only)
function build_ci_image_on_ci() {
    get_ci_environment

    # In case of CRON jobs we run builds without cache and upgrade to latest requirements
    if [[ "${CI_EVENT_TYPE:=}" == "schedule" ]]; then
        echo
        echo "Disabling cache for scheduled jobs"
        echo
        export DOCKER_CACHE="no-cache"
        echo
        echo "Requirements are upgraded to latest while running Docker build"
        echo
        export UPGRADE_TO_LATEST_REQUIREMENTS="true"
    fi

    prepare_ci_build

    rm -rf "${BUILD_CACHE_DIR}"
    mkdir -pv "${BUILD_CACHE_DIR}"

    rebuild_ci_image_if_needed

    # Disable force pulling forced above this is needed for the subsequent scripts so that
    # They do not try to pull/build images again
    unset FORCE_PULL_IMAGES
    unset FORCE_BUILD
}

# Builds CI image - depending on the caching strategy (pulled, local, no-cache) it
# passes the necessary docker build flags via DOCKER_CACHE_CI_DIRECTIVE array
# it also passes the right Build args depending on the configuration of the build
# selected by Breeze flags or environment variables.
function build_ci_image() {
    print_build_info
    if [[ -n ${DETECTED_TERMINAL:=""} ]]; then
        echo -n "Preparing ${AIRFLOW_CI_IMAGE}.
        " > "${DETECTED_TERMINAL}"
        spin "${OUTPUT_LOG}" &
        SPIN_PID=$!
        # shellcheck disable=SC2064
        trap "kill ${SPIN_PID}" SIGINT SIGTERM
    fi
    pull_ci_image_if_needed

    if [[ "${DOCKER_CACHE}" == "no-cache" ]]; then
        export DOCKER_CACHE_CI_DIRECTIVE=("--no-cache")
    elif [[ "${DOCKER_CACHE}" == "local" ]]; then
        export DOCKER_CACHE_CI_DIRECTIVE=()
    elif [[ "${DOCKER_CACHE}" == "pulled" ]]; then
        export DOCKER_CACHE_CI_DIRECTIVE=(
            "--cache-from" "${AIRFLOW_CI_IMAGE}"
        )
    else
        echo >&2
        echo >&2 "Error - thee ${DOCKER_CACHE} cache is unknown!"
        echo >&2
        exit 1
    fi
    if [[ -n ${DETECTED_TERMINAL:=""} ]]; then
        echo -n "
Docker building ${AIRFLOW_CI_IMAGE}.
" > "${DETECTED_TERMINAL}"
    fi
    set +u
    verbose_docker build \
        --build-arg PYTHON_BASE_IMAGE="${PYTHON_BASE_IMAGE}" \
        --build-arg PYTHON_MAJOR_MINOR_VERSION="${PYTHON_MAJOR_MINOR_VERSION}" \
            --build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
        --build-arg AIRFLOW_BRANCH="${BRANCH_NAME}" \
        --build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \
        --build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \
        --build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \
        --build-arg AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD="${AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD}" \
        --build-arg UPGRADE_TO_LATEST_REQUIREMENTS="${UPGRADE_TO_LATEST_REQUIREMENTS}" \
        "${DOCKER_CACHE_CI_DIRECTIVE[@]}" \
        -t "${AIRFLOW_CI_IMAGE}" \
        --target "main" \
        . -f Dockerfile.ci | tee -a "${OUTPUT_LOG}"
    set -u
    if [[ -n "${DEFAULT_IMAGE:=}" ]]; then
        verbose_docker tag "${AIRFLOW_CI_IMAGE}" "${DEFAULT_IMAGE}" | tee -a "${OUTPUT_LOG}"
    fi
    if [[ -n ${SPIN_PID:=""} ]]; then
        kill "${SPIN_PID}" || true
        wait "${SPIN_PID}" || true
        echo > "${DETECTED_TERMINAL}"
    fi
}

# Prepares all variables needed by the CI build. Depending on the configuration used (python version
# DockerHub user etc. the variables are set so that other functions can use those variables.
function prepare_prod_build() {
    export AIRFLOW_PROD_BASE_TAG="${DEFAULT_BRANCH}-python${PYTHON_MAJOR_MINOR_VERSION}"
    export AIRFLOW_PROD_BUILD_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${AIRFLOW_PROD_BASE_TAG}-build"
    export AIRFLOW_PROD_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${AIRFLOW_PROD_BASE_TAG}"
    export AIRFLOW_PROD_IMAGE_DEFAULT="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${DEFAULT_BRANCH}"
    export PYTHON_BASE_IMAGE="python:${PYTHON_MAJOR_MINOR_VERSION}-slim-buster"
    if [[ "${DEFAULT_PYTHON_MAJOR_MINOR_VERSION}" == "${PYTHON_MAJOR_MINOR_VERSION}" ]]; then
        export DEFAULT_IMAGE="${AIRFLOW_PROD_IMAGE_DEFAULT}"
    else
        export DEFAULT_IMAGE=""
    fi
    export THE_IMAGE_TYPE="PROD"
    export IMAGE_DESCRIPTION="Airflow production"
    export AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS:="${DEFAULT_PROD_EXTRAS}"}"
    export ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS:=""}"
    export ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS:=""}"
    export AIRFLOW_IMAGE="${AIRFLOW_PROD_IMAGE}"

    if [[ ${ENABLE_REGISTRY_CACHE="false"} == "true" ]]; then
        if [[ ${CACHE_REGISTRY_PASSWORD:=} != "" ]]; then
            echo "${CACHE_REGISTRY_PASSWORD}" | docker login \
                --username "${CACHE_REGISTRY_USERNAME}" \
                --password-stdin \
                "${CACHE_REGISTRY}"
        fi
        export CACHE_IMAGE_PREFIX=${CACHE_IMAGE_PREFX:=${GITHUB_ORGANISATION}/${GITHUB_REPO}}
        export CACHED_AIRFLOW_PROD_IMAGE="${CACHE_REGISTRY}/${CACHE_IMAGE_PREFIX}/${AIRFLOW_PROD_BASE_TAG}"
        export CACHED_AIRFLOW_PROD_BUILD_IMAGE="${CACHE_REGISTRY}/${CACHE_IMAGE_PREFIX}/${AIRFLOW_PROD_BASE_TAG}-build"
        export CACHED_PYTHON_BASE_IMAGE="${CACHE_REGISTRY}/${CACHE_IMAGE_PREFIX}/python:${PYTHON_MAJOR_MINOR_VERSION}-slim-buster"
    else
        export CACHED_AIRFLOW_PROD_IMAGE=""
        export CACHED_AIRFLOW_PROD_BUILD_IMAGE=""
        export CACHED_PYTHON_BASE_IMAGE=""
    fi
    export AIRFLOW_KUBERNETES_IMAGE=${AIRFLOW_PROD_IMAGE}-kubernetes
    AIRFLOW_KUBERNETES_IMAGE_NAME=$(echo "${AIRFLOW_KUBERNETES_IMAGE}" | cut -f 1 -d ":")
    export AIRFLOW_KUBERNETES_IMAGE_NAME
    AIRFLOW_KUBERNETES_IMAGE_TAG=$(echo "${AIRFLOW_KUBERNETES_IMAGE}" | cut -f 2 -d ":")
    export AIRFLOW_KUBERNETES_IMAGE_TAG

    if [[ "${INSTALL_AIRFLOW_REFERENCE:=}" != "" ]]; then
        # When --install-airflow-reference is used then the image is build from github tag
        EXTRA_DOCKER_PROD_BUILD_FLAGS=(
            "--build-arg" "AIRFLOW_INSTALL_SOURCES=https://github.com/apache/airflow/archive/${INSTALL_AIRFLOW_REFERENCE}.tar.gz#egg=apache-airflow"
        )
        export AIRFLOW_VERSION="${INSTALL_AIRFLOW_REFERENCE}"
        add_build_args_for_remote_install
    elif [[ "${INSTALL_AIRFLOW_VERSION:=}" != "" ]]; then
        # When --install-airflow-version is used then the image is build from PIP package
        EXTRA_DOCKER_PROD_BUILD_FLAGS=(
            "--build-arg" "AIRFLOW_INSTALL_SOURCES=apache-airflow"
            "--build-arg" "AIRFLOW_INSTALL_VERSION===${INSTALL_AIRFLOW_VERSION}"
        )
        export AIRFLOW_VERSION="${INSTALL_AIRFLOW_VERSION}"
        add_build_args_for_remote_install
    else
        # When no airflow version/reference is specified, production image is built from local sources
        EXTRA_DOCKER_PROD_BUILD_FLAGS=(
        )
    fi
    go_to_airflow_sources
}

# Builds PROD image - depending on the caching strategy (pulled, local, no-cache) it
# passes the necessary docker build flags via DOCKER_CACHE_PROD_DIRECTIVE and
# DOCKER_CACHE_PROD_BUILD_DIRECTIVE (separate caching options are needed for "build" segment of the image)
# it also passes the right Build args depending on the configuration of the build
# selected by Breeze flags or environment variables.
function build_prod_image() {
    print_build_info
    pull_prod_images_if_needed

    if [[ "${DOCKER_CACHE}" == "no-cache" ]]; then
        export DOCKER_CACHE_PROD_DIRECTIVE=("--cache-from" "${AIRFLOW_PROD_BUILD_IMAGE}")
        export DOCKER_CACHE_PROD_BUILD_DIRECTIVE=("--no-cache")
    elif [[ "${DOCKER_CACHE}" == "local" ]]; then
        export DOCKER_CACHE_PROD_DIRECTIVE=()
        export DOCKER_CACHE_PROD_BUILD_DIRECTIVE=()
    elif [[ "${DOCKER_CACHE}" == "pulled" ]]; then
        export DOCKER_CACHE_PROD_DIRECTIVE=(
            "--cache-from" "${AIRFLOW_PROD_BUILD_IMAGE}"
            "--cache-from" "${AIRFLOW_PROD_IMAGE}"
        )
        export DOCKER_CACHE_PROD_BUILD_DIRECTIVE=(
            "--cache-from" "${AIRFLOW_PROD_BUILD_IMAGE}"
        )
    else
        echo >&2
        echo >&2 "Error - thee ${DOCKER_CACHE} cache is unknown!"
        echo >&2
        exit 1
    fi
    set +u
    verbose_docker build \
        "${EXTRA_DOCKER_PROD_BUILD_FLAGS[@]}" \
        --build-arg PYTHON_BASE_IMAGE="${PYTHON_BASE_IMAGE}" \
        --build-arg PYTHON_MAJOR_MINOR_VERSION="${PYTHON_MAJOR_MINOR_VERSION}" \
        --build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
        --build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \
        --build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \
        --build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \
        "${DOCKER_CACHE_PROD_BUILD_DIRECTIVE[@]}" \
        -t "${AIRFLOW_PROD_BUILD_IMAGE}" \
        --target "airflow-build-image" \
        . -f Dockerfile | tee -a "${OUTPUT_LOG}"
    verbose_docker build \
        "${EXTRA_DOCKER_PROD_BUILD_FLAGS[@]}" \
        --build-arg PYTHON_BASE_IMAGE="${PYTHON_BASE_IMAGE}" \
        --build-arg PYTHON_MAJOR_MINOR_VERSION="${PYTHON_MAJOR_MINOR_VERSION}" \
        --build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \
        --build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \
        --build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
        --build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \
        "${DOCKER_CACHE_PROD_DIRECTIVE[@]}" \
        -t "${AIRFLOW_PROD_IMAGE}" \
        --target "main" \
        . -f Dockerfile | tee -a "${OUTPUT_LOG}"
    set -u
    if [[ -n "${DEFAULT_IMAGE:=}" ]]; then
        verbose_docker tag "${AIRFLOW_PROD_IMAGE}" "${DEFAULT_IMAGE}" | tee -a "${OUTPUT_LOG}"
    fi
}


text:
Anne-Lise Touya (born 19 January 1981) is a French fencer. She competed in the sabre events at the 2004 and 2008 Summer Olympics.

References

External links

1981 births
Living people
French female sabre fencers
Olympic fencers of France
Fencers at the 2004 Summer Olympics
Fencers at the 2008 Summer Olympics
Sportspeople from Tarbes
21st-century French women

redpajama_set_name: RedPajamaWikipedia


The Spine Lumbar Fusion Outcomes Calculator (Calculator) was developed based on population averages in Washington state hospitals and has not been tested in other populations. This Calculator only predicts pain and function outcomes up to one year after surgery and does not address other potential benefits of a spine fusion surgery, such as quality of life improvement. An individual patient may also have other medical problems not included in the model that could affect pain and function improvement (e.g., depression, anxiety, etc.) Therefore, although a prediction score can be used as a tool to facilitate physician and patient discussions when deciding treatment options, it should not be solely relied upon to determine care decisions for any medical conditions. Physicians should exercise their own independent clinical judgment when using the Calculator in conjunction with patient care.
Spine Lumbar Fusion Outcomes Calculator is one of the many software programs and tools created at the University of Washington available through our Express Licensing Program. These agreements have standard terms and conditions that allow for rapid licensing by companies, organizations, or individuals.
To license and pay using a Check or Purchase Order, please click on the license button.


text:

The Big E
Eye on Community
Kamloops Progress
Duo details backcountry exploration in new book
Sean Brady	/ Kamloops This Week

Al and Mairi Budreau have hiked around Kamloops since 2008, gathering and recording information from hundreds of backcountry routes.
Photograph By Dave Eagles/KTW
A hiking couple has put their skillsets to work to produce a Kamloops hiking guidebook detailing backcountry treks that can be found near the city.
Al and Mairi Budreau's Kamloops Backcountry Hikes was officially released June 8 and is now being distributed to bookstores in the region.
City reveals multi-million dollar facelift for Canada Games Pool
As Arizona becomes world hot spot, focus put on governor
Worldwide virtual prayer rally to be held for 'Canada's rabbi' after cancer diagnosis
PM hosts cabinet retreat to plot path through pandemic, resumption of Parliament
The self-published book is the product of both of their respective skills — Al created the maps, plotted waypoints, did research and wrote, while Mairi designed the book, helped out with hikes and is taking care of distribution.
The two have been in Kamloops since the late 2000s and have been exploring the backcountry together since then.
The two first met in Huntsville, Ont. way back in 1976. They were a couple then for three years — canoeing and exploring Ontario's backcountry together. They parted ways in 1979 and began separate lives, and both eventually ended up in B.C.
"She got married, I got married — we were totally out of touch," Al said.
The two made contact once again in 2007. Al had reconnected with family and friends back in Ontario and inquired about Mairi. He eventually tracked down her phone number and while crossing the country back to B.C., called her on a whim.
"I said 'Hi, it's Al. Do you remember me?' but I didn't get the whole sentence out — she says, 'Oh my god, where are you?'" Al recalled.
"I was single. I'd been single for a while and had stopped looking — unless Mr. Right rolled into the door — and he did," Mairi said.
Al & Mairi Budreau's self-published Kamloops Backcountry Hikes is available now.
Mairi was in Kamloops to study graphic design at TRU, which is where she formed her book-crafting skills.
When it became clear the two were staying together, Al made the move to Kamloops. When he got here, he decided to find his way around by exploring the backcountry.
"I hunt for stuff relentlessly. That's what got me started. When I first came here I didn't know anybody, I didn't know my way around," he said.
He said books similar to the one the couple has created did exist when he moved here, but they were either too broad, geographically, or were dated. He recalled running into entire neighbourhoods trying to follow trails that were plotted in the 1970s.
In his quest to create an updated hiking guide, he said it all started to snowball — a process that is still going.
"The more I do it the more I want to learn, and the more I learn, the more I realize I don't know."
The book features 36 guided hikes, GPS waypoints, maps and hiking tips spread across 222 water-resistant colour pages. It sells for $29.99 and is available in Kamloops bookstores or online at mairibudreau.com/kbhikes.
Exposing lesser known backcountry routes can sometimes have negative consequences, such as increased garbage, partying or other environmental impacts. Mairi said she does have those concerns with the book, and has included notes on packing out found garbage and keeping trails clean.
"There are a couple of hikes we didn't put in. They're sacred spaces, and you kind of want to keep them that way. By throwing a bit of stewardship in there, I hope people will actually read it and think a little more about, not just using the earth, but being with it and respecting and cherishing it," she said.
Al and Mairi will be at Chapters, 4-1395 Hillside Dr., on Saturday from 1 p.m. to 4 p.m.
© Kamloops This Week
City reveals multi-million dollar facelift for Canada Games...
KTW Daily News Alerts
Question of the Week POLL
The NHL season begins on Jan. 13, with teams in an all-Canadian division playng each other. Which team will finish first?
or view results
Popular Kamloops This Week
Jail time unlikely for man who hid, disposed of roommate's dead body
Trans Mountain project remains on safety stand down
Singh's cycling motion shot down as council debates active transportation plan rollout
'Morally and ethically wrong:' Court to hear challenge to Alberta coal policy removal
'Unwanted person' report results in towed vehicle
Council faced with long list of supplemental budget items
Kamloops man who beat Jessie Simpson denied parole
Harmful or hoax? School district warns city parents about 'Momo'
2021 Winter Activity Guide
YMCA Guide - Winter 2021
Christmas in Kamloops Part Two - 2020
Christmas in Kamloops Part One - 2020
ICCHA/Wish Fund 2020
Women of the Thompson Valley 2020/2021
Get the latest from Kamloops This Week delivered to your inbox every day. You can unsubscribe or contact us anytime.
Sister Newspapers
Merritt Herald
Peachland View
Oliver Chronicle
Osoyoos Times
Columbia Valley Pioneer
The Local Weekly
Aberdeen Publishing © Copyright ® All rights reserved. Unauthorized distribution, transmission or republication strictly prohibited.
Help Us Help Kamloops. Support Local Media.
In response to the COVID-19 crisis, Kamloops This Week is now soliciting donations from readers. This program is designed to support our local journalism in a time where our advertisers are unable to due to their own economic constraints. Kamloops This Week has always been a free product and will continue to be free. This is a means for those who can afford to support local media to help ensure those who can't afford to can get access to trusted local information. You can make a one-time or a monthly donation of any amount and cancel at any time .
NEW: For every donation of $25 or greater, we will offer a digital advertising package to the local non-profit group of your choice.
Click on https://support.kamloopsthisweek.com for more information or to make your donation.
Thank you in advance for your support.

redpajama_set_name: RedPajamaCommonCrawl


text:
Emmy awards 2021 special moments and winners
by Thamilvanan
New Movies Released In UAE This Weekend
The importance of cinema from the old days to new
Do you want a brief knowledge of cinema?
Home Category Entertainment Movies
The 42nd Cairo Film Festival unveils its official poster and Anthony Hopkins at the opening ceremony
The management of the Cairo International Film Festival revealed the details of its 42nd session, which will be held during...
George Clooney returns to TV drama after an absence of 20 years
George Clooney returns to the small screen this month, with a work adapted from Joseph Heller's novel "Catch-22", a novel...
Announcement of the most expensive television actress in the world!
by Muhnis Beeran
Colombian actress Sofia Vergara topped the list of the highest-paid actresses in the world for the year 2020, according to...
Johnny Depp withdraws from Fantastic Beasts movie series
by Shehin
International star Johnny Depp announced his withdrawal from the third part of the famous "Fantastic Beasts" movies, in the implementation of the orders...
Authenticity and final decision on marriage
Star revealed the originality that the subject of marriage again permanently closed to it, saying she would not get married for the third time after...
Hoda Al Etrebi and Bossi El Chahawy top in El Gouna!
Some of the actresses attending the fourth El Gouna Film Festival received criticism on social media because of the dresses they appeared in. The...
Scarlett Johansson announces her marriage
International star Scarlett Johansson married her fiancé, American actor Colin Ghost, in a secret ceremony over the weekend, after 3 years of dating and more...
The Trial Of The Chicago 7 review – A day democracy refused to be tempted by fake politics
In one of his most famous private statements, "Aaron Sorkin" emphasized that there is no story that would be difficult...
The Devil All the Time review – the drama of timed evils
We begin the review of The Devil All the Time movie with the fact that the individual's life is shaped...
The new James Bond movie release gets delayed again; Is the World movie industry collapsing?
After several reschedules, the new James Bond movie 'No Time to Die' gets postponed after several delays in the previous...
"Mulan" in a new crisis calls to boycott the film because of "The Muslim Uyghur minority"
The new Disney movie "Mulan" is facing calls for a boycott after it emerged that some scenes of the massive...
Women make their say in the films of the Venice Film Festival
Women and their struggle for their rights are the focus of several films that participate in the competition for the...
A global campaign against Netflix over "Minion"
Thousands of internet users called, on Thursday, via social networks, to boycott "Netflix" for including the French movie "Minion" on...
In the latest advertisement: Rami Malek faces James Bond in No Time to Die
The new advertisement for the latest movies of the British secret agent James Bond series entitled " No Time To Die ", which was...


text:
Updated Oct-10-2019, 12:34:37 GMT
Machine learning and AI training paves new cloud career paths
#artificialintelligence Oct-20-2017, 00:01:30 GMT
As cloud services for machine learning and artificial intelligence continue to emerge, organizations need to train...
artificial intelligence, big data, information technology services, (12 more...)
Industry: Information Technology > Services (1.00)
Technology: Information Technology > Artificial Intelligence > Machine Learning (1.00)
Free ebook: Microsoft Azure Essentials: Azure Machine Learning
#artificialintelligence Sep-7-2016, 22:41:01 GMT
NOTE: The Microsoft Press Guided Tours app has been discontinued and is no longer available in the Windows Store. If you have already installed the app, you can continue to use it for as long as you like. All the tours will remain available for download from within the app. We're happy to announce the release of our newest free ebook, Microsoft Azure Essentials: Azure Machine Learning (ISBN 9780735698178), by Jeff Barnes. This is the third ebook in Microsoft Press's free Microsoft Azure Essentials series.
artificial intelligence, cloud computing, information technology services, (16 more...)
Information Technology > Cloud Computing (1.00)
Information Technology > Artificial Intelligence > Machine Learning (1.00)
Calling All AI Innovators – Join the 'Cloud AI Challenge' for a Chance to Win $25,000
@machinelearnbot Dec-13-2017, 18:16:22 GMT
This post is authored by Vani Mandava, Director of Data Science at Microsoft Research.
artificial intelligence, machine learning, microsoft, (16 more...)
@machinelearnbot
An Introduction to AI-powered Microsoft Tools
Microsoft is nowadays one of the major providers for AI powered cloud services. In fact, according to a RightScale's survey carried out in 2018, Microsoft Azure Cloud services are currently second just to Amazon AWS (Figure 1). In this article, I will be considering Microsoft as case study as Microsoft CEO Satya Nadella recently shared Microsoft interest to make AI a vital part of their business [1]. I will now introduce you to some of the different Microsoft tools which are currently available and some alternatives provided by the completion. Finally, we will focus on what are going to be next steps in research.
artificial intelligence, microsoft, neural network, (19 more...)
Technology: Information Technology > Artificial Intelligence > Machine Learning > Neural Networks (0.71)
Cloud Computing a blended learning approach to education – Microsoft Faculty Connection
#artificialintelligence May-5-2018, 09:11:45 GMT
Mastery of the productivity applications broadly used in business. Microsoft Imagine Academy curricula is organised along learning paths that guide students and educators to earning industry-recognised certifications and skills needed for jobs of tomorrow.
artificial intelligence, cloud computing, microsoft, (14 more...)
Country: Europe > United Kingdom (0.48)
Industry: Education > Educational Setting (0.72)


text:
Notice: Undefined variable: ub in /home/trq30ct16mcx/domains/scilawyers.com/html/assets/inc/functions.php on line 239
Deprecated: strripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /home/trq30ct16mcx/domains/scilawyers.com/html/assets/inc/functions.php on line 239
The Cambodian Education Project | Heimberg Barr, LLP
Committed to the
Spinal Cord Injury Community
Meet. Dr. Steven Heimberg
Unmatched Qualifications
Unparalleled Outcomes
Commitment to the SCI Community
Our Bill of Client's Rights
SCI: The Basics
SCI: The First 24 Hours
What Does The Future Hold
Choosing a Rehab Hosptital
Types of Spinal Cord Injuries
The Cambodian Education Project
The Cambodian Education Project (www.villageearth.org) is a grass-roots effort to provide education and outreach programs to Cambodian children living in the most extreme poverty one can imagine.
In December 2006, Steven Heimberg visited an old friend who was working at the project's one-room schoolhouse, the Aziza Schoolhouse, in the slum community of Tonle Bassac in Phnom Penh. Approximately 100 children of all ages come for free English lessons and a variety of other classes and programs, all taught by Khmer (Cambodian nationals) teachers and supported by individuals from nations across the world who hear about The Project and come to volunteer.
Steve Heimberg is surrounded by children from the Aziza Schoolhouse, a program of the Cambodian Education Project, in the slum community of Tonle Bassac in Phnom Penh, which he visited in December 2006.
The Aziza Schoolhouse
The school also acts as a community center and on weekends life skill instructors volunteer to teach the kids the dangers of drugs, AIDS, pedophilia, prostitution, human trafficking and hygiene. There are also character building/values programs and a leadership program. On Saturday night teens are offered movies and karaoke.
The children of the Aziza Schoolhouse line up to visit Santa at the school/community center's Christmas party, December 2006.
The Rudi Boa Center
The new sister school opened January 2007 in "the railroad slum" in Boeng Kok (Boeng is "lake" in Khmer), and the school sits on stilts over the water of a lake in Phnom Penh. Nearby is the train station and the railroad tracks which, like the lake, are littered with trash and lined with dirty children. The school is close to the base of a peninsula going into the lake where people farm snails, fish, frogs and various greens. The waste of 20,000 people flows directly into the water, and skin conditions are common. Kids swim right next to houses whose toilets empty directly into the water.
The Rudi Boa Center's classes were immediately filled with 40 kids each. Most of the kids are of primary school age, with teens offered evening classes. One of the first steps teachers took was to teach the children to wash their hands and feet and to trim nails.
The list below details some of the numerous programs provided by The Project at both schools/community centers, but it doesn't begin to describe the sounds children singing "Head, Shoulders, Knees and Toes" or "Old MacDonald" booming through the walls, the numerous art projects created, or the laughter, smiles and silly screams of happy children.
Here are the current programs being offered;
English classes at various levels for anyone from the community; mostly kids from 6 to 20 years old. Four classes per day, two-hours each, Monday through Friday.
All the dental care any kid needs, health and medical assistance programs.
Daily art and activities classes.
Saturday fun time/safe space; singing, movies, and snacks until 11 p.m.
Sunday morning volunteer lecturers on hazards common to life there and how to avoid them (pedophilia, prostitution, pregnancy, AIDS, drugs, etc.), as well as life skills, character building, and hygiene.
Reading and story time: to promote literacy in Khmer language.
A women's group for teenage girls to discuss and learn about all the things that this culture leaves a mystery. Also learning to swim at a public pool.
Leadership training for teens.
Scholarships for eight very poor students to attend "public" school, including uniforms.
Football (soccer) team: 30 teen boys pile into a tuk-tuk to have fun, bond, compete, and get out their aggressions in a healthy way.
We hope you'll join us in supporting The Cambodian Education Project.
Call today (800) 425-5557 or
800 West Sixth Street – Suite 1500
Also doing business as
We will zealously fight to protect your rights and satisfy your needs. For even further details on our unparalleled results, qualifications and commitment, please visit heimbergbarr.com
*This does not constitute a guarantee, warranty or prediction regarding the outcome of your legal matter
©2023 All Rights Reserved. Web Design & Online Marketing Los Angeles by Studio III
800 West Sixth Street
Hollywood Office


Keyutils is a set of utilities for managing the key retention facility in the kernel, which can be used by filesystems, block devices and more to gain and retain the authorization and encryption keys required to perform secure operations.
Note that several tests will fail if certain uncommon kernel options were not used when the kernel was built. These include CONFIG_BIG_KEYS, CONFIG_KEY_DH_OPERATIONS, and CONFIG_CRYPTO_DH.
NO_ARLIB=1: This make flag disables installing the static library.
is to control the key management facility in various ways using a variety of subcommands.
is invoked by request-key on behalf of the kernel when kernel services (such as NFS, CIFS and AFS) need to perform a hostname lookup and the kernel does not have the key cached. It is not ordinarily intended to be called directly.
is invoked by the kernel when the kernel is asked for a key that it doesn't have immediately available. The kernel creates a temporary key and then calls out to this program to instantiate it. It is not intended to be called directly.
contains the keyutils library API instantiation.


MYRA.GOV.	86400	IN	NS	ns1.treasury.GOV.
MYRA.GOV.	86400	IN	NS	ns3.treasury.GOV.
MYRA.GOV.	3600	IN	RRSIG	( DS 8 2 3600 20190428221008 20190421221008 43583 gov.
MYRA.GOV.	3600	IN	RRSIG	( DS 8 2 3600 20190429041007 20190422041007 43583 gov.
MYRA.GOV.	2	IN	RRSIG	( A 7 2 2 20190426165415 20190419165415 26609 myra.gov.
MYRA.GOV.	7200	IN	SOA	( ns1.treasury.GOV. ecb-hosting.fiscal.treasury.GOV.
MYRA.GOV.	7200	IN	NS	ns1.treasury.GOV.
MYRA.GOV.	7200	IN	NS	ns3.treasury.GOV.
Want a second opinion? Test MYRA.GOV at dnsviz.net.


text:
C $Header$
C $Name$
CBOP
C     !ROUTINE: BARRIER.h
C     !INTERFACE:
C     include "BARRIER.h"
C     !DESCRIPTION:
C     *==========================================================*
C     | BARRIER.h
C     | o Globals used by Fortran barrier routine.
C     *==========================================================*
C     | These variables support a simple Fortran shared memory
C     | barrier routine. They do busy waiting, that is the
C     | thread that is waiting sits in a tight loop reading
C     | some memory location and waiting for all other threads.
C     | On some systems this is sometimes a good method to use.
C     | On the T3E memory is not shared so the routine should
C     | use the T3E "eureka" barriers. On CRAY and NEC there are
C     | hardware barriers that are accessed through a compiler
C     | directives. Finally proper multi-threading compilers
C     | support barrier compile directives - sometimes these
C     | are good, sometimes they are lousy.
C     |  The barrier mechanism is used as follows
C     |  1. In the single-threaded part of the code
C     |     CALL FBAR\_INIT
C     |     on CRAY, NEC this routine does nothing
C     |     on T3E there is no single-threaded code
C     |        but there may be barrier initialisation -
C     |        need to check.
C     |  2. When we need to synchronize everybody just
C     |     CALL FBAR( myThid )
C     |     where myThid is myThreadId
C     |     on CRAY, NEC FBAR will just do C\$DIR BARRIER
C     |     or the like.
C     |     on T3E FBAR does CALL BARRIER(...) or something
C     |     need to check this.
C     *==========================================================*
CEOP
      COMMON / BARRIER_COMMON / key1,  key2,  key3,
     &                          door1, door2, door3,
     &                          bCount, masterSet
      INTEGER key1(lShare4,MAX_NO_THREADS)
      INTEGER key2(lShare4,MAX_NO_THREADS)
      INTEGER key3(lShare4,MAX_NO_THREADS)
      INTEGER door1
      INTEGER door2
      INTEGER door3
      INTEGER VALID
      PARAMETER ( VALID = 1 )
      INTEGER INVALID
      PARAMETER ( INVALID = 0 )
      INTEGER OPEN
      PARAMETER ( OPEN = 1 )
      INTEGER SHUT
      PARAMETER ( SHUT = 0 )
      INTEGER bCount(MAX_NO_THREADS)
      INTEGER masterSet(MAX_NO_THREADS)

redpajama_set_name: RedPajamaGithub


The American Library in Paris is pleased to share our selection of cultural events going on in the city each month. December in Paris is of course filled with anticipation, and stress, of the upcoming holiday season. So if you're in need of a cultural break, check out some of these cultural events before they go away. Here are our Culture Picks for December along with recommended books. Enjoy reading and visiting!
What role did art play in the quest for equality and the affirmation of black identity in segregated America? This exhibition at the Musée du Quai Branly Jacques Chirac pays tribute to the African-American artists and thinkers who contributed to the blurring of the color line. From the racist themes American vaudeville of the 19th century to the vitality of the Harlem Renaissance to the indictment of the singer Billie Holiday, the exhibition The Color Line showcases 150 years of African-American artistic creation and protest.
The Petit Palais presents the first major exhibition in France devoted to Dublin-born writer and playwright Oscar Wilde. The show, co-curated by Wilde's grandson Merlin Holland, features 200 items including paintings, manuscrips, and photographs. Some of the most memorable pieces include photos of his family and young Wilde, correspondences written by Wilde while in prison, and photographs of his bedroom in Paris where he died, impoverished, of cerebral meningitis.
"42nd Street" is the fourth lavishly staged musical to come through the Théâtre du Châtelet in the last two years, including "An American in Paris" and "Singin' in the Rain." Directed and choreographed by Stephen Mear with a strong cast and incredible costumes and décor by Peter McKintosh, this production of "42nd Street" offers a wonderful and much-needed escape from reality.


text:
Kashmir Solidarity Day 2021 – OpEd
Adeel Mukhtar
On February 5 every year, federal and provincial governments of Pakistan hold rallies, public meetings and seminars to support Kashmiris 'Right to Self-Determination' under the United Nations Resolutions.
Though Pakistan has been the most active supporter of Kashmiri's rights, observing 'Kashmir Solidarity Day' is not Pakistan's initiative solely. A Kashmir-based Journalist Mr. Gowhar Geelani quoted Srinagar-based international law expert Dr Sheikh Showkat Hussain as saying that Kashmir Day has been observed historically right from 1932, after being first proposed by the then Kashmir Committee. "In the 1930s, the day was observed to express camaraderie with the Kashmiris' struggle against the autocratic Dogra ruler Maharaja Hari Singh. In present day context, Kashmir Day is being celebrated to show solidarity with the struggle of Kashmiris against India," Sheikh Showkat said. "Basically, it [Kashmir Day] started from undivided Punjab and it has been celebrated ever since, with pauses in between. This day will continue to hold importance until the Kashmiris achieve their objective of right to self-determination."
Pakistan has officially been observing Kashmir Day since 2004. The-then Pakistani prime minister, Mir Zafarullah Khan Jamali, visited Muzaffarabad on February 5 and addressed a joint session of the Legislative Assembly and Council. Gilani also quotes Ajazul Haque, one of Kashmir's leading columnists, who is of the view that "February 5 symbolises Pakistan's deep-rooted relationship with Kashmir. "The pro-Pakistan sentiment in Kashmir is neither dead nor diminished, it's suppressed and the reasons are rooted in the conditions we are going through since the 1990." However, India terms it a bilateral dispute and avoids internationalizing the issue.
Indian continuous human right violations in the Jammu & Kashmir (J&K) Valley have made J&K a tipping point. The international opinion is with Kashmir and against India's human rights violations. London's Labour Party leader Keir Starmer clearly and aptly gave words to Kashmiris emotion through a statement that "his party's position on Kashmir has not changed and it still supports and recognises UN resolutions on the rights of the Kashmiri people". Keir Starmer stressed "the importance of hearing the voices of the Kashmiri communities and upholding respect for international law and human rights".
In another development, three photographers of Associated Press, Dar Yasin, Mukhtar Khan and Channi Anand, were awarded Pulitzer prize for coverage on unprecedented lockdown in Indian Illegally Occupied Jammu & Kashmir (IIOJ&K). With recognizing Kashmiris struggle, it is high time that International Community take strict actions against India and should be held accountable for its illegal actions in the Valley. As for Kashmiri's struggle, the recent incident has also exposed the lies of Indian government. As the Indian govt claims that everything is under control in IIOJ&K, but the recent encounter shows otherwise. Kashmir is on tipping point and the world might soon observe the entire South Asian region engulfed in the conflict.
In its bi-annual report covering the events from January 1 to June 30, the Jammu and Kashmir Coalition of Civil Society (JKCCS) said that "the region witnessed the extrajudicial executions of at least 32 civilians and the killing of 54 armed forces personnel… It also saw 55 internet shutdowns and the destruction of 48 structures… three children and two women were also killed, while at least 107 cordon and search operations and cordon and destroy operations were conducted in the region." The report also adds that "vandalism and destruction of civilian properties were reported." Kashmiri media has also been muzzled through harassment and intimidation.
As per the report, "besides physical assaults, a few Kashmir-based journalists were also booked under stringent charges and cases were filed against them… the police filed cases against two Kashmiri journalists under the Unlawful Activities Act, which clearly infringes on the right to freedom of expression and freedom of the press as such tactics signal a forewarning for media personnel to adhere to the state narrative." Moreover, after the massive protest because of Indian abrogation of Article 370, the internet services have also been banned since August 05, 2019; internet was totally blocked 55 times. Most worryingly, a new media policy is also introduced that would enable India "decide what is "fake," "unethical" or "anti-national" news and take legal action against the journalist or media organisation concerned, including sharing information with security agencies."
Since the martyrdom of Burhan Wani, a series of clashes have been occurring, leading to martyrdom of Riaz Naikoo and many more. According to Mr. Wani's father, "Indian Army has thrashed everybody here … In any case, everybody does not turn into an activist or freedom fighter. It relies upon the amount one can take. Somebody's 'Ghairat' (self-respect) gets tested consistently, so he chooses to reply. Others choose to remain calm. My child could not stand to see the abominations and the mortification, so he picked this path. Burhan's fight is not only for himself but for the whole Kashmir and for the sufferings of people of Indian occupied Kashmir."
The situation in IIOJ&K worsened after the abrogation of Article 370 and 35-A of Indian Constitution by India, which changes the legal status of the Valley. According to Mr. Farooq Abdullah, "the modification, abrogation of articles 35A and 370, unconstitutional delimitation or trifurcation of the state…an aggression against the people of Jammu Kashmir and Ladakh." To suppress Kashmiris right of self-determination, India has augmented its paramilitary forces in the Valley soon after the revocation of Article 370.
Now the question is: what should be done? Should we just observing Kashmir Solidarity Day with no results and change in Indian actions. The late Dr Pervaiz Iqbal Cheema suggested that to secure the desired dividends for the resolution of Kashmir dispute, a little more concentration is required in order to push the world community's attention. The exercise entails three stages: awareness, active expression of views, and undertaking concrete efforts aimed to resolve the dispute… The peace of South Asia is directly linked with the resolution of the Kashmir dispute and it cannot be resolved unless the Indian attitude registers positive change. Last but not the least, for the peace and prosperity of South Asia, moreover, the region needs full international support to the resumption of India-Pakistan dialogues both at the governmental as well as non-governmental levels. Otherwise, every year Kashmiris will keep on suffering human rights violations and the world will only remember them on 5th February for just a day.
Note: This article appeared in Eurasia, dated 02 February 2021.
Disclaimer: The views expressed in the article are of the author and do not necessarily represent Institute's policy.
Balochistan reels from floods
Importance of CPEC
Internal security: Between pillar and post
March 3, 2014 9:38 AM
China's Economic Engagement in the Middle East