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
from boto3.dynamodb.types import TypeDeserializer, TypeSerializer | |
def from_dynamodb_to_json(item): | |
d = TypeDeserializer() | |
return {k: d.deserialize(value=v) for k, v in item.items()} |
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
"python.formatting.provider": "black", | |
"python.formatting.blackArgs": [ | |
"--skip-string-normalization" | |
] |
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
import os | |
import sys | |
# 重命名当前文件夹下的所有文件。 | |
path = os.path.dirname(os.path.realpath(__file__)) | |
print(path) | |
onlyfiles = [ | |
f for f in os.listdir(path) if os.path.isfile(os.path.join(path, f)) and not f.startswith(".") | |
] |
OlderNewer