1 2 3 4 5 ··· 23 下一页
摘要: 1. match_all - 查询所有文档 query = { "query": { "match_all": {} } } res = es.search(index="books", body=query) for hit in res["hits"]["hits"]: print(hit["_ 阅读全文
posted @ 2025-04-10 10:29 wellplayed 阅读(31) 评论(0) 推荐(0)
摘要: 1. search - 用于过滤事件 [search ... ] # 在默认情况下,所有搜索都隐含了 search 命令 2. index - 用于指定搜索的索引 index = "xxx" # 如果不指定索引,Splunk 会在所有可访问的索引中搜索 3. | - 管道符:将一个命令的输出作为另一 阅读全文
posted @ 2024-05-14 16:01 wellplayed 阅读(886) 评论(0) 推荐(0)
摘要: 基本组件的使用 -restful规范 -序列化组件 -APIView源码分析 -Response源码分析 -source用法 -定制字段的两种方式 -反序列化的保存与修改 -ModelSerializer用法 -请求与响应 -状态码 -GenericAPIView用法 -路由组件 -认证组件 -权限 阅读全文
posted @ 2023-11-20 21:03 wellplayed 阅读(29) 评论(1) 推荐(2)
摘要: 一. 正常函数版本的思路 1. notify.py def wechat(content): print('微信通知:%s'%content) def qq(content): print('qq通知:%s'%content) def email(content): print('邮箱通知:%s'% 阅读全文
posted @ 2023-10-29 21:24 wellplayed 阅读(20) 评论(0) 推荐(2)
摘要: 在自然语言处理领域,LLM(Large Language Model) 已经成为热门技术,无论是文本生成、问答系统,还是代码生成和自动化运维,LLM 都展现了强大的能力。本文将梳理 LLM 的核心概念与应用场景,帮助快速理解和上手。 1. 什么是 LLM LLM,即大型语言模型,是基于深度学习训练的 阅读全文
posted @ 2025-08-22 13:32 wellplayed 阅读(43) 评论(0) 推荐(0)
摘要: 1、导入并生成ES对象 from elasticsearch import Elasticsearch es = Elasticsearch(['http://127.0.0.1:9200'], http_auth=('用户名', '密码')) 2、为指定索引添加字段 new_fields = { 阅读全文
posted @ 2025-08-04 09:45 wellplayed 阅读(114) 评论(0) 推荐(0)
摘要: 原数据: class UserInfoAdmin(admin.ModelAdmin): """ 用户其他信息对应的admin管理后台 """ # 页面展示 list_display = ("display_name", "user", "telephone", "department") admin 阅读全文
posted @ 2025-07-18 14:59 wellplayed 阅读(20) 评论(0) 推荐(0)
摘要: 在 Django Admin 中,默认的下拉框会加载所有选项,对于数据量较大的外键字段来说,加载缓慢且不便于查找。我们可以通过 autocomplete_fields 实现输入搜索匹配的功能,提高后台管理效率。 一、原理说明 Django 从 2.0 起支持 autocomplete_fields, 阅读全文
posted @ 2025-05-08 14:38 wellplayed 阅读(64) 评论(0) 推荐(0)
摘要: # 禁用外键约束 SET FOREIGN_KEY_CHECKS = 0; -- 执行你的迁移脚本 # 启用外键约束 SET FOREIGN_KEY_CHECKS = 1; 阅读全文
posted @ 2025-04-23 10:40 wellplayed 阅读(14) 评论(0) 推荐(0)
摘要: 1、首先下载模块 pip install pyinstaller 2、选择一个需要打包成exe的文件 # 以这个文件为例 random.py 3、然后在文件所在目录运行 pyinstaller --onefile random.py 4、可以发现当前目录的dist文件夹下有一个exe文件 5、双击. 阅读全文
posted @ 2025-04-15 10:36 wellplayed 阅读(17) 评论(0) 推荐(0)
摘要: 在Django项目中配置全局日志组件 settings文件配置 from datetime import date # 日志配置 LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose 阅读全文
posted @ 2025-04-10 10:16 wellplayed 阅读(26) 评论(0) 推荐(0)
摘要: 安装依赖 pip install elasticsearch 安装完成后我们即可使用 from elasticsearch import Elasticsearch 进行连接与操作。 连接 ElasticSearch from elasticsearch import Elasticsearch 创 阅读全文
posted @ 2025-04-09 17:37 wellplayed 阅读(85) 评论(0) 推荐(0)
摘要: 首先导入xlsx库 import * as XLSX from 'xlsx'; 表格数据示例 // 后端获取表格数据 const filteredData = ref([]); // 数据列 const columns = [ { title: '用户名', dataIndex: 'username 阅读全文
posted @ 2025-03-17 17:30 wellplayed 阅读(81) 评论(0) 推荐(0)
1 2 3 4 5 ··· 23 下一页