当前位置: 首页 > news >正文

wordpress 留言表单关于公司网络优化方案

wordpress 留言表单,关于公司网络优化方案,北海做网站公司,网站型跟商城型1 换源 仅适用于Release date: May 3rd 2023、Debian version: 11 (bullseye)这个树莓派OS版本#xff0c;其他版本不保证有效。 首先使用如下命令#xff0c;查看自己树莓派的架构。 uname -a结果如下#xff1a; 如果红圈处显示为aarch64#xff0c;使用命令sudo na…1 换源 仅适用于Release date: May 3rd 2023、Debian version: 11 (bullseye)这个树莓派OS版本其他版本不保证有效。 首先使用如下命令查看自己树莓派的架构。 uname -a结果如下 如果红圈处显示为aarch64使用命令sudo nano /etc/apt/sources.list注释掉里面的所有内容加入以下内容 # 默认注释了源码镜像以提高 apt update 速度如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-freedeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-freedeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free# deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free # # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-freedeb https://security.debian.org/debian-security bullseye-security main contrib non-free # deb-src https://security.debian.org/debian-security bullseye-security main contrib non-free然后保存。 如果红圈处显示armv7l则使用命令sudo nano /etc/apt/sources.list注释掉里面的所有内容加入以下内容 deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bullseye main non-free contrib rpi # deb-src https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bullseye main non-free contrib rpi# deb [archarm64] https://mirrors.tuna.tsinghua.edu.cn/raspbian/multiarch/ bullseye main注意两者不可同时选择。 做完上述步骤后使用命令sudo nano /etc/apt/sources.list.d/raspi.list 注释掉里面的所有内容输入以下内容 deb https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main然后保存。 执行sudo apt-get update. 2 安装OpenCV 使用命令sudo apt-get install python-opencv -y安装OpenCV。 3 编写代码 在/home/pi下创建project文件夹在该文件夹中再创建文件夹中创建img文件夹、code.py文件。 在code.py文件中写入以下内容 # -*- codingutf-8 import time import datetime #日期时间 import os #文件操作 import cv2 #opencv-python from qcloud_cos import CosConfig from qcloud_cos import CosS3Client import sys import os import logging# 正常情况日志级别使用 INFO需要定位时可以修改为 DEBUG此时 SDK 会打印和服务端的通信信息 logging.basicConfig(levellogging.INFO, streamsys.stdout)# 1. 设置用户属性, 包括 secret_id, secret_key, region等。Appid 已在 CosConfig 中移除请在参数 Bucket 中带Appid。Bucket 由 BucketName-Appid 组成 secret_id 你的ID # 用户的 SecretId建议使用子账号密钥授权遵循最小权限指引降低使用风险。子账号密钥获取可参见 https://cloud.tencent.com/document/product/598/37140 secret_key 你的key # 用户的 SecretKey建议使用子账号密钥授权遵循最小权限指引降低使用风险。子账号密钥获取可参见 https://cloud.tencent.com/document/product/598/37140 region ap-guangzhou # 替换为用户的 region已创建桶归属的 region 可以在控制台查https://console.cloud.tencent.com/cos5/bucket# COS 支持的所有 region 列表参见 https://cloud.tencent.com/document/product/436/6224 token None # 如果使用永久密钥不需要填入 token如果使用临时密钥需要填入临时密钥生成和使用指引参见 https://cloud.tencent.com/document/product/436/14048 scheme https # 指定使用 http/https 协议来访问 COS默认为 https可不填config CosConfig(Regionregion, SecretIdsecret_id, SecretKeysecret_key, Tokentoken, Schemescheme) client CosS3Client(config)camera cv2.VideoCapture(0) #一个摄像头后期可扩展多个摄像头def delete_imgs():delete_url /home/pi/project/imgdelete_list os.listdir(delete_url)#print(delete_list)for i in range(len(delete_list)):os.remove(delete_url/delete_list[i])logging.info(delete all imgs success!)if camera.isOpened():logging.info(Start Picture!)while True:# 设置分辨率camera.set(3, 1920) #widthcamera.set(4, 1080) #heightret, img camera.read()date datetime.datetime.now().strftime(%Y-%m-%d)get_photo_time datetime.datetime.now().strftime(%Y-%m-%d_%H-%M-%S)#print(get_photo_time)file_path /home/pi/regular-photos-of-raspberry-pie/img/ str(get_photo_time) .jpgcv2.imwrite(file_path,img) #保存到树莓派本地upload_time datetime.datetime.now().strftime(%Y-%m-%d_%H-%M-%S)#print(upload_time)response client.upload_file(Bucketraspberry1-1257204660,LocalFilePathfile_path,KeygetRasberryImgs/ date / str(upload_time) .jpg,PartSize1,MAXThread10,EnableMD5False)os.remove(file_path) #删除树莓派本地已保存文件//有时候因为进程先后有些图片文件来不及删除#判断img文件中有没有照片删除掉nums os.listdir(/home/pi/regular-photos-of-raspberry-pie/img)#删除来不及删除的照片if nums:delete_imgs()# camera.release()time.sleep(3600)执行上述代码即可完成每小时拍一张照并上传到腾讯云对象存储COS中。 参考资料 https://blog.csdn.net/weixin_46709801/article/details/128045344
http://www.pierceye.com/news/209683/

相关文章:

  • 在线html网站开发广州网站排名优化公司
  • 如何在免费网站上做推扩自己怎么来建设网站
  • 福安市教育局建设网站做架构图简单的网站
  • 如何快速进行网站开发seo是什么东西
  • 网站建设需要具备哪些学编程多少钱学费
  • 建设工程许可证在那个网站办金融行业网站制作
  • 邢台专业做网站价格信息流广告是什么
  • 网站开发的母的目的和意义.建设购物平台网站
  • 立方米网站建设做淘宝客网站用什么程序好
  • 怎样做网站挣钱建筑资料软件
  • 涿州建设局网站苏州市高新区建设局网站
  • 个人soho要怎么做企业网站成都包装设计公司
  • 网站开发 chrome浏览器崩溃ruhe用dw做网站
  • 全屏网站 图片优化个人网站cms系统
  • 做我女朋友程序网站邵东做网站
  • 建设网站如何挂到网上wordpress首页添加幻灯
  • 汕头正规网站建设模板总部城乡建设网站 资料员
  • vs 2017c 怎么建设网站网站建设的数字化和互联网化
  • 南昌网站设计公司海南营销网站建设
  • 购物网站素材个人搭建网站教程
  • 青岛网站建设哪里好模板建站服务公司
  • 青色网站欣赏wordpress中文购物
  • 建站培训全国住房与城乡建设部网站
  • 唐山网站建设方案策划沧州网站建设联系电话
  • 网页制作和网站开发实验报告logo设计品牌
  • 摄影后期教程网站百度指数1000搜索量有多少
  • wp网站建设模板什么是网站的原型
  • 园林绿化网站建设上海著名室内设计公司
  • 大连市住房与城乡建设部网站公司要制作网站
  • 郑州做网站七彩科技企业网站做的漂亮