摘要: `multiprocessing.Event()` 是 Python 中的一个类,用于在多进程之间共享布尔变量。这个类提供了一种简单的并发原语,允许进程之间进行通信。`multiprocessing.Event()` 包装了一个布尔变量,可以设置为“已设置”(True)或“未设置”(False)。进 阅读全文
posted @ 2023-12-27 21:46 MoKin_Li 阅读(69) 评论(0) 推荐(0) 编辑
摘要: Python的signal模块允许您设置信号处理程序,以便在接收到特定信号时执行自定义操作。信号是操作系统向程序传递信息的一种方式。在Python中,您可以使用signal.signal()函数注册信号处理程序,以便在接收到特定信号时执行自定义操作。例如,当按下键盘上的Ctrl + C时,操作系统会 阅读全文
posted @ 2023-12-27 19:59 MoKin_Li 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 传感器获取数据; 传感器获取到的数据,涉及:编码、表示、关联、转化、理解、检索与增强等各种多媒体处理技术; 传感器获取多媒体信息 多媒体信息成为卷积神经网络、循环神经网络、多模态大模型、数据与知识融合方法等智能技术的主要处理对象 多媒体数据的特点: 1. 异构性、多源性、多义性 2. 数据海量,分布 阅读全文
posted @ 2023-12-21 18:37 MoKin_Li 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 工厂函数看上去有点像函数,实质上他们是类,当你调用它们时,实际上是生成了该类型的一个实例,就像工厂生产货物一样。 阅读全文
posted @ 2023-12-07 18:52 MoKin_Li 阅读(6) 评论(0) 推荐(0) 编辑
摘要: class DataSet(object): def __init__(self): self._images = 1 self._labels = 2 #定义属性的名称 @property def images(self): #方法加入@property后,这个方法相当于一个属性,这个属性可以让用 阅读全文
posted @ 2023-12-07 10:51 MoKin_Li 阅读(2) 评论(0) 推荐(0) 编辑
摘要: @property --> 装饰器,创建只读属性 @property + 方法 --> 方法变为只读属性,防止属性被修改; class DataSet(object): @property def method_with_property(self): ##含有@property return 15 阅读全文
posted @ 2023-12-07 10:49 MoKin_Li 阅读(1) 评论(0) 推荐(0) 编辑
摘要: LDAP 轻量级目录访问协议 Lightweight Directory Access Protocol CS架构 Active Directory --> LDAP in Windows OpenLDAP --> LDAP in Linux AD 是 Windows 服务器上最强大的功能,AD 是 阅读全文
posted @ 2023-12-06 15:55 MoKin_Li 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 定义变量时,变量名不加美元符号; 变量名和等号之间不能有空格,这可能和你熟悉的所有编程语言都不一样 --> 简直有毒!!! 只包含字母、数字和下划线: 变量名可以包含字母(大小写敏感)、数字和下划线 _,不能包含其他特殊字符。 不能以数字开头: 变量名不能以数字开头,但可以包含数字。 避免使用 Sh 阅读全文
posted @ 2023-12-06 10:03 MoKin_Li 阅读(4) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash echo "Hello World !" #! 是一个约定的标记,它告诉系统这个脚本需要什么解释器来执行,即使用哪一种 Shell echo 命令用于向窗口输出文本 chmod +x ./test.sh #使脚本具有执行权限 ./test.sh #执行脚本 一定要写成 ./t 阅读全文
posted @ 2023-12-05 18:08 MoKin_Li 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 类也可以用来构建装饰器; 现在以一个类而不是一个函数的方式,来重新构建logit; from functools import wraps class logit(object): def __init__(self, logfile='out.log'): self.logfile = logfi 阅读全文
posted @ 2023-12-05 18:01 MoKin_Li 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 加入了写入Log文件的Decorators: from functools import wraps def logit(logfile='out.log'): def logging_decorator(func): @wraps(func) def wrapped_function(*args, 阅读全文
posted @ 2023-12-05 17:27 MoKin_Li 阅读(2) 评论(0) 推荐(0) 编辑
摘要: Authorization Logging 通过装饰器可以来打印日志: from functools import wraps def logit(func): @wraps(func) def with_logging(*args, **kwargs): print(func.__name__ + 阅读全文
posted @ 2023-12-05 17:23 MoKin_Li 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 参考的URL:https://www.runoob.com/w3cnote/python-func-decorators.html Decorators --> Pythonic 切入点: 函数 -- 函数中的函数 -- 函数中返回函数 -- 将函数作为参数传递给另一个函数(简单装饰器) @符号 - 阅读全文
posted @ 2023-12-05 16:23 MoKin_Li 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 要移除软链接(symbolic link)在Linux中,你可以使用以下两种方法:使用rm命令或者使用unlink命令。 方法一:使用rm命令移除软链接 例如,如果你的软链接名称是mylink,你可以使用以下命令移除它: rm mylink 请注意,移除软链接不会影响软链接所指向的原始文件。 如果你 阅读全文
posted @ 2023-11-22 13:49 MoKin_Li 阅读(35) 评论(0) 推荐(0) 编辑
摘要: class DataSet(object): @property def method_with_property(self): return 15 def method_without_property(self): return 15 l = DataSet() print(l.method_w 阅读全文
posted @ 2023-04-13 00:22 MoKin_Li 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Date: Apr 13 2023 入职304天 最近和Mentor讨论了下未来的职业发展情况,作为一个Engineer需要做的是要知其然,知其所以然; 尤其是在竞争日益激烈,日益卷的现在; 最终的落点,应该是基础学科的知识点,通过这种方式才可以提高自己的竞争力; Thanks 阅读全文
posted @ 2023-04-13 00:08 MoKin_Li 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Variable names with more than one word can be difficult to read. There are several techniques you can use to make them more readable: Camel Case Each 阅读全文
posted @ 2023-03-13 17:19 MoKin_Li 阅读(7) 评论(0) 推荐(0) 编辑
摘要: A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume). Rules for Python variables: A variable name m 阅读全文
posted @ 2023-03-13 17:16 MoKin_Li 阅读(9) 评论(0) 推荐(0) 编辑
摘要: Python is an object oriented programming language. Almost everything in Python is an object, with its properties and methods. A Class is like an objec 阅读全文
posted @ 2023-02-18 17:08 MoKin_Li 阅读(12) 评论(0) 推荐(0) 编辑
摘要: xcode-select --install 阅读全文
posted @ 2023-01-22 22:57 MoKin_Li 阅读(7) 评论(0) 推荐(0) 编辑