Python 修改字典的 key

dictionary[new_key] = dictionary.pop(old_key) .pop() 将 Key-Value 条目取出(从字典中删除并返回该条目) 参考文章: Change the name of a key in dictionary

AWS Lambda 准备有平台相关性的 Python 依赖项程序包

native code 使用 docker 在 Amazon lambda runtime 环境mkdir lambda_headless_chrome_python cd lambda_headless_chrome_python 创建下面的 Dockerfile。 Dockerfile FROM lambci/lambda:build-python3.6 ENV AWS_DEFAULT_REGION ap-northeast-1 ENV APP_DIR /var/task ADD . . CMD pip install -r requirements.txt -t $APP_DIR && \ zip -9 deploy_package.zip lambda_function.py && \ zip -r9 deploy_package.zip * 创建 docker 镜

签名算法名称

Signature algorithm. Could be one of these values : HS256: HMAC using SHA-256 hash algorithm HS384: HMAC using SHA-384 hash algorithm HS512: HMAC using SHA-512 hash algorithm RS256: RSASSA using SHA-256 hash algorithm RS384: RSASSA using SHA-384 hash algorithm RS512: RSASSA using SHA-512 hash algorithm ES256: ECDSA using P-256 curve and SHA-256 hash algorithm ES384: ECDSA using P-384 curve and SHA-384 hash algorithm ES512: ECDSA using P-521 curve and SHA-512

AWS SAM CLI 的安装(macOS)

SAM (Serverless Application Model) 是 AWS 提供的一个用于构建无服务器应用程序的开源框架。 这里安装其命令行工具,用来方便快速部署 AWS Serverless 项目。 现在还提供了 GUI 和 CLI 版本,点击查看安

ffmpeg 按时间切分割视频

ffmpeg -i input.mp4 -ss start_time -to end_time -c copy output.mp4 start_time 是要开始切分的时间戳,以秒为单位。 end_time 是要结束切分的时间戳,以秒为单位。 -c copy 选项指示 ffmpeg 复制输入视频的音视频流,而不会重新