<commit_before>import socket
import os

PORT = "8004"


def hostname():
    return (socket.gethostname())


cookie_str = {
    'admin_user': 'admin_user',
    'is_login': 'islogin',
    'user': 'user'
}

# 固定文字
e = {

}
# 配置的参数  Magic String
class c(object):
    free_refresh_num_a_day = 500
    vip_refresh_num_a_day = 500
    free_publish_num_a_day = 500
    vip_publish_num_a_day = 500
    vip_tuiguang_num_a_day = 500
    vip_yuyue_num_a_day = 500
    coupon_num_a_day = 500
    info_list_per_page = 20  # list中，每页列出的数目
    refresh_timeout = 60 * 60000  # 60 * 10 * 24 * 3,
    zhiding_timeout = 60 * 60000  # 60 * 20 * 24 * 1,
    tuiguang = 60 * 60000  # 60 * 30 * 24 * 2
    rmb2jinbi = 30
    jinbi2jifen = 100
    jinbi2publish = 30
    jinbi2refresh = 40
    jinbi2zhiding = 30


timeout = {
    'refresh': 60 * 60,
    'zhiding': 60 * 60,
    'tuiguang': 60 * 60,

}
# 超时的设置
# time_out = {'refresh': 60 * 60,  # 60 * 10 * 24 * 3,
# 'zhiding': 60 * 60 ,  # 60 * 20 * 24 * 1,
#             'tuiguang': 60 * 60,  # 60 * 30 * 24 * 2
# }
#


if hostname() == 'g':
    cookie_secret = "61oET0p6;h.n/k'oi[8-8=y]hpro2kshqakjw",
    mysql = {
        'dbname': 'jihy',
        'dbuser': 'root',
        'dbpass': '<PASSWORD>',
    }

    postgresql = {
        'dbname': 'jhy',
        'dbuser': 'jhyer',
        'dbpass': '<PASSWORD>',
    }
    mongo = {
        'dbname': 'jdhby',
        'dbuser': 'bk',
        'dbpass': '<PASSWORD>',
    }
    img_base_dir = '/opt/pyweb/jihy/jihy_src/static/'

if hostname() == 'bgs':
    cookie_secret = "61oET0p6;h.n/k'oi[8-8=y]hpro2kshqakjw",
    mysql = {
        'dbname': 'jhy',
        'dbuser': 'root',
        'dbpass': '<PASSWORD>',
    }

    postgresql = {
        'dbname': 'jhy',
        'dbuser': 'jhyer',
        'dbpass': '<PASSWORD>',
    }
    mongo = {
        'dbname': 'jdhby',
        'dbuser': 'bk',
        'dbpass': '<PASSWORD>',
    }
    img_base_dir = '/opt/pyweb/jihy/jihy_src/static/'
elif hostname() == 'fb':
    cookie_secret = "61oETzKXQAGaYdkL5gE64yrhjnv,n.k/o'p[9-",

    postgresql = {
        'dbname': 'cmidb',
        'dbuser': 'cmi',
        'dbpass': '<PASSWORD>',
    }
    mongo = {
        'dbname': 'jdhby',
        'dbuser': 'bk2',
        'dbpass': '<PASSWORD>',
    }
    img_base_dir = '/home/ycb/jhy/jiheying/static/'
else:
    pass

cookie_secret = str(cookie_secret)
mark_img = os.path.join(img_base_dir, 'fixed/mark.png')

# self.db = tornpg.Connection('localhost', 'jhy', 'jhyer', 'j131322')
#
def_field = {
    'tuiguang_out_time': 'tg_out_time',
    'zhiding_out_time': 'zd_out_time',
    'refresh_out_time': 'refresh_out_time',
    'def_create_time': 'def_create_time',
    'def_update_time': 'def_update_time',
    'def_create_time_str': 'def_create_time_str',
    'def_update_time_str': 'def_update_time_str',
    'info_uid': 'def_uid'
}

