<commit_before>#!/bin/bash

# source the ciop functions (e.g. ciop-log)
source ${ciop_job_include}

# define the exit codes
SUCCESS=0
ERR_BINNING=20
ERR_PCONVERT=30

# add a trap to exit gracefully
function cleanExit ()
{
   local retval=$?
   local msg=""
   case "$retval" in
     $SUCCESS)      msg="Processing successfully concluded";;
     $ERR_NOPARAMS) msg="Output format not defined";;
     $ERR_GDAL)    msg="Graph processing of job ${JOBNAME} failed (exit code $res)";;
     $ERR_PCONVERT) msg="pconvert returned an error";;
     *)             msg="Unknown error";;
   esac
   [ "$retval" != "0" ] && ciop-log "ERROR" "Error $retval - $msg, processing aborted" || ciop-log "INFO" "$msg"
   exit $retval
}
trap cleanExit EXIT

function createImage() {
		
  band=3 # max
		
  $_CIOP_APPLICATION_PATH/shared/bin/pconvert.sh -f $1 \
					-b $band $TMPDIR/output/$outputname.dim  \
					-c $TMPDIR/palette.cpd  \
					-o $TMPDIR/output &> /dev/null
	
  [ "$?" == "0" ] || return $ERR_PCONVERT<commit_msg>Update run.sh<commit_after>#!/bin/bash

# source the ciop functions (e.g. ciop-log)
source ${ciop_job_include}

# define the exit codes
SUCCESS=0
ERR_BINNING=20
ERR_PCONVERT=30

# add a trap to exit gracefully
function cleanExit ()
{
   local retval=$?
   local msg=""
   case "$retval" in
     $SUCCESS)      msg="Processing successfully concluded";;
     $ERR_BINNING)  msg="gpt returned an error";;
     $ERR_PCONVERT) msg="pconvert returned an error";;
     *)             msg="Unknown error";;
   esac
   [ "$retval" != "0" ] && ciop-log "ERROR" "Error $retval - $msg, processing aborted" || ciop-log "INFO" "$msg"
   exit $retval
}
trap cleanExit EXIT

function createImage() {
		
  band=3 # max. Change this if the algorithm is not MIN_MAX
		
  $_CIOP_APPLICATION_PATH/shared/bin/pconvert.sh -f $1 \
					-b $band $TMPDIR/output/$outputname.dim  \
					-c $TMPDIR/palette.cpd  \
					-o $TMPDIR/output &> /dev/null
	
  [ "$?" == "0" ] || return $ERR_PCONVERT
{'fraction_non_alphanumeric': 0.14632911392405062, 'fraction_numerical': 0.009113924050632912, 'mean_word_length': 3.142557651991614, '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': '3503531', 'n_tokens_mistral': 744, 'n_tokens_neox': 708, 'n_words': 184}