<commit_before># -*- coding: utf-8 -*-

from flask.ext.babel import gettext
from ..division import Division
from database_utils import init_db
from ldap_utils import init_ldap
from ipaddress import IPv4Network
import user


def init_context(app):
    init_db(app)
    init_ldap(app)


division = Division(
    name='hss',
    display_name=gettext(u"Hochschulstraße"),
    user_class=user.User,
    mail_server=u"wh12.tu-dresden.de",
    subnets=[
        IPv4Network(u'172.16.17.32/24'),  # HSS 46
        IPv4Network(u'172.16.31.10/25'),  # HSS 46
        IPv4Network(u'192.168.127.12/24'),  # HSS 48
        IPv4Network(u'172.16.58.3/25'),  # HSS 48
        IPv4Network(u'192.168.3.11/24'),  # HSS 50
    ],
    init_context=init_context
)<commit_msg>Make data source module for hss division debug-only, until it is fixed<commit_after># -*- coding: utf-8 -*-

from flask.ext.babel import gettext
from ..division import Division
from database_utils import init_db
from ldap_utils import init_ldap
from ipaddress import IPv4Network
import user


def init_context(app):
    init_db(app)
    init_ldap(app)


division = Division(
    name='hss',
    display_name=gettext(u"Hochschulstraße"),
    user_class=user.User,
    mail_server=u"wh12.tu-dresden.de",
    subnets=[
        IPv4Network(u'172.16.17.32/24'),  # HSS 46
        IPv4Network(u'172.16.31.10/25'),  # HSS 46
        IPv4Network(u'192.168.127.12/24'),  # HSS 48
        IPv4Network(u'172.16.58.3/25'),  # HSS 48
        IPv4Network(u'192.168.3.11/24'),  # HSS 50
    ],
    init_context=init_context,
    debug_only=True
)
{'fraction_non_alphanumeric': 0.13005050505050506, 'fraction_numerical': 0.0946969696969697, 'mean_word_length': 3.193121693121693, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 10, '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': '5178040', 'n_tokens_mistral': 700, 'n_tokens_neox': 600, 'n_words': 116}