摘要: 文章仅供参考学习 1.LSTM预测 首先去爬取数据 这个是爬取大乐透的,从07年爬到最新一期 import requests from bs4 import BeautifulSoup import csv # 目标URL url = 'http://datachart.500.com/dlt/hi 阅读全文
posted @ 2025-02-24 11:22 Wchime 阅读(90) 评论(0) 推荐(0) 编辑
摘要: import json import threading import time from django.core.cache import cache from django_redis import get_redis_connection cnn = get_redis_connection( 阅读全文
posted @ 2025-02-24 09:59 Wchime 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 使用mosquitto 通过将日志发布到topic 配置文件 mosquitto.conf log_type all log_dest topic $SYS/broker/log/ python 接收消息回调函数 pattern = "New client connected from (.*?) 阅读全文
posted @ 2024-12-11 18:15 Wchime 阅读(41) 评论(0) 推荐(0) 编辑
摘要: def register_redis(app: FastAPI) -> None: """ 把redis挂载到app对象上面 :param app: :return: """ @app.on_event('startup') async def startup_event(): """ 获取链接 : 阅读全文
posted @ 2024-12-09 16:54 Wchime 阅读(41) 评论(0) 推荐(0) 编辑
摘要: package storage import ( "context" "WchimeGinSystem/conf" "WchimeGinSystem/utils" "io" "log" "net/http" "net/url" "path/filepath" "strings" "time" "gi 阅读全文
posted @ 2024-11-16 10:59 Wchime 阅读(13) 评论(0) 推荐(0) 编辑
摘要: package storage import ( "context" "fmt" "WchimeGinSystem/conf" "WchimeGinSystem/utils" "io" "log" "path/filepath" "strings" "time" "github.com/minio/ 阅读全文
posted @ 2024-11-16 10:57 Wchime 阅读(32) 评论(0) 推荐(0) 编辑
摘要: package cache import ( "context" "fmt" "WchimeGinSystem/conf" "log" "time" "github.com/go-redis/redis/v8" ) var CTX = context.Background() var RDB *re 阅读全文
posted @ 2024-11-16 10:55 Wchime 阅读(24) 评论(0) 推荐(0) 编辑
摘要: package jwtauth import ( "WchimeGinSystem/conf" "errors" "time" "github.com/golang-jwt/jwt/v5" ) type MyClaims struct { jwt.RegisteredClaims UserId in 阅读全文
posted @ 2024-11-16 10:54 Wchime 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 安装所需的库 go get gopkg.in/ini.v1 我这里集成到gin中配合之前的解密一起使用 package conf import ( "fmt" "gin__tte/utils/encryption" "log" "gopkg.in/ini.v1" ) const SERVER_NAM 阅读全文
posted @ 2024-11-15 18:21 Wchime 阅读(58) 评论(0) 推荐(0) 编辑
摘要: go实现是和之前我python和jsAES加解密的方式一样,可以相互解密。 文件结构 encryption.go package encryption import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/sha256" "encoding/ba 阅读全文
posted @ 2024-11-11 18:09 Wchime 阅读(138) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示