<commit_before>#!/bin/sh

BASE_DIR=$(dirname "`readlink -f "$0"`")
PYTHONPATH=$BASE_DIR
SEARX_DIR="$BASE_DIR/searx"
ACTION=$1

update_packages() {
    pip install --upgrade -r "$BASE_DIR/requirements.txt"
}

update_dev_packages() {
    update_packages
    pip install --upgrade -r "$BASE_DIR/requirements-dev.txt"
}

check_geckodriver() {
    echo '[!] Checking geckodriver'
    set -e
    geckodriver -V 2>1 > /dev/null || NOTFOUND=1
    set +e
    if [ -z $NOTFOUND ]; then
	return
    fi
    GECKODRIVER_VERSION="v0.11.1"
    PLATFORM=`python -c "import platform; print platform.system().lower(), platform.architecture()[0]"`
    case $PLATFORM in
	"linux 32bit" | "linux2 32bit") ARCH="linux32";;
	"linux 64bit" | "linux2 64bit") ARCH="linux64";;
	"windows 32 bit") ARCH="win32";;<commit_msg>[fix] do not do unnecessary package upgrades<commit_after>#!/bin/sh

BASE_DIR=$(dirname "`readlink -f "$0"`")
PYTHONPATH=$BASE_DIR
SEARX_DIR="$BASE_DIR/searx"
ACTION=$1

update_packages() {
    pip install -r "$BASE_DIR/requirements.txt"
}

update_dev_packages() {
    update_packages
    pip install -r "$BASE_DIR/requirements-dev.txt"
}

check_geckodriver() {
    echo '[!] Checking geckodriver'
    set -e
    geckodriver -V 2>1 > /dev/null || NOTFOUND=1
    set +e
    if [ -z $NOTFOUND ]; then
	return
    fi
    GECKODRIVER_VERSION="v0.11.1"
    PLATFORM=`python -c "import platform; print platform.system().lower(), platform.architecture()[0]"`
    case $PLATFORM in
	"linux 32bit" | "linux2 32bit") ARCH="linux32";;
	"linux 64bit" | "linux2 64bit") ARCH="linux64";;
	"windows 32 bit") ARCH="win32";;
{'fraction_non_alphanumeric': 0.16219588271990018, 'fraction_numerical': 0.034934497816593885, 'mean_word_length': 4.05993690851735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '3537643', 'n_tokens_mistral': 652, 'n_tokens_neox': 608, 'n_words': 133}