学习

TelegramBot

2025-11-16
学习

TelegramBot # package main import ( "context" "database/sql" "fmt" _ "github.com/go-sql-driver/mysql" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" "github.com/openai/openai-go/v3" "github.com/openai/openai-go/v3/option" "os" "regexp" "strconv" "strings" "time" ) var format = "2006-01-02 15:04:05" var aiUrl = "https://platform.aitools.cfd/api/v1/" var aiKey = "sk-1d00617bd03e4886bbfcdd164bd90d28" var model = "meituan/longcat-flash-chat" var trytimes = 0 func main() { _ = os.Setenv("HTTPS_PROXY", "http://yun.mm:20172") bot, err := tgbotapi.NewBotAPI("8480580315:AAHYaX5eKimC0jq_a7vKdVL59qTdz33cpZs") if err != nil { main() } bot.Debug = false fmt.Printf("启:%s\n", bot.Self.UserName) updates := bot.GetUpdatesChan(tgbotapi.NewUpdate(0)) for update := range updates { if update. ...

go与java性能对比

2025-07-07
学习

代码 # go build web.go nohup ./web & package main import ( "net/http" "strconv" "sync/atomic" ) func main() { var count int32 http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { atomic.AddInt32(&count, 1) _, _ = w.Write([]byte(strconv.Itoa(int(count)))) }) http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {}) _ = http.ListenAndServe(":8080", nil) } javac Web.java nohup java Web & import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; import java.io.IOException; import java.io.OutputStream; import java.net.InetSocketAddress; import java.util.concurrent.atomic.AtomicInteger; public class Web { public static void main(String[] args) throws Exception { HttpServer server = HttpServer. ...

汽车及定位

2025-05-01
学习

源自AI:XX全系定位及价格,做成表格 ##奔驰 车型系列 价格区间 说明 A-Class ¥200,000-¥300,000 入门级轿车,注重操控性和时尚设计 B-Class ¥250,000-¥350,000 中型轿车,适合家庭和旅游使用 C-Class ¥17.28-21.86万元 中型轿车,畅销车型,设计时尚 E-Class ¥29.48-44.38万元 豪华轿车,适合商务和旅游 S-Class ¥64.76-173.06万元 顶级豪华轿车,安全性与舒适性俱佳 GLA-Class ¥300,000-¥400,000 紧凑型SUV,适合城市和家庭使用 GLB-Class ¥15.59-21.18万元 中型SUV,兼顾城市和轻度越野 GLC-Class ¥25.58-35.93万元 中型SUV,适合城市和家庭使用 GLE-Class ¥700,000-¥1,200,000 中大型SUV,适合长途旅行和家庭使用 GLS-Class ¥1,200,000+ 全尺寸SUV,适合商务和豪华出行 AMG系列 ¥39.98万至255.4万不等 高性能运动车型,动力强劲 Maybach系列 ¥143.80-679.80万元 超豪华商务车,代表奔驰的高端市场 ##宝马 车型系列 车型名称 定位 价格区间(万元) 说明 1系 1系 入门级紧凑型轿车 19.88-31.98 适合预算有限但渴望拥有宝马品牌的消费者。 2系 2系 小型轿跑车 24-27 以时尚动感的设计吸引年轻消费者。 3系 3系 中型轿车 29.39-39.89 作为经典的紧凑型轿车,拥有高保有量和实用特性。 4系 4系 中型轿跑车 42-55 定位在3系和5系之间,强调运动性能和优雅气质。 5系 5系 中大型轿车 42. ...

Go-Admin

2024-01-02
学习

准备 # apt update apt install -y git libnginx-mod-http-image-filter npm golang git clone https://gitee.com/go-admin-team/go-admin.git git clone https://gitee.com/go-admin-team/go-admin-ui.git 后端编译 # 国内加速下载,初次启动运行以下一次 ./go-admin migrate -c settings.yml cd ~/go-admin export GOPROXY=https://goproxy.cn,direct go mod tidy go build cp config/settings.yml . sed -i 's|user:password@tcp(127.0.0.1:3306|zian:zian@tcp(172.20.0.1:3306|g' settings.yml sed -i 's|8000|8009|g' settings.yml ./go-admin server -c settings.yml -a true 前端编译 # 国内加速下载 npm版本太新会出现问题,目前加参数解决 cd ~/go-admin-ui/ export NODE_OPTIONS=--openssl-legacy-provider npm install --registry=https://registry.npmmirror.com --force npm run build:prod nginx # sed -i 's|www-data|root|g' /etc/nginx/nginx. ...

dnsmasq入库

2024-01-01
学习

提前准备 # cat dns.log | grep -v "miwifi" | grep "query\[A]" > dnstemp.log awk '{printf "2025 %s %s %s,%s,%s\n", $1, $2, $3, $6, $8}' dnstemp.log > dns.csv cat dns.csv # 2025 Jun 22 00:43:39,update.googleapis.com,120.229.173.236 2025 Jun 22 00:43:41,api-access.pangolin-sdk-toutiao1.com,120.229.173.236 2025 Jun 22 00:43:48,ulogs.umeng.com,120.229.173.236 cat dns.sql # -- 使用数据库 USE dns_logs; -- 导入数据 LOAD DATA INFILE '/dns.csv' INTO TABLE dns_queries FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (@log_time_str, domain_name, client_ip) SET log_time = STR_TO_DATE(@log_time_str, '%Y %b %d %H:%i:%s'); 执行sql # mysql -h 14. ...

RuoYi-Vue

2024-01-01
学习

| https://github.com/yangzongzhuan/RuoYi-Vue 编译部署v3.9.0版 # apt update apt install -y git libnginx-mod-http-image-filter maven npm openjdk-21-jdk-headless cd ~ git clone --branch=springboot3 https://gitee.com/y_project/RuoYi-Vue.git ruoyi-vue cd ruoyi-vue mvn package cp ruoyi-admin/target/ruoyi-admin.jar ~ cd ruoyi-ui npm install --registry=https://registry.npmmirror.com 参数优化 # 修改redis及密码 修改登录token有效期为10086分钟 修改mysql数据库及密码 除去druid监控的密码,空的也必须覆盖 直接进入druid的管理页面 修改了Token名称 cd ~ cp ./ruoyi-vue/ruoyi-admin/target/classes/application* . sed -i 's|localhost|yun.mm|g' application.yml sed -i 's| password:| password: zian|g' application.yml sed -i 's|expireTime: 30|expireTime: 10086|g' application.yml sed -i 's|localhost|yun.mm|g' application-druid.yml sed -i 's|username: root|username: zian|g' application-druid. ...