<commit_before>#!/bin/bash
#===========================================================================
# Internet-proxy activation/deactivation
#===========================================================================

#--- Colors and styles
export GREEN='\033[1;32m'
export BLUE='\033[1;34m'
export CYAN='\033[1;36m'
export YELLOW='\033[1;33m'
export STD='\033[0m'
export BOLD='\033[1m'

#--- Set user prompt
parse_git_branch()
{
  local BRANCH=$(git symbolic-ref HEAD --short 2> /dev/null)
  if [ ! -z "${BRANCH}" ] ; then
    echo "(${BRANCH})"
  else
    echo ""
  fi
}

proxyStatus=`env | grep -i "http_proxy"`
if [ "${proxyStatus}" = "" ] ; then
  printf "%bActivate \"internet-proxy\"%b\n" "${YELLOW}${BOLD}" "${STD}"
  export http_proxy="http://system-internet-http-proxy.internal.paas:3128"
  export no_proxy="127.0.0.1,localhost,169.254.0.0/16,192.168.0.0/16,172.17.11.0/24,.internal.paas..intraorange,.ftgroup,.francetelecom.fr"
  export https_proxy=${http_proxy}
  export HTTP_PROXY=${http_proxy}
  export HTTPS_PROXY=${http_proxy}
  export NO_PROXY=${no_proxy}
  export PS1="${GREEN}\h@${SITE_NAME}${YELLOW}[proxy]${CYAN}\$(parse_git_branch)${STD}:${BLUE}\w${STD}\$ "
else
  printf "%bDeactivate \"internet-proxy\"%b\n" "${YELLOW}${BOLD}" "${STD}"
  unset http_proxy
  unset https_proxy
  export PS1="${GREEN}\h@${SITE_NAME}${CYAN}\$(parse_git_branch)${STD}:${BLUE}\w${STD}\$ "
fi<commit_msg>unset proxy vars when deactivated<commit_after>#!/bin/bash
#===========================================================================
# Internet-proxy activation/deactivation
#===========================================================================

#--- Colors and styles
export GREEN='\033[1;32m'
export BLUE='\033[1;34m'
export CYAN='\033[1;36m'
export YELLOW='\033[1;33m'
export STD='\033[0m'
export BOLD='\033[1m'

#--- Set user prompt
parse_git_branch()
{
  local BRANCH=$(git symbolic-ref HEAD --short 2> /dev/null)
  if [ ! -z "${BRANCH}" ] ; then
    echo "(${BRANCH})"
  else
    echo ""
  fi
}

proxyStatus=`env | grep -i "http_proxy"`
if [ "${proxyStatus}" = "" ] ; then
  printf "%bActivate \"internet-proxy\"%b\n" "${YELLOW}${BOLD}" "${STD}"
  export http_proxy="http://system-internet-http-proxy.internal.paas:3128"
  export no_proxy="127.0.0.1,localhost,169.254.0.0/16,192.168.0.0/16,172.17.11.0/24,.internal.paas..intraorange,.ftgroup,.francetelecom.fr"
  export https_proxy=${http_proxy}
  export HTTP_PROXY=${http_proxy}
  export HTTPS_PROXY=${http_proxy}
  export NO_PROXY=${no_proxy}
  export PS1="${GREEN}\h@${SITE_NAME}${YELLOW}[proxy]${CYAN}\$(parse_git_branch)${STD}:${BLUE}\w${STD}\$ "
else
  printf "%bDeactivate \"internet-proxy\"%b\n" "${YELLOW}${BOLD}" "${STD}"
  unset http_proxy https_proxy no_proxy
  unset HTTP_PROXY HTTPS_PROXY NO_PROXY
  export PS1="${GREEN}\h@${SITE_NAME}${CYAN}\$(parse_git_branch)${STD}:${BLUE}\w${STD}\$ "
fi
{'fraction_non_alphanumeric': 0.2973254602292463, 'fraction_numerical': 0.05210142410559222, 'mean_word_length': 5.808510638297872, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, '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': '1728751', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1069, 'n_words': 161}