def prepare(filePath: str) -> Tuple[List[str], pd.DataFrame]:
    files = os.listdir(filePath)
    # 已处理文件
    dataOld = readJson(saveM['Record']['Path'], funcClass)
    filesNew = list(set(files).difference(set(dataOld)))
    # 读取权重数据
    weight = getData(readM['weight500'], DBN.PKL)

    return filesNew, weight
Exemplo n.º 2
0
def prepare(filePath: str) -> List[Tuple[str, str]]:
    with open(filePath, 'rb') as f:
        UpLimitStock = pickle.load(f)
    data = (UpLimitStock['date'] + '_' + UpLimitStock['stock_id']).to_list()

    # 已处理文件
    dataOld = readJson(saveM['Record']['Path'], funcClass)

    # 数据参数
    UpLimitStock_ID = list(set(data).difference(set(dataOld)))

    return UpLimitStock_ID
Exemplo n.º 3
0
def prepare(filePath: str) -> List[str]:
    folderFiles = os.listdir(filePath)
    # 已处理文件
    dataOld = readJson(saveM['Record']['Path'], funcClass)
    # 过滤文件夹
    folderFiles = [file_ for file_ in folderFiles if len(file_.split('.')) == 1]

    # 生成文件夹
    subFolderPath = []
    for subFolder in folderFiles:
        subFolders2 = os.listdir(os.path.join(filePath, subFolder))
        # 过滤已处理文件
        subFoldersE = list(set(subFolders2).difference(set(dataOld)))
        subFolderPath += [os.path.join(os.path.join(filePath, subFolder), x) for x in subFoldersE]

    return subFolderPath
Exemplo n.º 4
0
def prepare(filePath: str) -> List[str]:
    files = os.listdir(filePath)
    # 已处理文件
    dataOld = readJson(saveM['Record']['Path'], funcClass)
    filesNew = list(set(files).difference(set(dataOld)))
    return filesNew