- 一个简单的小游戏可以锻炼初学者对程序控制语句的理解 一个简单的小游戏可以锻炼初学者对程序控制语句的理解
- 一、校验数字的表达式数字:^[0-9]$n位的数字:^\d{n}$至少n位的数字:^\d{n,}$m-n位的数字:^\d{m,n}$零和非零开头的数字:^(0|[1-9][0-9])$非零开头的最多带两位小数的数字:^([1-9][0-9])+(.[0-9]{1,2})?$带1-2位小数的正数或负数:^(-)?\d+(.\d{1,2})$正数、负数、和小数:^(-|+)?\d+(.\d+)?... 一、校验数字的表达式数字:^[0-9]$n位的数字:^\d{n}$至少n位的数字:^\d{n,}$m-n位的数字:^\d{m,n}$零和非零开头的数字:^(0|[1-9][0-9])$非零开头的最多带两位小数的数字:^([1-9][0-9])+(.[0-9]{1,2})?$带1-2位小数的正数或负数:^(-)?\d+(.\d{1,2})$正数、负数、和小数:^(-|+)?\d+(.\d+)?...
- 主要介绍像素点的遍历,最大最小值的计算,以及均值方差计算 主要介绍像素点的遍历,最大最小值的计算,以及均值方差计算
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 装饰器 wraps保留函数的元信息from functools import wrapsdef func_old(f): def inner(*args,**kwargs): ... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 装饰器 wraps保留函数的元信息from functools import wrapsdef func_old(f): def inner(*args,**kwargs): ...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 collections 判断实例是否为可迭代对象或迭代器from collections.abc import Iterable# 可迭代对象中需要实现 __iter__ 或者 __geti... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 collections 判断实例是否为可迭代对象或迭代器from collections.abc import Iterable# 可迭代对象中需要实现 __iter__ 或者 __geti...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 pandas apply 将函数应用到各行和各列import pandas as pdimport numpy as npdf = pd.DataFrame(np.arange(9).res... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 pandas apply 将函数应用到各行和各列import pandas as pdimport numpy as npdf = pd.DataFrame(np.arange(9).res...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 pandas date_range 生成时间序列import pandas as pd# 生成时间序列pd.date_range('20210715',periods=30)Datetime... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 pandas date_range 生成时间序列import pandas as pd# 生成时间序列pd.date_range('20210715',periods=30)Datetime...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 search 返回第一个成功的匹配import repattern = re.compile(r"\d+")# 23 和 45 都符合pattern# 第一个成功匹配的是 23pattern... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 search 返回第一个成功的匹配import repattern = re.compile(r"\d+")# 23 和 45 都符合pattern# 第一个成功匹配的是 23pattern...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 re match 从起始位置开始匹配import re# 正则表达式 ww# 字符串 wwhello# 特征 从起始位置就开始匹配!re.match('ww','wwhello')<re.M... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 re match 从起始位置开始匹配import re# 正则表达式 ww# 字符串 wwhello# 特征 从起始位置就开始匹配!re.match('ww','wwhello')<re.M...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 this python之禅import thisThe Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit ... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 this python之禅import thisThe Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit ...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 scipy 读取wav文件from scipy.io import wavfile------------------------------------------------------... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 scipy 读取wav文件from scipy.io import wavfile------------------------------------------------------...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 opencv 读取图片import cv2--------------------------------------------------------------------------... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 opencv 读取图片import cv2--------------------------------------------------------------------------...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 获取python版本import syssys.version'3.7.6 (default, Jan 8 2020, 19:59:22) \n[GCC 7.3.0]' 默认编码格式sys... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 获取python版本import syssys.version'3.7.6 (default, Jan 8 2020, 19:59:22) \n[GCC 7.3.0]' 默认编码格式sys...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 sys.path 获取模块搜索的路径import syssys.path['/home/ma-user/work', '/home/ma-user/work', '/usr/local/se... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 sys.path 获取模块搜索的路径import syssys.path['/home/ma-user/work', '/home/ma-user/work', '/usr/local/se...
- 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 给类添加不存在的方法,会影响到对象class Person: def __init__(self,name,age): self.name=name sel... 环境信息ModelArtsNotebook - pytorch1.4-cuda10.1-cudnn7-ubuntu18.04JupyterLab - Notebook - Conda-python3 给类添加不存在的方法,会影响到对象class Person: def __init__(self,name,age): self.name=name sel...
上滑加载中
推荐直播
-
HDC深度解读系列 - Serverless与MCP融合创新,构建AI应用全新智能中枢2025/08/20 周三 16:30-18:00
张昆鹏 HCDG北京核心组代表
HDC2025期间,华为云展示了Serverless与MCP融合创新的解决方案,本期访谈直播,由华为云开发者专家(HCDE)兼华为云开发者社区组织HCDG北京核心组代表张鹏先生主持,华为云PaaS服务产品部 Serverless总监Ewen为大家深度解读华为云Serverless与MCP如何融合构建AI应用全新智能中枢
回顾中 -
关于RISC-V生态发展的思考2025/09/02 周二 17:00-18:00
中国科学院计算技术研究所副所长包云岗教授
中科院包云岗老师将在本次直播中,探讨处理器生态的关键要素及其联系,分享过去几年推动RISC-V生态建设实践过程中的经验与教训。
回顾中 -
一键搞定华为云万级资源,3步轻松管理企业成本2025/09/09 周二 15:00-16:00
阿言 华为云交易产品经理
本直播重点介绍如何一键续费万级资源,3步轻松管理成本,帮助提升日常管理效率!
回顾中
热门标签