Go函数与包
02.函数与包.md[TOC] 一.函数核心知识点(一).Go站点1https://go.dev/ (二).不定长参数案例123456789101112131415161718192021main.go#---------------------------------------------package mainimport "fmt"func calculateAvg(bmis ...float64) float64{ var total float64 for _,item := range bmis{ total+=item } return total}func main(){ bmis := []float64{1.1,1,2,1.4,9.8} //输入的切片数据要进行展开 如果传入的是slice,必须进行值的传入,如果使用不定长参数 可以为0 fmt.Println(calculateAvg(bmis...))}# ...
使用大模型进行视频创作之AI生成视频概述
d5b5e94e8ccafdcc787d294b74a096cbfae18ea562d6652edb0dd4d3d7eac38a6eb2137d7a3e0c52e91b77c1f4a0dcb95ae97ad319108ee75a6f5676629859b89f8874378d2d1bb993a6be7d0df5270854f3948bb35cb5323d236699cf92e10f50adb58e0f0260995a2ee8a783978ab6c72b8f4e217da2f3ccd3fe050914b41c01696ee5a9329ee6728b917594121c0e7d45cfc221aee618885ee94787a201224c5d4dcf656c97bc31db7d8705813416d2bbeb017ac99ca5449f9222ba802374c2d7e4bf18ee7151674b8dafa8b3bb02a89e0ae29682c0a4b8812a37380a101fccba78342e18993d4f14c485c94f6133d489e34d6286a7d2a ...
Go基础语法
01.Go语言基础语法易错点总结[TOC] 一.基础语法易错知识点(一).数据类型1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561.Golang是强类型语言。2.在赋值过程中、类型必须保持一致。3.变量必须先定义后使用,且必须用到。4.golang会为每个变量设置默认值。5.变量不能重名。6.golang会根据类型做变量类型 ...
go实现sql查询数据到excel并发送到企微
d5b5e94e8ccafdcc787d294b74a096cbfbd554982e01af8e029ecd6742e1661bf51e63bb73b664cc224f82eb15dcf0e29fceb038cb44a439f4bb29e59501def67d6446e3bbde3b6e55bcb95456af571bb5d61d9cea3f32d48b11bb19fbd8e75ade3615ccea2a66c65d695b6b108a9318546e54e5921ab7c2d6b347d99d93f30fb1c013460bbcfb8807fe81ba5dafe7543734095b170f8252a2fef37fab954003226bab8e2c1fc768c7b48af8bb1afba450c632f3e8136f168dee2d6f45ce8dfbc6194a4836bf426123716001de04ff84eefbc07f6da1aa2241dd1700abd8db1d6b62b28904c8d8b0050045f8e44aa1784ce8d2eaab876382e ...
go实现es语法查询及sql查询数据到文本文件并发送到企微
main.go12345678910111213141516171819package mainimport ( "time")func main() { // 获取前一天的日期 yesterday := time.Now().AddDate(0, 0, -1).Format("2006-01-02") RegisterAllInfoTotalCount("registerAllInfo", yesterday) RegisterAllInfoTotalCount("assRegister", yesterday) selectSqlGetCustomersCount(yesterday) //currentdir := "/go-code/workspace/src/es_count" currentdir := "/home/script/member_center_es_stat" excelfile := fmt.Sprintf("注册接口 ...
RAG项目实战-环境搭建
RAG项目实战-环境搭建 安装conda1234# windows安装:1. 访问https://mirrors.tuna.tsinghua.edu.cn/2. 搜索 anaconda,点击搜索到的anaconda链接点击3.下载exe文件默认安装 123456789101112131415161718# linux安装# Conda 是一个强大的命令行工具文档: https://docs.conda.io/projects/conda/en/stable/user-guide/install/linux.html https://docs.anaconda.com/miniconda/mkdir -p ~/miniconda3wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.shbash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3rm ~/miniconda3/minico ...
AI术语
12345678910111213141516171819人工智能(artificial intelligence,AI)大语言模型(large languagemodel,LLM)自然语言处理(natural language processing,NLP)机器学习(machine learning,ML)深度学习(deep learning,DL)人工神经网络(artificial neural network)提示词(prompt)提示工程(prompt engineering)循环神经网络(recurrent neural network,RNN)长短期记忆(long short-termmemory,LSTM)掩蔽语言模型(Masked Language Model, MLM)下一句预测(Next Sentence Prediction, NSP)视觉Transformer(Vision Transformer, ViT)知识蒸馏(Knowledge Distillation)模型剪枝(Model Pruning)模型量化(Model Quantization)
SD部署
部署1. 安装conda1234567891011121314151617# Conda 是一个强大的命令行工具文档: https://docs.conda.io/projects/conda/en/stable/user-guide/install/linux.html https://docs.anaconda.com/miniconda/mkdir -p ~/miniconda3wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.shbash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3rm ~/miniconda3/miniconda.sh# 初始化新安装的 Miniconda~/miniconda3/bin/conda init bash# vim /etc/profileCONDA_HOME=/root/miniconda3export PATH=$PATH:/usr/lo ...
AI思路
d5b5e94e8ccafdcc787d294b74a096cbfbd554982e01af8e029ecd6742e1661bbbcac4692febce4b0e2d08b63b2e5dfcf0eeaaaae2a15f23538c8efa1ee3ef7fc0c5a63f7a90fa73a79874dc4d0080d1195fa33dfe2ed8587ae232009c66d54f1b034cbe6abac36748546e26c178be337bad6c8276346aaabfd59fd46718fc52efb9409d8e73ec1f36d0336dea51a6d6201afee44c998bf77b69dc012ba49b06742b22fd2de5b9a8c90fd13ed20d4effb8ae125862a1db18ccde7ddec43a7d101d028d745e2497f13bee73f70986c75656b5eac946c5b11049e46b01e66039ca69928c6ac06627d9087ba490749330782522697e2e302cbf4 ...
open-webui之ollama
d5b5e94e8ccafdcc787d294b74a096cbfbd554982e01af8e029ecd6742e1661bd3d94183036a22ac686c39cfdb7556459e924c81133ce6f3fbb99c8e08971e4feed9fc731d1b650b8209d6545cb05e0dde7492c6736cc182d42a033ea500703caef28fac1dfcd4a7edd6be3adaf6f017351a108f32d3a3ee076e37589b82394f68c7f78e90a0a2ff3bdd97d23d7d1c503205026530dc72e27d6c37a86246ed0f3e6580ce4accb1f33767a114e67c424dbe051c7f23d4ff433d257c8a9adfa675ae7941f1f7a103307d5fdd43a2ce2bab34c0bcdef1ed84ce08ec9fc1d5159a4bc0c54b12030488491193234d11843e70f4a4b1f1599a7eabe ...