测试工程师首chatGPT,编写python读取xmind测试用例chatgtp+python+xmind

背景

有用xmind写测试用例的吧,统计一个xmind的条,需要花大量的时间,还有要统计有多少条冒烟的,多少条不通过的,还有通过的条数。

需求

快速使用python,写一个简单的脚本,统计所有xmind节点,分别统计出,冒烟,通过,不通过的条数

方案

使用chatGPT编写python脚本,通过脚本读取xmind文件,统计特定标签数,特定的标签相当于表示冒烟用例,通过用例,不通过用例,解决人工统计的困难,通过程序统计一个比较准确的数值,允许有一定的偏差,偏差来自于xmind的版本,格式,编写规范等

过程

为chatGTP建立角色

先给chatGTP建立一个角色:测试开发、python开发

给chatGTP提出简单的需求

我:用python,分别读取xmind文件,每个一个画布
AI:要读取xmind文件,需要使用外部库xmind。首先,你需要使用pip在Python环境中安装xmind库。打开终端或命令行,输入以下命令进行安装:

pip install xmind

解析xmind文件

AI:安装完成后,就可以使用xmind库来读取并操作xmind文件了。

以下是一个读取xmind文件,并将每个画布输出为图片的代码示例:

import xmind
import os# 读取xmind文件
workbook = xmind.load('/path/to/your/xmind/file.xmind')# 获取每个画布并输出为图片
for sheet in workbook.getSheets():# 获取画布名称sheet_name = sheet.getTitle()# 创建输出目录output_dir = f'{os.getcwd()}/{sheet_name}'os.makedirs(output_dir, exist_ok=True)# 输出画布中的每个主题为图片for topic in sheet.getRootTopic().getSubTopics():# 获取主题文本topic_title = topic.getTitle()# 创建输出文件路径output_file = f'{output_dir}/{topic_title}.png'# 输出主题为图片topic.getImage(output_file)

AI对代码的解析

AI:代码中,xmind.load()方法读取指定路径的xmind文件,并返回一个workbook对象。getSheets()方法获取xmind文件中的所有画布。遍历每个画布,获取画布名称并创建输出目录。

然后,遍历每个画布中的主题,获取主题文字并创建输出文件的路径。getImage()方法将主题输出为png格式的图片。

这个示例代码可以帮助你开始读取和处理xmind文件。你可以根据自己的需求,进一步扩展和优化代码。


AI明细是要输出图片,这也明细不是我的本意,我意思是输出每个sheet的名字

矫正AI的理解重写需求

我:只需要在python里面print一下所有的画布名称

AI:

import xmind# 读取xmind文件
workbook = xmind.load('/path/to/your/xmind/file.xmind')# 遍历每个画布并打印画布名称
for sheet in workbook.getSheets():print(sheet.getTitle())代码中,workbook.getSheets()方法获取xmind文件中的所有画布,
然后使用for循环遍历每个画布,打印出画布的名称。
运行代码,即可在控制台上看到所有画布的名称。

我:xmind这个库无法打开最新的xmind

AI:如果xmind库无法打开最新格式的xmind文件,可能需要使用最新的xmind库或者其他支持最新xmind格式的库。

可以尝试使用xmind-sdk-python库来打开最新版本的xmind文件,它是Xmind的官方开发工具,支持最新版本的xmind文件。

以下是一个使用xmind-sdk-python库打开xmind文件,并打印所有画布名称的示例代码:

from xmind import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)# 获取画布列表
sheets = xmind_dict.get('sheets')# 打印所有画布名称
if sheets:for sheet in sheets:print(sheet.get('title'))代码中,xmind_to_dict()方法将xmind文件读入,并将其转换成一个包含所有信息的字典。
然后通过获取字典中的'sheets'键,获取所有画布的信息。
对于每个画布,使用get()方法获取名称信息并打印。这个示例代码可以帮助你使用xmind-sdk-python库,打开最新版本的xmind文件并打印出画布名称。
你可以根据自己的需求,进一步扩展和优化代码。

指定AI使用指定类库

我:用这个库:xmindparser

