<commit_before>import os
import json

from panda3d.bullet import BulletCharacterControllerNode
from panda3d.bullet import BulletCapsuleShape
from panda3d.bullet import ZUp
import panda3d.core as p3d
from direct.showbase.DirectObject import DirectObject


class Character(DirectObject):
    next_id = 1
    model_cache = {}

    def __init__(self, cfile, root=None):
        self.id = Character.next_id
        Character.next_id += 1
        self.linear_movement = p3d.LVector3(0.0)

        if root is None:
            root = base.render

        with open(os.path.join('characters', cfile) + '.json') as f:
            self.json_data = json.load(f)

        self.hp = self.max_hp = self.json_data['max_health']
        name = self.json_data['name']
        height = self.json_data['height']
        radius  =self.json_data['radius']

        # Setup physics<commit_msg>Fixing some bad spacing.<commit_after>import os
import json

from panda3d.bullet import BulletCharacterControllerNode
from panda3d.bullet import BulletCapsuleShape
from panda3d.bullet import ZUp
import panda3d.core as p3d
from direct.showbase.DirectObject import DirectObject


class Character(DirectObject):
    next_id = 1
    model_cache = {}

    def __init__(self, cfile, root=None):
        self.id = Character.next_id
        Character.next_id += 1
        self.linear_movement = p3d.LVector3(0.0)

        if root is None:
            root = base.render

        with open(os.path.join('characters', cfile) + '.json') as f:
            self.json_data = json.load(f)

        self.hp = self.max_hp = self.json_data['max_health']
        name = self.json_data['name']
        height = self.json_data['height']
        radius = self.json_data['radius']

        # Setup physics
{'fraction_non_alphanumeric': 0.09640616086708499, 'fraction_numerical': 0.012549914432401598, 'mean_word_length': 2.8380743982494527, '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': '6227636', 'n_tokens_mistral': 565, 'n_tokens_neox': 543, 'n_words': 130}