<commit_before># -*- coding:utf-8 -*-
from __future__ import unicode_literals
import sys

reload(sys)
sys.setdefaultencoding('utf-8')
try:
    import uniout
except ImportError:
    logger.info('安装 uniout 库能够直接显示 unicode 内容')

from . import api
from .core import g
from .session import AuthSession
from .logger import hfut_stu_lib_logger as logger

__title__ = 'hfut_stu_lib'
__version__ = '0.3.0'
__author__ = 'erliang'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 erliang'

SITE_ENCODING = 'gbk'
HOST_URL = 'http://172.16.31.10/'

GUEST = 'guest'
STUDENT = 'student'
TEACHER = 'teacher'
ADMIN = 'admin'
USER_TYPES = (STUDENT, TEACHER, ADMIN)<commit_msg>- 20151029 v0.3.0     1. 修改 regist_api 为 register_api     2. 默认在安装uniout的情况下使用其输出unicode内容方便使用     3. 改用元类来绑定接口, 提升申明对象时的效率     4. 预定义了用户类型, user_type 参数使用预定义变量     5. cal_gpa 精度改为5位小数, 与学校一致     6. 添加缓存功能, 你可以通过一个全局的缓存管理对象管理缓存了, 模块内置了 MemoryCache 和 FileCache, 当然你也可以继承 BaseCache 编写新的缓存管理对象, 模块会自动帮你注册<commit_after># -*- coding:utf-8 -*-
from __future__ import unicode_literals
import sys

reload(sys)
sys.setdefaultencoding('utf-8')
try:
    import uniout
except ImportError:
    logger.info('安装 uniout 库能够直接显示 unicode 内容')

__title__ = 'hfut_stu_lib'
__version__ = '0.3.0'
__author__ = 'erliang'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 erliang'

SITE_ENCODING = 'gbk'
HOST_URL = 'http://172.16.31.10/'

GUEST = 'guest'
STUDENT = 'student'
TEACHER = 'teacher'
ADMIN = 'admin'
USER_TYPES = (STUDENT, TEACHER, ADMIN)

# 上面的常量会被其他模块用到, 所以需要先声明
from . import api
from .core import g
from .session import AuthSession
from .logger import hfut_stu_lib_logger as logger
{'fraction_non_alphanumeric': 0.10642201834862386, 'fraction_numerical': 0.03302752293577982, 'mean_word_length': 4.602739726027397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '628236', 'n_tokens_mistral': 775, 'n_tokens_neox': 776, 'n_words': 162}