AI:xmindparser是第三方库,可以解析最新版本Xmind文件,进行导入和导出,同时提供方便的API,方便对Xmind文件进行修改和处理。以下是一个使用xmindparser库读取xmind文件,并打印所有画布名称的代码示例:

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)# 获取画布列表
sheets = xmind_dict.get('topic-refs')# 打印所有画布名称
if sheets:for sheet in sheets:sheet_id = sheet.get('id')sheet_title = xmind_dict.get(sheet_id, {}).get('title')print(sheet_title)代码中,xmind_to_dict()方法读取xmind文件,并将其转换成一个字典。
使用xmind_dict.get()方法,获取字典中的'topic-refs'键,它包含了所有画布的引用。
对于每个画布引用,获取它的id并使用xmind_dict.get()方法获取对应的画布信息,
包括标题信息,并打印出标题信息。这个示例代码可以帮助你使用xmindparser库,打开最新版本的xmind文件并打印出画布名称。
你可以根据自己的需求,进一步扩展和优化代码。

到这里把代码贴上去,还是有报错的,再一次调教一下AI,再完善一下需求的方向

我:用python的xmindparser库,分别读取xmind文件中每个画布的名称

AI:使用xmindparser库,可以通过以下代码读取xmind文件中每个画布的所有主题及其名称信息:

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)# 获取画布列表
sheets = xmind_dict.get('topic-refs')# 遍历所有画布的主题并打印主题名称
if sheets:for sheet in sheets:sheet_id = sheet.get('id')sheet_title = xmind_dict.get(sheet_id, {}).get('title')sheet_topics = xmind_dict.get(sheet_id, {}).get('topics')if sheet_topics:for topic in sheet_topics:topic_title = topic.get('title')print(f'画布: {sheet_title}, 主题: {topic_title}')代码中,xmind_to_dict()方法读取xmind文件,并将其转换成一个字典。
使用xmind_dict.get()方法,获取字典中的'topic-refs'键,它包含了所有画布的引用。
对于每个画布引用,获取它的id,并使用xmind_dict.get()方法获取对应的画布信息,包括标题信息和主题信息。对于每个画布,遍历主题信息,获取主题标题信息并打印。这个示例代码可以帮助你使用xmindparser库读取xmind文件中所有画布的主题及其名称信息。
你可以根据自己的需求,进一步扩展和优化代码。

'list' object has no attribute 'get'

运行之后,发送报错了,把错误在抛给gtp,sheets = xmind_dict.get('topic-refs')
AttributeError: 'list' object has no attribute 'get'

AI:如果你遇到'list' object has no attribute 'get'错误,可能是由于读取xmind文件后返回了列表而非字典对象。

这种情况下,你可以尝试使用以下代码,从列表中获取字典对象:

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):xmind_data = xmind_data[0]# 获取画布列表
sheets = xmind_data.get('topic-refs')# 遍历所有画布的主题并打印主题名称
if sheets:for sheet in sheets:sheet_id = sheet.get('id')sheet_title = xmind_data.get(sheet_id, {}).get('title')sheet_topics = xmind_data.get(sheet_id, {}).get('topics')if sheet_topics:for topic in sheet_topics:topic_title = topic.get('title')print(f'画布: {sheet_title}, 主题: {topic_title}')代码中,使用isinstance()方法判断返回值的类型,如果是列表类型,则获取第一个元素。
获取画布列表后,遍历所有画布的主题并打印主题名称。使用这个代码可以解决'list' object has no attribute 'get'错误,帮助你使用xmindparser库读取xmind文件中所有画布的主题及其名称信息。

 运行了一下代码,结果打印为空

继续给AI抛出错误:打印的结果为什么会为空?

下面是AI给出的意见,大概是个说,xmind的文件没有对应字段

可以先通过xmind的类库打开文件,读取并打印信息,看看文件的字段名叫什么

from xmind import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)

 我:我的内容不包含topic-refs,替换成‘title’,而且个列表

