def __init__(self, company_id, company_name, inc_company_name): self.company_id = company_id self.company_name = company_name self.inc_company_name = inc_company_name self.project_id, self.deal_id = company_id.split('_') self.lmdb_obj = webdatastore() self.output_path = '/var/www/html/fundamentals_intf/output/'
def __init__(self): self.output_path = '/var/www/html/fundamentals_intf/output/' self.lmdb_obj = webdatastore() self.global_delta_score = {} self.Mobj = slt_map_sectiontype.Map_sectiontype() self.value_to_txt_dict = {} self.txt_to_value_ref_map = {} self.doc_table_html_dict = {} pass
def __init__(self, config_path='/root/databuilder_train_ui/tenkTraining/Table_Tagging_Training_V2/pysrc/dbConfig.ini'): self.config_path = config_path self.config = ConfigParser.ConfigParser() self.config.read(config_path) self.dbpath = self.config.get('modeldb', 'value') self.qObj = sqLiteApi.sqLiteApi() self.objX = xlsxReader.xlsxReader() self.db_tab = 'tas_company.db' self.cObj = schrodersData.schrodersData(config_path) self.output_path = '/var/www/html/fundamentals_intf/output/' self.lmdb_obj = webdatastore() self.md_col_list = [('row_id', 'INTEGER PRIMARY KEY AUTOINCREMENT'), ('old_doc_name', 'VARCHAR(256)'), ('document_type', 'VARCHAR(256)'), ('filing_type', 'VARCHAR(256)'), ('period', 'VARCHAR(256)'), ('reporting_year', 'VARCHAR(256)'), ('doc_name', 'VARCHAR(256)'), ('doc_release_date', 'VARCHAR(256)'), ('doc_from', 'VARCHAR(256)'), ('doc_to', 'VARCHAR(256)'), ('doc_download_date', 'VARCHAR(256)'), ('doc_prev_release_date', 'VARCHAR(256)'), ('doc_next_release_date', 'VARCHAR(256)'), ('review_flg', 'INTEGER'), ('doc_id', 'INTEGER')]
import os, sys, copy import MySQLdb import ConfigParser from db.webdatastore import webdatastore objdb = webdatastore() class GetTaxoTreeInfo(): def __init__(self, cf): self.config_path = cf self.config = ConfigParser.ConfigParser() self.config.read(cf) self.dbpath = self.config.get('modeldb', 'value') self.pc_dbpath = self.config.get('model_name_det', 'pc_db') def connection(self): data = self.config.get('database', 'value') khost, kpasswd, kuser, kdb = data.split('##') conn = MySQLdb.connect(khost, kuser, kpasswd, kdb) cur = conn.cursor() return cur, conn def get_agent_id_from_doc_id(self, doc_id): stmt = "select agent_id from document_master where document_id = %s" % ( doc_id) cur, con = self.connection() cur.execute(stmt) res = cur.fetchone() con.close() if res: return res[0]
import os, sys, copy import MySQLdb import pprocess import shelve, time import sets, commands, lmdb import read_norm_cell_data as Slt_normdata sObj = Slt_normdata.Slt_normdata() from db.webdatastore import webdatastore lmdb_obj = webdatastore() import slt_map_sectiontype as slt_map_sectiontype Mobj = slt_map_sectiontype.Map_sectiontype() import font_id_for_text_final as Font_id_text StlyObj = Font_id_text.Font_id_text() import xml_to_bbox_normid as cell_id_bbox Xml_Cell_Obj = cell_id_bbox.cell_id_bbox() output_path = '/var/www/html/fundamentals_intf/output/' import sqLite.sqLiteApi as sqLiteApi qObj = sqLiteApi.sqLiteApi() from googletrans import Translator translator = Translator() sys.path.append('/root/muthu_translate/') import socket_client_utils2 as socket_client_utils2 #import html_entity_to_single_char import common.convert as convert convob = convert.convert() def index_all_table(company_id): from getCompanyName_machineId import getCN_MID getCompanyName_machineId = getCN_MID() company_name, machine_id = getCompanyName_machineId[company_id]