<commit_before>#!/bin/sh
LIBRARY_PATH="$(ldd "$(which python)" | grep libpython | sed 's/^.* => //;s/ .*$//')"
LIBPYTHON_NAME="$(basename "${LIBRARY_PATH}")"
PYTHON_SUFFIX="$(echo "${LIBPYTHON_NAME}" | sed -r 's/^libpython(.*)\.so.*$/\1/')"
PYTHON_INCLUDE_DIR="/opt/python/${PYTHON_VERSION}/include/python$PYTHON_SUFFIX"
echo "${LIBRARY_PATH}"
echo "${LIBPYTHON_NAME}"
echo "${PYTHON_SUFFIX}"
test -e "$LIBRARY_PATH" || echo FALSE:library
test -d "$PYTHON_INCLUDE_DIR" || echo FALSE:include
test -e "$PYTHON_INCLUDE_DIR/Python.h" || echo FALSE:header<commit_msg>fix! Use different method for PYTHON_INCLUDE_DIR computations<commit_after>#!/bin/sh
LIBRARY_PATH="$(ldd "$(which python)" | grep libpython | sed 's/^.* => //;s/ .*$//')"
LIBPYTHON_NAME="$(basename "${LIBRARY_PATH}")"
PYTHON_SUFFIX="$(echo "${LIBPYTHON_NAME}" | sed -r 's/^libpython(.*)\.so.*$/\1/')"
PYTHON_INCLUDE_DIR="$(dirname "$(dirname "${LIBRARY_PATH}")")/include/python$PYTHON_SUFFIX"
echo "${LIBRARY_PATH}"
echo "${LIBPYTHON_NAME}"
echo "${PYTHON_SUFFIX}"
echo "${PYTHON_INCLUDE_DIR}"
test -e "$LIBRARY_PATH" || echo FALSE:library
test -d "$PYTHON_INCLUDE_DIR" || echo FALSE:include
test -e "$PYTHON_INCLUDE_DIR/Python.h" || echo FALSE:header
{'fraction_non_alphanumeric': 0.2201154163231657, 'fraction_numerical': 0.0016488046166529267, 'mean_word_length': 6.782051282051282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5403789', 'n_tokens_mistral': 515, 'n_tokens_neox': 468, 'n_words': 85}