AI:如果你的xmind文件中没有topic-refs键,但是有title键,可以按照以下代码读取画布名称和主题名称。

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):xmind_data = xmind_data[0]# 获取画布列表
sheets = xmind_data.get('title')# 处理每个画布
for sheet in sheets:sheet_title = sheet['title']# 处理画布中的主题root_topic = sheet.get('topics', {})topics = root_topic.get('children', [])# 处理每个主题for topic in topics:topic_title = topic.get('title', '')print(f'画布: {sheet_title}, 主题: {topic_title}')代码中,我们先使用xmindparser库将xmind文件转换成字典或列表格式。
如果返回的是一个列表,则需要获取列表中的第一个元素。然后,获取画布列表。在这种情况下,'title'键返回的值是一个列表,我们需要处理每个画布。对于每个画布,获取其标题,并处理其中的主题。在这个例子中,我们使用根主题作为画布的主题,
然后获取主题下的所有子主题。对于每个主题,获取其标题,打印输出画布名称和主题名称。这个代码可以帮助你使用xmindparser库读取xmind文件中所有画布和主题名称信息,
并对其进行处理和扩展。

string indices must be integers

我:sheet_title = sheet['title']
TypeError: string indices must be integers

AI:如果你遇到TypeError: string indices must be integers错误,可能是由于代码中对字符串类型的变量进行了索引,而字符串类型是不支持索引操作的。

针对这种情况,你可以使用以下代码:

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):xmind_data = xmind_data[0]# 获取画布列表
sheets = xmind_data.get('title')# 处理每个画布
for sheet in sheets:if isinstance(sheet, str):sheet_title = sheetelse:sheet_title = sheet.get('title', '')# 处理画布中的主题root_topic = sheet.get('topics', {})topics = root_topic.get('children', [])# 处理每个主题for topic in topics:topic_title = topic.get('title', '')print(f'画布: {sheet_title}, 主题: {topic_title}')在这个代码中,我们增加了一个判断:如果当前画布的类型是字符串,
直接将其作为画布标题;否则,使用get()方法获取其标题,如果无法获取,则将其设为空字符串。这个代码可以解决TypeError: string indices must be integers错误,
帮助你使用xmindparser库读取xmind文件中所有画布和主题名称信息,并对其进行处理和扩展。

AttributeError: 'str' object has no attribute

我:root_topic = sheet.get('topics', {}) AttributeError: 'str' object has no attribute 'get'

AI:

如果你遇到了AttributeError: 'str' object has no attribute 'get'错误,在这种情况下是因为原先的代码设定先判断json中的'title'键是否存在,若存在后继续操作,但'title'返回的是字符串,字符串类型是不支持使用get方法的。

因此,需要先判断获取到的变量是否为字典类型,如果是则使用get()方法获取'topics'键对应的值,否则设置root_topic为一个空字典。

修改后的代码如下:

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):xmind_data = xmind_data[0]# 获取画布列表
sheets = xmind_data.get('title')# 处理每个画布
for sheet in sheets:if isinstance(sheet, str):sheet_title = sheetelse:sheet_title = sheet.get('title', '')# 处理画布中的主题if isinstance(sheet, dict):root_topic = sheet.get('topics', {})topics = root_topic.get('children', [])else:topics = []# 处理每个主题for topic in topics:topic_title = topic.get('title', '')print(f'画布: {sheet_title}, 主题: {topic_title}')在这个代码中,我们增加了一个判断:如果当前画布的类型是字典,
使用get()方法获取'topics'键对应的值,否则将topics设置为空列表。这个代码可以解决AttributeError: 'str' object has no attribute 'get'错误,
帮助你使用xmindparser库读取xmind文件中所有画布和主题名称信息,并对其进行处理和扩展。

来到这里,代码没有报错,运行也没有打印结果,由于上面我们看过数据格式,在一次告诉AI我们的结果格式

向AI提出我需要的结果

我:我告诉你一下,这是xmind_data结果:[{'title': '画布 1', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1', 'makers': ['tag-red']}, {'title': '分支主题 2', 'makers': ['tag-orange']}, {'title': '分支主题 3', 'makers': ['tag-green'], 'topics': [{'title': '子主题 1', 'makers': ['priority-1']}, {'title': '子主题 2', 'makers': ['flag-red']}]}, {'title': '分支主题 4'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}, {'title': '画布 2', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1'}, {'title': '分支主题 2'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}]

