This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This supports merging as many adapters as you want. | |
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model> | |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
from peft import PeftModel | |
import torch | |
import os | |
import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT t.* | |
,CASE WHEN t.已发货退款原币>0 THEN '正数' WHEN t.已发货退款原币<0 THEN '负数' ELSE '零' END AS '已发货退款正数' | |
,CASE WHEN t.未发货退款原币>0 THEN '正数' WHEN t.未发货退款原币<0 THEN'负数' ELSE '零' END AS '未发货退款正数' | |
FROM (SELECT Platform , | |
PeriodTime ,r.VoucherName, | |
PeriodTime+Platform AS 'Uniqueid',COUNT(1) AS nums, | |
SUM(CASE IsDelivery | |
WHEN 1 THEN Amount | |
ELSE 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding=utf-8 | |
import re | |
import sys | |
from math import sqrt | |
import jieba | |
from logzero import logger | |
sys.path.append("../") | |
jieba.load_userdict('userdict.txt') |