<commit_before># Copyright (c) Facebook, Inc. and its affiliates.
import os
import random

import numpy as np
import pkg_resources
from nle import nethack
from minihack.envs import register
from minihack import LevelGenerator, MiniHackNavigation

LEVELS_PATH = os.path.join(
    pkg_resources.resource_filename("nle", "minihack/dat"),
    "boxoban-levels-master",
)
# The agent can only move towards 4 cardinal directions (instead of default 8)
MOVE_ACTIONS = tuple(nethack.CompassCardinalDirection)


def load_boxoban_levels(cur_levels_path):
    levels = []
    for file in os.listdir(cur_levels_path):
        if file.endswith(".txt"):<commit_msg>Fixing boxoban level data path<commit_after># Copyright (c) Facebook, Inc. and its affiliates.
import os
import random

import numpy as np
import pkg_resources
from nle import nethack
from minihack.envs import register
from minihack import LevelGenerator, MiniHackNavigation

LEVELS_PATH = os.path.join(
    pkg_resources.resource_filename("minihack", "dat"),
    "boxoban-levels-master",
)
# The agent can only move towards 4 cardinal directions (instead of default 8)
MOVE_ACTIONS = tuple(nethack.CompassCardinalDirection)


def load_boxoban_levels(cur_levels_path):
    levels = []
    for file in os.listdir(cur_levels_path):
        if file.endswith(".txt"):
{'fraction_non_alphanumeric': 0.08301599390708302, 'fraction_numerical': 0.0030464584920030465, 'mean_word_length': 5.083333333333333, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2328040', 'n_tokens_mistral': 425, 'n_tokens_neox': 404, 'n_words': 123}