AI:好的,根据你提供的内容,可以按照以下代码处理xmind_data:

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 处理每个画布
for sheet in xmind_data:sheet_title = sheet.get('title', '')# 处理画布中的主题root_topic = sheet.get('topic', {})topics = root_topic.get('topics', [])# 处理每个主题for topic in topics:topic_title = topic.get('title', '')print(f'画布: {sheet_title}, 主题: {topic_title}')

来到这里由于有运行结果,当然结果还是需要进一步优化的,需要优化画布的名称重复输出

我:只需要打印,画布名称就可以了

AI: 如果你只需要打印画布名称,可以按照以下代码处理xmind_data:

from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 打印每个画布的名称
for sheet in xmind_data:sheet_title = sheet.get('title', '')print(f'画布: {sheet_title}')这个代码会遍历xmind_data中所有的画布,获取画布的名称并打印出来。如果你需要获取更多的信息,比如主题的数量或者关系,可以对代码进行相应的修改,
比如添加一个计数器获取主题数量等。

这里只统计了一个结果,需要遍历所有结果出来

我:继续完善这个代码,for循环遍历xmind_data,得到每个一个画布,循环遍历找到每个画布里面的makers键的值,且统计值的个数

AI:继续完善这个代码,for循环遍历xmind_data,得到每个一个画布,循环遍历找到每个画布里面的makers键的值,且统计值的个数

from collections import Counter
from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 遍历每个画布
for sheet in xmind_data:sheet_title = sheet.get('title')markers = []# 遍历每个主题,获取标签列表for topic in sheet.get('topic', {}).get('topics', []):markers += topic.get('markers', [])# 统计每个标签出现的次数marker_count = Counter(markers)# 输出结果print(f'画布: {sheet_title}')for marker, count in marker_count.items():print(f'标签:{marker},出现次数:{count}')print('\n')

我:完善代码makers的值分别为:tag-green,tag-red,tag-yellow

AI:好的,如果你需要在上面的代码基础上进一步筛选标签,使其仅包含值为’tag-green’、'tag-red’和’tag-yellow’的标签,并统计其出现次数,可以按照以下代码进行修改:

from collections import Counter
from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 遍历每个画布
for sheet in xmind_data:sheet_title = sheet.get('title')markers = []# 遍历每个主题,获取标签列表for topic in sheet.get('topic', {}).get('topics', []):for marker in topic.get('markers', []):if marker in ['tag-green', 'tag-red', 'tag-yellow']:markers.append(marker)# 统计每个标签出现的次数marker_count = Counter(markers)# 输出结果print(f'画布: {sheet_title}')for marker, count in marker_count.items():print(f'标签:{marker},出现次数:{count}')print('\n')

我:我告诉你一下,这是xmind_data结果,有‘画布1’和‘画布2’,分别统计出'tag-green', 'tag-red', 'tag-yellow'的标签数量:[{'title': '画布 1', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1', 'makers': ['tag-red']}, {'title': '分支主题 2', 'makers': ['tag-orange']}, {'title': '分支主题 3', 'makers': ['tag-green'], 'topics': [{'title': '子主题 1', 'makers': ['priority-1']}, {'title': '子主题 2', 'makers': ['flag-red']}]}, {'title': '分支主题 4'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}, {'title': '画布 2', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1'}, {'title': '分支主题 2'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}] 

AI:好的,那么可以按照如下代码对xmind_data进行进一步筛选和统计:

from collections import Counter
from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 定义要统计的标签
target_tags = ['tag-green', 'tag-red', 'tag-yellow']# 遍历每个画布
for sheet in xmind_data:sheet_title = sheet.get('title')markers = []# 遍历每个主题,获取标签列表for topic in sheet.get('topic', {}).get('topics', []):makers = topic.get('makers', [])# 筛选出目标标签target_makers = [maker for maker in makers if maker in target_tags]markers.extend(target_makers)# 统计每个标签出现的次数marker_count = Counter(markers)# 输出结果print(f'画布: {sheet_title}')for target_tag in target_tags:count = marker_count[target_tag]print(f'标签:{target_tag},出现次数:{count}')print('\n')

