<commit_before>import list__
import user

from command import Command, ics_command, requires_registration
from config import config

@ics_command('sr', '', admin.Level.user)
class Sr(Command):
    @requires_registration
    def run(self, args, conn):
        if not conn.user.has_title('SR'):
            conn.write('You do not have permission to access that command.')
            return
        title_id = list_.lists['sr'].id
        conn.user.toggle_light(title_id)
        if '(SR)' in conn.user.get_display_name():
            conn.write(A_('Service Representative mode (SR) is now shown.\n'))
        else:
            conn.write(A_('Service Representative mode (SR) is now not shown.\n'))

@ics_command('tm', '', admin.Level.user)
class Sr(Command):
    @requires_registration
    def run(self, args, conn):
        if not conn.user.has_title('TM'):
            conn.write('You do not have permission to access that command.')<commit_msg>a few fixes to the SR and TM commands<commit_after>import list_
import user
import admin

from command import Command, ics_command, requires_registration
from config import config

@ics_command('sr', '', admin.Level.user)
class Sr(Command):
    @requires_registration
    def run(self, args, conn):
        if not conn.user.has_title('SR'):
            conn.write('You do not have permission to access that command.')
            return
        title_id = list_.lists['sr'].id
        conn.user.toggle_light(title_id)
        if '(SR)' in conn.user.get_display_name():
            conn.write(A_('Service Representative mode (SR) is now shown.\n'))
        else:
            conn.write(A_('Service Representative mode (SR) is now not shown.\n'))

@ics_command('tm', '', admin.Level.user)
class Tm(Command):
    @requires_registration
    def run(self, args, conn):
        if not conn.user.has_title('TM'):
            conn.write('You do not have permission to access that command.')
{'fraction_non_alphanumeric': 0.11825726141078838, 'fraction_numerical': 0.0, 'mean_word_length': 3.0440251572327046, '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': '5082086', 'n_tokens_mistral': 567, 'n_tokens_neox': 549, 'n_words': 169}