摘要:import cv2 def Image_gray(image):#灰度化函数 h, w, ch = image.shape for row in range(h): for col in range(w): b = image[row, col, 0] g = image[row, col, 1]
阅读全文
摘要:堆 Heap 一种二叉树的结构 - >完全二叉树 https://www.jianshu.com/p/801318c77ab5 https://www.cnblogs.com/namejr/p/9942411.html """Heap queue algorithm (a.k.a. priority
阅读全文
摘要:https://stackoverflow.com/questions/54274630/can-not-import-protocol-from-typing
阅读全文
摘要:用 __all__ 暴露接口 Python 可以在模块级别暴露接口: __all__ = ["foo", "bar"]不像 Ruby 或者 Java,Python 没有语言原生的可见性控制,而是靠一套需要大家自觉遵守的”约定“下工作。比如下划线开头的应该对外部不可见。同样,__all__ 也是对于模
阅读全文