我:然后将这几个标签的数相加'tag-green', 'tag-red', 'tag-yellow'

AI:

from collections import Counter
from xmindparser import xmind_to_dict# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)# 定义要统计的标签
target_tags = ['tag-green', 'tag-red', 'tag-yellow']# 初始化标签数量
total_count = 0# 遍历每个画布
for sheet in xmind_data:markers = []# 遍历每个主题,获取标签列表for topic in sheet.get('topic', {}).get('topics', []):makers = topic.get('makers', [])# 筛选出目标标签target_makers = [maker for maker in makers if maker in target_tags]markers.extend(target_makers)# 统计每个标签出现的次数marker_count = Counter(markers)# 累加每个目标标签的出现次数for target_tag in target_tags:count = marker_count[target_tag]total_count += countprint(f'标签:{target_tag},出现次数:{count}')print(f"目标标签共出现了{total_count}次\n")

 最后面,就不断和AI沟通,完善代码

from xmindparser import xmind_to_dictxmind_file = 'test.xmind'xmind_dict = xmind_to_dict(xmind_file)def count_titles_and_tags(topics):"""递归地统计所有的title和tag数量"""title_count = len(topics)  # 统计当前主题块的数量tag_red_count = 0tag_orange_count = 0tag_green_count = 0for topic in topics:if 'makers' in topic and 'tag-red' in topic['makers']:tag_red_count += 1if 'makers' in topic and 'tag-yellow' in topic['makers']:tag_orange_count += 1if 'makers' in topic and 'tag-green' in topic['makers']:tag_green_count += 1if 'topics' in topic:sub_topics = topic['topics']sub_counts = count_titles_and_tags(sub_topics)title_count += sub_counts[0]tag_red_count += sub_counts[1]tag_orange_count += sub_counts[2]tag_green_count += sub_counts[3]return title_count, tag_red_count, tag_orange_count, tag_green_count# 统计所有的title和tag数量
# total_counts = count_titles_and_tags(xmind_dict[0]['topic']['topics'])
# print("Total number of titles:", total_counts[0])
# print("Total number of tag-red:", total_counts[1])
# print("Total number of tag-orange:", total_counts[2])
# print("Total number of tag-green:", total_counts[3])# for canvas in xmind_dict:
#     print("Canvas name:", canvas['title'])
#     topics = canvas['topic']['topics']
#     total_counts = count_titles_and_tags(topics)
#     print("Total number of titles in canvas:", total_counts[0])
#     print("Total number of tag-red in canvas:", total_counts[1])
#     print("Total number of tag-orange in canvas:", total_counts[2])
#     print("Total number of tag-green in canvas:", total_counts[3])# 初始化总计数器
total_counts = [0, 0, 0, 0]  # title计数器,tag-red计数器,tag-orange计数器,tag-green计数器for canvas in xmind_dict:print("Canvas name:", canvas['title'])topics = canvas['topic']['topics']canvas_counts = count_titles_and_tags(topics)print("Total number of titles in canvas:", canvas_counts[0])print("Total number of tag-red in canvas:", canvas_counts[1])print("Total number of tag-orange in canvas:", canvas_counts[2])print("Total number of tag-green in canvas:", canvas_counts[3])# 累加计数器total_counts[0] += canvas_counts[0]  # title计数器累加total_counts[1] += canvas_counts[1]  # tag-red计数器累加total_counts[2] += canvas_counts[2]  # tag-orange计数器累加total_counts[3] += canvas_counts[3]  # tag-green计数器累加# 输出总计数器结果
print("Canvas name:总计数")
print("Total number of titles:", total_counts[0])
print("Total number of tag-red:", total_counts[1])
print("Total number of tag-orange:", total_counts[2])
print("Total number of tag-green:", total_counts[3])

运行结果

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/3697.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

c++ 内存管理一:初识内存分配工具

