<commit_before>import math

import cocos
import cocos.collision_model as cm
import cocos.euclid as eu
from cocos.rect import Rect

import config

def world_to_view(v):
    """world coords to view coords; v an eu.Vector2, returns (float, float)"""
    return v.x * config.scale_x, v.y * config.scale_y

#def reflection_y(a):
#    assert isinstance(a, eu.Vector2)
#    return eu.Vector2(a.x, -a.y)

class Sensor():
    def __init__(self, angle, max_range):
        self.angle = angle
        self.max_range = max_range
        self.proximity = self.max_range

class Player(cocos.sprite.Sprite):
    palette = {}  # injected later<commit_msg>Normalise proximity<commit_after>import math

import cocos
import cocos.collision_model as cm
import cocos.euclid as eu
from cocos.rect import Rect

import config

def world_to_view(v):
    """world coords to view coords; v an eu.Vector2, returns (float, float)"""
    return v.x * config.scale_x, v.y * config.scale_y

#def reflection_y(a):
#    assert isinstance(a, eu.Vector2)
#    return eu.Vector2(a.x, -a.y)

class Sensor():
    def __init__(self, angle, max_range):
        self.angle = angle
        self.max_range = max_range
        self.proximity = self.max_range

    def proximity_norm(self):
        return self.proximity / self.max_range

class Player(cocos.sprite.Sprite):
    palette = {}  # injected later
{'fraction_non_alphanumeric': 0.10572687224669604, 'fraction_numerical': 0.004405286343612335, 'mean_word_length': 3.425324675324675, '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': '587386', 'n_tokens_mistral': 475, 'n_tokens_neox': 469, 'n_words': 127}