|
|
|
@ -1,4 +1,5 @@
|
|
|
|
from typing import List, Tuple
|
|
|
|
from typing import List, Tuple
|
|
|
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def str2int(val, replace=0):
|
|
|
|
def str2int(val, replace=0):
|
|
|
|
@ -11,6 +12,10 @@ def str2int(val, replace=0):
|
|
|
|
return val
|
|
|
|
return val
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_today_date(fmt: str = "%Y-%m-%d"):
|
|
|
|
|
|
|
|
return datetime.today().strftime(fmt)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_list_key(array: List[dict], target: str, condition: Tuple[str, str]):
|
|
|
|
def get_list_key(array: List[dict], target: str, condition: Tuple[str, str]):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
给定一个list [{key: val1, target: val2}, {key: val1, target: val2}]
|
|
|
|
给定一个list [{key: val1, target: val2}, {key: val1, target: val2}]
|
|
|
|
|