<commit_before>"""Code for printing/plotting results for the HPatch evaluation protocols.

Usage:
  hpatches_results.py (-h | --help)
  hpatches_results.py --version
  hpatches_results.py --descr-name=<>... --results-dir=<> --task=<>... [--split=<>] [--pcapl=<>]
Options:
  -h --help         Show this screen.
  --version         Show version.
  --descr-name=<>   Descriptor name e.g. --descr=sift
  --results-dir=<>  Results root folder, e.g. --results-dir=./results
  --task=<>         Task name. Valid tasks are {verification,matching,retrieval}.
  --split=<>        Split name. Valid are {a,b,c,full,illum,view} [default: a].
  --pcapl=<>        Show results for pca-power law descr [default: no]

For more visit: https://github.com/hpatches/
"""
from utils.results import *
import os.path
import time
import json
from utils.docopt import docopt

if __name__ == '__main__':
    opts = docopt(__doc__, version='HPatches 1.0')
    descrs = opts['--descr-name']

    with open(os.path.join(tskdir, "splits", "splits.json")) as f:    
        splits = json.load(f)<commit_msg>fix: Missing import of tskdir<commit_after>"""Code for printing/plotting results for the HPatch evaluation protocols.

Usage:
  hpatches_results.py (-h | --help)
  hpatches_results.py --version
  hpatches_results.py --descr-name=<>... --results-dir=<> --task=<>... [--split=<>] [--pcapl=<>]
Options:
  -h --help         Show this screen.
  --version         Show version.
  --descr-name=<>   Descriptor name e.g. --descr=sift
  --results-dir=<>  Results root folder, e.g. --results-dir=./results
  --task=<>         Task name. Valid tasks are {verification,matching,retrieval}.
  --split=<>        Split name. Valid are {a,b,c,full,illum,view} [default: a].
  --pcapl=<>        Show results for pca-power law descr [default: no]

For more visit: https://github.com/hpatches/
"""
from utils.tasks import tskdir
from utils.results import *
import os.path
import time
import json
from utils.docopt import docopt

if __name__ == '__main__':
    opts = docopt(__doc__, version='HPatches 1.0')
    descrs = opts['--descr-name']

    with open(os.path.join(tskdir, "splits", "splits.json")) as f:    
        splits = json.load(f)
{'fraction_non_alphanumeric': 0.16552978626648476, 'fraction_numerical': 0.0018190086402910413, 'mean_word_length': 2.9568345323741005, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, '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': '4523097', 'n_tokens_mistral': 768, 'n_tokens_neox': 758, 'n_words': 205}