文章目录 前言1 new 和 delete2 new[]和delete[]3 operator new4 placement new5 malloc和free6 allocator 前言 侯捷 c内存管理学习总结笔记。 在C中,有几种常用的内存分配工具可以帮助进行动态内存管理。 从c应用程序自上而下,通常会有这样的几种分配…

算法分析基础题目

第一章-算法概述 递归算法必须具备的两个条件是边界条件或停止条件和递推方程或递归方程冒泡排序时间复杂度是___,堆排序时间复杂度是___。 O ( n 2 ) O(n^2) O(n2), O ( n l o g n ) O(nlogn) O(nlogn)斐波那契数列的第1项为1,第2项为2,以…

[RocketMQ] Producer发送消息的总体流程 (七)

单向发送: 把消息发向Broker服务器, 不管Broker是否接收, 只管发, 不管结果。同步发送: 把消息发向Broker服务器, 如果Broker成功接收, 可以得到Broker的响应。异步发送: 把消息发向Broker服务器, 如果Broker成功接收, 可以得到Broker的响应。异步所以发送消息后, 不用等待, 等…

LLaMA模型微调版本:斯坦福 Alpaca 详解

项目代码:https://github.com/tatsu-lab/stanford_alpaca 博客介绍:https://crfm.stanford.edu/2023/03/13/alpaca.html Alpaca 总览 Alpaca 是 LLaMA-7B 的微调版本,使用Self-instruct[2]方式借用text-davinct-003构建了52K的数据&#x…

vue3框架开发uniapp高仿度小满金融App项目

vue3框架开发uniapp高仿度小满金融App项目 心血来潮写了度小满前端项目使用vue3开发地址:度小满金融 下面是实现效果

第一次安装cocoapods经历

先是执行&#xff1a;sudo gem install cocoapods 报错&#xff1a; ERROR: Error installing cocoapods: The last version of activesupport (> 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.3. Try installing it with gem install activesupport -v…

CSS 备忘录2-动画、渐变、颜色、选择器等

1、背景 background属性是八个属性的简写形式&#xff1a; background-image 指定一个文件或生成的颜色渐变作为背景图片background-position 设置图片的初始位置background-size 指定背景图片的渲染尺寸background-repeat 是否平铺图片ba…

智能相机的功能介绍

智能视觉检测相机主要是应用在工业检测领域图像分析识别、视觉检测判断。相机具有颜色有无判别、颜色面积计算、轮廓查找定位、物体特征灰度匹配、颜色或灰度浓淡检测、物体计数、尺寸测量、条码二维码识别读取、尺寸测量、机械收引导定位、字符识别等功能。相机带有HDMI高清视…

Java版企业电子招投标系统源码 Spring Cloud+Spring Boot 电子招标采购系统功能清单

一、立项管理 1、招标立项申请 功能点&#xff1a;招标类项目立项申请入口&#xff0c;用户可以保存为草稿&#xff0c;提交。 2、非招标立项申请 功能点&#xff1a;非招标立项申请入口、用户可以保存为草稿、提交。 3、采购立项列表 功能点&#xff1a;对草稿进行编辑&#x…

电脑键盘点击记录

这里写自定义目录标题 通过敲击键盘&#xff0c;记录键盘按键&#xff0c;并记录下来&#xff0c;保存在电脑一个路径下&#xff0c;txt文档格式记录 通过敲击键盘&#xff0c;记录键盘按键&#xff0c;并记录下来&#xff0c;保存在电脑一个路径下&#xff0c;txt文档格式记录…

English Learning - L3 纠音 W8 Lesson7 Ted Living Beyond Limits 2023.06.27 周二

朗读内容&#xff1a; Lesson 7 Day 47 - 51 句子 Ted Living Beyond Limits 3-22

kafka入门,Kafka 副本(十三)

Kafka副本 副本基本信息 1&#xff09;Kafka副本作用&#xff0c;提高数据可靠性 2&#xff09;Kafka默认副本1个&#xff0c;生产环境一般配置2个&#xff0c;保证数据可靠性&#xff0c;太多副本会增加磁盘存储空间&#xff0c;增加网络上数据传输&#xff0c;降低效率 3&a…