copyright = {'company': '中国科学院东北地理与农业生态研究所',
             'ICP': '吉ICP备14004848号',
             'domainame': 'http:///'}

default_touxiang = 'fixed/touxiang.jpg'<commit_msg>fix some bugs.<commit_after>import socket
import os

PORT = "8004"


def hostname():
    return (socket.gethostname())


cookie_str = {
    'admin_user': 'admin_user',
    'is_login': 'islogin',
    'user': 'user'
}

# 固定文字
e = {

}
# 配置的参数  Magic String
class c(object):
    free_refresh_num_a_day = 500
    vip_refresh_num_a_day = 500
    free_publish_num_a_day = 500
    vip_publish_num_a_day = 500
    vip_tuiguang_num_a_day = 500
    vip_yuyue_num_a_day = 500
    coupon_num_a_day = 500
    info_list_per_page = 20  # list中，每页列出的数目
    refresh_timeout = 60 * 60000  # 60 * 10 * 24 * 3,
    zhiding_timeout = 60 * 60000  # 60 * 20 * 24 * 1,
    tuiguang = 60 * 60000  # 60 * 30 * 24 * 2
    rmb2jinbi = 30
    jinbi2jifen = 100
    jinbi2publish = 30
    jinbi2refresh = 40
    jinbi2zhiding = 30


timeout = {
    'refresh': 60 * 60,
    'zhiding': 60 * 60,
    'tuiguang': 60 * 60,

}
# 超时的设置
# time_out = {'refresh': 60 * 60,  # 60 * 10 * 24 * 3,
# 'zhiding': 60 * 60 ,  # 60 * 20 * 24 * 1,
#             'tuiguang': 60 * 60,  # 60 * 30 * 24 * 2
# }
#


if hostname() == 'g':
    cookie_secret = "<KEY>",
    mysql = {
        'dbname': 'jihy',
        'dbuser': 'root',
        'dbpass': '<PASSWORD>',
    }

    postgresql = {
        'dbname': 'jhy',
        'dbuser': 'jhyer',
        'dbpass': '<PASSWORD>',
    }
    mongo = {
        'dbname': 'jdhby',
        'dbuser': 'bk',
        'dbpass': '<PASSWORD>',
    }
    img_base_dir = '/opt/pyweb/jihy/jihy_src/static/'

else :
    cookie_secret = "61oET0p6;h.n/k'oi[8-8=y]hpro2kshqakjw",
    mysql = {
        'dbname': 'pycate',
        'dbuser': 'root',
        'dbpass': '<PASSWORD>',
    }

    mongo = {
        'dbname': 'pycate',
        'dbuser': 'pycate',
        'dbpass': '<PASSWORD>',
    }
    img_base_dir = '/opt/pyweb/jihy/jihy_src/static/'

cookie_secret = str(cookie_secret)
mark_img = os.path.join(img_base_dir, 'fixed/mark.png')

# self.db = tornpg.Connection('localhost', 'jhy', 'jhyer', 'j131322')
#
def_field = {
    'tuiguang_out_time': 'tg_out_time',
    'zhiding_out_time': 'zd_out_time',
    'refresh_out_time': 'refresh_out_time',
    'def_create_time': 'def_create_time',
    'def_update_time': 'def_update_time',
    'def_create_time_str': 'def_create_time_str',
    'def_update_time_str': 'def_update_time_str',
    'info_uid': 'def_uid'
}

copyright = {'company': '中国科学院东北地理与农业生态研究所',
             'ICP': '吉ICP备14004848号',
             'domainame': 'http:///'}

default_touxiang = 'fixed/touxiang.jpg'
{'fraction_non_alphanumeric': 0.1656686626746507, 'fraction_numerical': 0.05733986572309926, 'mean_word_length': 2.6002612671456564, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '2587278', 'n_tokens_mistral': 2595, 'n_tokens_neox': 2355, 'n_words': 409}