01 2021 档案

摘要:list1 = [] if list1 == []: print("空列表") # 空列表 if not list1: print("空列表") # 空列表 a = None if a == None: print("a为None") # a为None if not a: print("a为None 阅读全文
posted @ 2021-01-30 21:11 道友请留步W 阅读(269) 评论(0) 推荐(0) 编辑
摘要:git 回退到某个版本,并推送到远程 git reset --hard xxxx 本地代码回滚了,落后于远程分支,push是推不上去的 git push -f -u origin dev 使用以上命令强制推送 git revert 也可以,详情百度 阅读全文
posted @ 2021-01-28 14:03 道友请留步W 阅读(53) 评论(0) 推荐(1) 编辑
摘要:import os import sys def get_current(): print(os.getcwd()) print(sys.argv[0]) print(os.path.abspath("../..")) print(os.path.abspath("..")) print(os.pa 阅读全文
posted @ 2021-01-21 10:52 道友请留步W 阅读(439) 评论(0) 推荐(0) 编辑
摘要:# Python2 import time def get_current_time(): current_time = time.localtime(time.time()) current_time = time.strftime('%Y-%m-%d %H:%M:%S', current_tim 阅读全文
posted @ 2021-01-18 17:04 道友请留步W 阅读(375) 评论(0) 推荐(0) 编辑
摘要:VUE 1. 第一个VUE程序 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> 阅读全文
posted @ 2021-01-17 15:35 道友请留步W 阅读(48) 评论(0) 推荐(0) 编辑
摘要:windows: pycharm选择Conda executable路径: D:\XXX\Anaconda3\Scripts\conda.exe Conda 环境存放位置: D:\XXX\Anaconda3\envs 清除其他的软件源, 添加清华源 conda config --remove-key 阅读全文
posted @ 2021-01-16 22:20 道友请留步W 阅读(1040) 评论(0) 推荐(0) 编辑
摘要:import time from threading import Thread import inspect import ctypes def _async_raise(tid, exctype): """Raises an exception in the threads with id ti 阅读全文
posted @ 2021-01-13 17:14 道友请留步W 阅读(395) 评论(0) 推荐(0) 编辑
摘要:import inspect # 定义一个函数 def func(): print("第一行") print("第二行") if __name__ == '__main__': # 使用 inspect.getsourcelines() 函数获取对象源码和开始行数 inspect_res = ins 阅读全文
posted @ 2021-01-12 15:33 道友请留步W 阅读(561) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示