<commit_before>#!/bin/bash

echo "number of relevant news"
redis-cli KEYS "nyhetis:db:news:all" | xargs redis-cli SCARD

echo "bag of words"
redis-cli KEYS "nyhetis:db:bagwords:words" | xargs redis-cli SMEMBERS<commit_msg>Support to visualize multiple environments db<commit_after>#!/bin/bash
env=$1
if [ "x$env" != "x" ]; then
  env="$env":
fi
namespace="nyhetis:db:"$env

echo "number of relevant news:" $namespace"news:all" 
redis-cli KEYS $namespace"news:all" | xargs redis-cli SCARD

echo "bag of words: ${namespace}bagwords:words" 
redis-cli KEYS "${namespace}bagwords:words" | xargs redis-cli SMEMBERS
{'fraction_non_alphanumeric': 0.14309210526315788, 'fraction_numerical': 0.001644736842105263, 'mean_word_length': 6.1647058823529415, 'pattern_counts': {'":': 1, '<': 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': '564497', 'n_tokens_mistral': 231, 'n_tokens_neox': 225, 'n_words': 58}