<commit_before>#!/bin/sh
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
# 2015, 2016, 2017, 2018
# University Corporation for Atmospheric Research/Unidata.

# See netcdf-c/COPYRIGHT file for more info.

if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../../test_common.sh

echo "*** Running filter example for netCDF-4."

set -e
set -x

if test -f ${builddir}/findplugin.sh ; then
echo "*** running test_filter example..."
. ${builddir}/findplugin.sh

# Locate the plugin path and the library names; argument order is critical
# Find bzip2 and capture
findplugin h5bzip2
BZIP2PATH="${HDF5_PLUGIN_DIR}/${HDF5_PLUGIN_LIB}"

# Verify
if ! test -f ${BZIP2PATH} ; then echo "Unable to locate ${BZIP2PATH}"; exit 1; fi

export HDF5_PLUGIN_PATH=${HDF5_PLUGIN_LIB}

echo "*** running filter_example..."
rm -f ./bzip2.nc
${execdir}/filter_example
#rm -f ./bzip2.nc

fi # Filter enabled

echo "*** Filter example successful!"
exit 0<commit_msg>exam5<commit_after>#!/bin/sh
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
# 2015, 2016, 2017, 2018
# University Corporation for Atmospheric Research/Unidata.

# See netcdf-c/COPYRIGHT file for more info.

if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../../test_common.sh

echo "*** Running filter example for netCDF-4."

set -e
set -x

if test -f ${builddir}/findplugin.sh ; then
echo "*** running test_filter example..."
. ${builddir}/findplugin.sh

# Locate the plugin path and the library names; argument order is critical
# Find bzip2 and capture
findplugin h5bzip2
BZIP2PATH="${HDF5_PLUGIN_DIR}/${HDF5_PLUGIN_LIB}"

# Verify
if ! test -f ${BZIP2PATH} ; then echo "Unable to locate ${BZIP2PATH}"; exit 1; fi

echo "*** running filter_example..."
rm -f ./bzip2.nc
printenv HDF5_PLUGIN_PATH
unset HDF5_PLUGIN_PATH
export HDF5_PLUGIN_PATH=${HDF5_PLUGIN_LIB}
${execdir}/filter_example
rm -f ./bzip2.nc

fi # Filter enabled

echo "*** Filter example successful!"
exit 0
{'fraction_non_alphanumeric': 0.1400094921689606, 'fraction_numerical': 0.11438063597532036, 'mean_word_length': 4.4051282051282055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3915593', 'n_tokens_mistral': 985, 'n_tokens_neox': 768, 'n_words': 245}