def __init__(self): self.log = Logger() self.res = ResponseFunc() self.write_excel = WriteExcel( r'E:\Auto-interface\data\unit_management\unit_management_uuid.xlsx', '单位管理') self.res_filter = ResponseFilter()
def __init__(self): self.log = Logger() self.res = ResponseFunc() self.res_filter = ResponseFilter() self.write_excel = WriteExcel( r'E:\Auto-interface\data\infrastructure\infrastructure_uuid.xlsx', '楼栋房屋')
def setUpClass(cls) -> None: cls.log = Logger() cls.unit_management_b = UnitManagementBusniess() cls.replace_unit_delete = ReplaceData(unit_delete_data, unit_case_file, '单位管理删除') cls.replace_unit_delete.replace_data_sheet(unit_uuid_data) cls.new_unit_delete_data = GetExcelCase(unit_case_file, '单位管理查找').get_dict_data
def setUpClass(cls) -> None: cls.log = Logger() cls.unit_uuid_file = ReadConf().get_conf('UNITMANAGEMENTUUID').get('unit_management_uuid') cls.unit_management_b = UnitManagementBusniess() cls.replace_unit_query = ReplaceData(unit_query_data, unit_case_file, '单位管理查找') cls.new_infrastructure_uuid_data = GetExcelCase(infrastructure_uuid_file, '楼栋房屋').get_dict_data cls.replace_unit_query.replace_data_sheet(cls.new_infrastructure_uuid_data) cls.new_unit_query_data = GetExcelCase(unit_case_file, '单位管理查找').get_dict_data
def setUpClass(cls) -> None: cls.log = Logger() cls.infrastructrue_b = InfrastructureBusniess() cls.uuid_data = GetExcelCase(uuid_file, '楼栋房屋').get_dict_data cls.replace_infrastructure_delete = ReplaceData( delete_excel_data, infrastructure_case_file, '楼栋房屋删除') cls.replace_infrastructure_delete.replace_data_sheet(cls.uuid_data) cls.new_infrastructure_delete_data = GetExcelCase( infrastructure_case_file, '楼栋房屋删除').get_dict_data
def setUpClass(cls) -> None: cls.log = Logger() cls.unit_management_b = UnitManagementBusniess()
# -*- coding:utf-8 -*- from flask import Flask, request from tools.log import Logger from algrithm import get_curve_points, get_multi_curve_points from werkzeug import secure_filename import json log = Logger('./logs/server.log', level='info') app = Flask(__name__) app.config.from_object('setting') @app.route('/get_curve_points', methods=['POST', 'GET']) def curve_gcn(): return curve_point(request) def curve_point(request): if request.method == 'POST': log.logger.info('get single region post info') data = str(request.data, encoding='utf-8') json_data = json.loads(data) log.logger.debug(json_data) poly = get_curve_points(json_data['img_path'], json_data['region'], int(app.config['CONTEXT_SCALE'])) result = { 'poly': poly.tolist() #numpy array can't convert to json } log.logger.debug(result) return json.dumps(result, indent=4, ensure_ascii=False) return 'index html'
import torch import argparse from data_reader.dataReader import DataReader from model.sentence_bert import SentenceBert from torch.utils.data import DataLoader import torch.nn.functional as F import pandas as pd from transformers import BertTokenizer, BertConfig import os from tools.progressbar import ProgressBar from tools.log import Logger from datetime import datetime logger = Logger('sbert_loger', log_level=10).logger os.environ['CUDA_VISIBLE_DEVICES'] = "0" def parse_args(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("--max_len", type=int, default=64) parser.add_argument( "--val_file", type=str, default= './output/classification/classification_val_dataset_2w_similarity.xlsx', help="train text file") parser.add_argument( "--pretrained",
def __init__(self): self.requests_func = RequestsFunc() self.res_filter = ResponseFilter() self.log = Logger()
# encoding: utf-8 from tools.log import Logger logger = Logger()
def __init__(self, ): self.log = Logger()
def setUpClass(cls) -> None: cls.log = Logger() cls.infrastructrue_b = InfrastructureBusniess()
def __init__(self): self.config_parser = ConfigParser self.log = Logger()
def __initconf(self): self.db_info = get_project_config('database.yaml') self.user_info = get_project_config('user.yaml') self.mail_info = get_project_config('email.yaml') self.logger = Logger() self.host_info = get_project_config('hosts.yaml')
def __init__(self, old_excel_data, write_file_name, write_sheet_name): self.write_excel = WriteExcel(file_name=write_file_name, sheet_name=write_sheet_name) self.log = Logger() self.old_excel_data = old_excel_data
def setUpClass(cls) -> None: cls.log = Logger() cls.res = ResponseFunc() cls.write_c = WriteConf()