<commit_before>import sys
import os
import io
import threading
import traceback
import html
import json
import base64
import http
import multiprocessing

from PIL import Image
import numpy as np

# from .fserver import AsyncTCPServer, AsyncHTTPRequestHandler
from . import fserver

from ..fpbench import fpcparser, fpcast as ast
from ..titanic import digital, ndarray
from ..arithmetic import interpreter, analysis
from ..arithmetic import ieee754, posit
from ..arithmetic import softfloat, softposit
from ..arithmetic import sinking, sinkingposit
from ..arithmetic import mpmf

here = os.path.dirname(os.path.realpath(__file__))
dist = os.path.join(here, 'dist')

def path_aliases(path):
    stripped_path = path.lstrip('/')
    yield stripped_path
    if stripped_path == '':
        yield 'index.html'
    if not stripped_path.endswith('.html'):
        yield stripped_path + '.html'

webdemo_eval_backends = {
    'ieee754': ieee754.Interpreter,
    'posit': posit.Interpreter,
    'softfloat': softfloat.Interpreter,
    'softposit': softposit.Interpreter,
    'sinking-point': sinking.Interpreter,
    'sinking-posit': sinkingposit.Interpreter,
    'mpmf': mpmf.Interpreter,
}

webdemo_float_backends = {
    'ieee754', 'softfloat', 'sinking-point'
}
<commit_msg>remove softfloat/softposit from webdemo, to reduce dependencies<commit_after>import sys
import os
import io
import threading
import traceback
import html
import json
import base64
import http
import multiprocessing

from PIL import Image
import numpy as np

# from .fserver import AsyncTCPServer, AsyncHTTPRequestHandler
from . import fserver

from ..fpbench import fpcparser, fpcast as ast
from ..titanic import digital, ndarray
from ..arithmetic import interpreter, analysis
from ..arithmetic import ieee754, posit
#from ..arithmetic import softfloat, softposit
from ..arithmetic import sinking, sinkingposit
from ..arithmetic import mpmf

here = os.path.dirname(os.path.realpath(__file__))
dist = os.path.join(here, 'dist')

def path_aliases(path):
    stripped_path = path.lstrip('/')
    yield stripped_path
    if stripped_path == '':
        yield 'index.html'
    if not stripped_path.endswith('.html'):
        yield stripped_path + '.html'

webdemo_eval_backends = {
    'ieee754': ieee754.Interpreter,
    'posit': posit.Interpreter,
    #'softfloat': softfloat.Interpreter,
    #'softposit': softposit.Interpreter,
    'sinking-point': sinking.Interpreter,
    'sinking-posit': sinkingposit.Interpreter,
    'mpmf': mpmf.Interpreter,
}

webdemo_float_backends = {
    'ieee754', 'softfloat', 'sinking-point'
}

{'fraction_non_alphanumeric': 0.09841759938247781, 'fraction_numerical': 0.010806638363566191, 'mean_word_length': 4.422594142259414, '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': '2813246', 'n_tokens_mistral': 835, 'n_tokens_neox': 816, 'n_words': 230}