<commit_before>from __future__ import absolute_import,unicode_literals
'''
An API to assist with the creation and enforcement of cortex data models.
'''
import re
import time
import socket
import struct
import fnmatch
import datetime
import functools
import collections

import synapse.lib.tags as s_tags
import synapse.lib.types as s_types

from synapse.common import *

hexre = re.compile('^[0-9a-z]+$')
propre = re.compile('^[0-9a-zA-Z:_]+$')

def propdef(name, **info):
    return (name,info)

tlib = s_types.TypeLib()
def getTypeRepr(name, valu):
    '''
    '''
    return tlib.reqDataType(name).repr(valu)

def getTypeNorm(name, valu):
    '''
    '''
    return tlib.reqDataType(name).norm(valu)

def getTypeFrob(name, valu):
    '''
    '''<commit_msg>datamodel: disallow mixed case props<commit_after>from __future__ import absolute_import,unicode_literals
'''
An API to assist with the creation and enforcement of cortex data models.
'''
import re
import time
import socket
import struct
import fnmatch
import datetime
import functools
import collections

import synapse.lib.tags as s_tags
import synapse.lib.types as s_types

from synapse.common import *

hexre = re.compile('^[0-9a-z]+$')
propre = re.compile('^[0-9a-z:_]+$')

def propdef(name, **info):
    return (name,info)

tlib = s_types.TypeLib()
def getTypeRepr(name, valu):
    '''
    '''
    return tlib.reqDataType(name).repr(valu)

def getTypeNorm(name, valu):
    '''
    '''
    return tlib.reqDataType(name).norm(valu)

def getTypeFrob(name, valu):
    '''
    '''
{'fraction_non_alphanumeric': 0.1297016861219196, 'fraction_numerical': 0.005188067444876783, 'mean_word_length': 4.433098591549296, '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': '5768971', 'n_tokens_mistral': 537, 'n_tokens_neox': 530, 'n_words': 140}