<commit_before>#!/usr/bin/env python

from __future__ import print_function


from circuits import Component
from circuits.net.sockets import write
from circuits.web.servers import Server
from circuits.web.controllers import Controller
from circuits.web.websockets import WebSocketClient, WebSocketsDispatcher


class Echo(Component):

    channel = "wsserver"

    def connect(self, sock, host, port):
        print("WebSocket Client Connected:", host, port)
        self.fire(write(sock, "Welcome {}:{}".format(host, port)))

    def read(self, sock, data):
        self.fire(write(sock, "Received: " + data))


class Root(Controller):

    def index(self):
        return "Hello World!"


class Client(Component):

    channel = "ws"

    def init(self, *args, **kwargs):
        self.response = None

    def read(self, data):<commit_msg>Fix Python 2.6 compatibility with str.format()<commit_after>#!/usr/bin/env python

from __future__ import print_function


from circuits import Component
from circuits.net.sockets import write
from circuits.web.servers import Server
from circuits.web.controllers import Controller
from circuits.web.websockets import WebSocketClient, WebSocketsDispatcher


class Echo(Component):

    channel = "wsserver"

    def connect(self, sock, host, port):
        print("WebSocket Client Connected:", host, port)
        self.fire(write(sock, "Welcome {0:s}:{1:d}".format(host, port)))

    def read(self, sock, data):
        self.fire(write(sock, "Received: " + data))


class Root(Controller):

    def index(self):
        return "Hello World!"


class Client(Component):

    channel = "ws"

    def init(self, *args, **kwargs):
        self.response = None

    def read(self, data):
{'fraction_non_alphanumeric': 0.11607661056297155, 'fraction_numerical': 0.0023215322112594312, 'mean_word_length': 3.815642458100559, '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': '1979217', 'n_tokens_mistral': 529, 'n_tokens_neox': 489, 'n_words': 148}