摘要:
AI 通常使用 GPU(Graphic Processing Unit 图形处理单元)而不是单纯依赖 CPU(Central Processing Unit 中央处理器),主要是由两者在架构和性能特点上的差异决定的,以下是具体分析: 硬件架构差异 CPU:CPU 的设计侧重于复杂指令集计算(CSIC 阅读全文
摘要:
wmic os get caption //获取系统版本Get-Alias -name ls # 查看某一个别名的定义 Get-Alias # 查看所有别名 ipconfig ( 查看 Windows IP 配置, 等同于 Get-NetIPConfiguration ) ls >ls 批量创建文件 阅读全文
摘要:
Windows PowerShell 是微软发布的为系统管理员设计的基于任务的自动化命令行外壳(Shell)和相关脚本环境,它建立在.NET框架上。 引入了许多非常有用的新概念,从而进一步扩展了在 Windows 命令提示符和 Windows Script Host 环境中获得的知识和创建的脚本。 阅读全文
摘要:
def tuplify_dicts(dicts: list): # 字典列表 转为 具名元组列表 keys = {key for line in dicts for key in line.keys()} Struct = namedtuple('Struct', sorted(keys), ren 阅读全文
摘要:
用点数(rank_value )和花色(suits_values)两个因素对每张牌排序,每张牌都有不同的数值 return rank_value * len(suits_values) + suits_values[card.suit] 其中: ranks = [str(n) for n in ra 阅读全文
摘要:
class ClassName: __privt = 50 # 私有变量 a = ClassName() # 私有变量外界无法访问 print(a.__privt) # AttributeError: 'ClassName' object has no attribute '__privt' pri 阅读全文
摘要:
def next(iterator, default=None): # real signature unknown; restored from __doc__ """ next(iterator[, default]) Return the next item from the iterator 阅读全文
摘要:
import time a = time.gmtime() b = time.gmtime() print(a == b) # 输出True print(a is b) # 输出False print(id(a)) # 2680257978480 print(id(b)) # 26802597848 阅读全文
摘要:
def isleap(year): """Return True for leap years, False for non-leap years.""" return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) import cal 阅读全文