摘要: Git 使用手册 restore git restore 用于将文件恢复到指定提交的状态。 默认操作 工作区,加上 --staged 参数则操作 暂存区。 1. 从哪里恢复 从暂存区恢复(索引) git restore --source index ⚡ 实际不可以指定--source 为 index 阅读全文
posted @ 2025-12-14 11:56 岁叶年华 阅读(3) 评论(0) 推荐(0)
摘要: 一、日志等级 Logging中的日志等级如下: import logging import logging # 设置打印日志的级别,level级别以上的日志会打印出 # level=logging.DEBUG 、INFO 、WARNING、ERROR、CRITICAL def log_testing 阅读全文
posted @ 2024-01-23 22:52 岁叶年华 阅读(192) 评论(0) 推荐(0)
摘要: def remove_none_values_iterative(data): stack = [data] while stack: current = stack.pop() if isinstance(current, dict): for key, value in list(current 阅读全文
posted @ 2024-01-22 23:40 岁叶年华 阅读(22) 评论(0) 推荐(0)
摘要: def find_paths_and_modify(data, target_path, new_value): paths = [] stack = [([], data)] while stack: current_path, current_data = stack.pop() if isin 阅读全文
posted @ 2024-01-16 23:40 岁叶年华 阅读(26) 评论(0) 推荐(0)
摘要: def refresh_dict(original_dict, rules): updated_dict = original_dict.copy() for field, rule in rules.items(): field_chain = field.split('.') current_d 阅读全文
posted @ 2024-01-14 23:59 岁叶年华 阅读(17) 评论(0) 推荐(0)
摘要: # 使用深度搜索栈的方式实现 class Solution: def canFinish(self, numCourses, prerequisites): # 构建图的邻接表 self.graph = {i: [] for i in range(numCourses)} for edge in p 阅读全文
posted @ 2024-01-11 23:08 岁叶年华 阅读(15) 评论(0) 推荐(0)