上一页 1 2 3 4 5 6 7 8 ··· 37 下一页
摘要: map reduce filter sort sorted lambda 组合起来的使用 map map(function, sequence[, sequence, ...]) -> map对象 对sequence中的item依次执行function(item),执行结果输出为map对象 可迭代对 阅读全文
posted @ 2022-04-27 10:35 索匣 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 查询的历程 线性查找 HASH:冗余的数组实现的,查询快,但占用空间 B+树和二叉树有什么区别 二叉树:插入和查询很快(logn),无法存大规模数据,复杂度退化(二叉树是n个节点的有限集) 平衡树:解决bst退化的问题,树是平衡的;节点非常多的时候,依然树高很高 多路查找树:一个父亲多个孩子节点(度 阅读全文
posted @ 2022-04-22 20:55 索匣 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 回文数 自己的蠢,好像经常忘记写range(),在对于len()的时候 class Solution: def isPalindrome(self, x: int) -> bool: if x == 0 or not x: return False x = str(x) # 像这样的报错咋不劝退人 阅读全文
posted @ 2022-04-18 15:44 索匣 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 从哪入手,要看需求 阅读全文
posted @ 2022-04-11 14:43 索匣 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 一些工具和快捷键 在designer中可以使用ctrl + r 即可实现可视化页面 vscode可使用PYQT Integration该插件,右键点击生成的ui文件拉到最下面Compile Form即可生成python界面 基本组件 一般需要导入的包 from PyQt5.QtWidgets imp 阅读全文
posted @ 2022-04-07 14:59 索匣 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 使用inspect模块查看是否模块中有类 比如OS模块的类就有['DirEntry', 'MutableMapping', 'PathLike', '_Environ', '_wrap_close', 'error', 'stat_result', 'statvfs_result', 'termin 阅读全文
posted @ 2022-04-07 11:53 索匣 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 日常用语 TODO(该功能未实现,可用TODO注释),英文意思是待办 DEMO(小的案例,示范) 特定语言常用语 python 函数嵌套 递归 variable 变量 descriptor 描述器 dictionary 字典 generator 生成器 generator iterator 生成器迭 阅读全文
posted @ 2022-04-05 10:39 索匣 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 转换工作目录 有些必须要在当前工作目录下执行,而我们的脚本位置却不在当前目录 import os import sys path=r"D:xxxx" # 列出该文件夹里的所有文件,这里获取的是一个列表啊 fileList = os.listdir(path) currentpath = os.get 阅读全文
posted @ 2022-04-03 10:08 索匣 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 先掌握下 systemctl+firewall 命令 描述 命令 查看firewall状态 systemctl status firewalld.service 启动firewall systemctl start firewalld 停止firewall systemctl stop firewa 阅读全文
posted @ 2022-04-02 08:57 索匣 阅读(58) 评论(0) 推荐(0) 编辑
摘要: tkinter 缺陷 调整按钮位置很难,要提前设置好布局(不支持坐标位置),但python内置库,运行效率高 https://www.tianqiweiqi.com/python-tkinter-place-pack-grid.html#tkinter-place-01 wxpython 支持坐标位 阅读全文
posted @ 2022-04-01 10:52 索匣 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 37 下一页