<commit_before># allow to use extglob wildcards
shopt -s extglob

function b.framework.current_path() {
  MY_PATH="`dirname \"$0\"`"              # relative path of current script
  export MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
  export MY_NAME="`basename $0`"
  if [ -z "$MY_PATH" ] ; then
    exit 1
  fi
}

function b.framework.require() {
  if [ $(b.framework.isset "module_$1") = "1" ]; then
    :
  else
    source "$MY_PATH/modules/$1.sh"
  fi
}

function b.framework.isset() {
  local v="$1"

  if [[ ! ${!v} && ${!v-unset} ]]; then
    echo 0
  else
    echo 1
  fi
}

function b.framework.random() {
  if [[ ! -z "$1" && ! -z "$2" ]]; then<commit_msg>Fix `framework` module shellcheck concerns<commit_after>#!/usr/bin/env bash

# allow to use extglob wildcards
shopt -s extglob

function b.framework.current_path() {
  export MY_PATH
  export MY_NAME
  MY_PATH="`dirname \"$0\"`"              # relative path of current script
  MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
  MY_NAME="`basename $0`"
  if [ -z "$MY_PATH" ] ; then
    exit 1
  fi
}

function b.framework.require() {
  if [ "$(b.framework.isset "module_$1")" = "1" ]; then
    :
  else
    # shellcheck source=/dev/null
    source "$MY_PATH/modules/$1.sh"
  fi
}

function b.framework.isset() {
  local v="$1"

  if [[ ! ${!v} && ${!v-unset} ]]; then
    echo 0
  else
    echo 1
  fi
}

function b.framework.random() {
  if [[ ! -z "$1" && ! -z "$2" ]]; then
{'fraction_non_alphanumeric': 0.17943548387096775, 'fraction_numerical': 0.01478494623655914, 'mean_word_length': 2.817948717948718, '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': '5962823', 'n_tokens_mistral': 573, 'n_tokens_neox': 562, 'n_words': 146}