摘要: 转载:https://zhuanlan.zhihu.com/p/144506204 阅读全文
posted @ 2023-03-21 17:26 hello_Ms_w 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1、下载nginx http://nginx.org/en/download.html 下载稳定版本。以nginx/Windows-1.16.1为例,直接下载 nginx-1.16.1.zip。下载后解压,解压后如下: 2、启动nginx 有很多种方法启动nginx (1)直接双击nginx.exe 阅读全文
posted @ 2023-02-28 20:32 hello_Ms_w 阅读(34) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import turtle as t import cv2 def draw_img(img_path, scale=1): """ 画图片里的内容 :param img_path: 图片路径 :param scale: 缩放比例,比如1,0.5,0. 阅读全文
posted @ 2022-11-24 22:31 hello_Ms_w 阅读(56) 评论(0) 推荐(0) 编辑
摘要: import serialimport structimport loggingimport modbus_tkimport modbus_tk.defines as cstimport modbus_tk.modbus_rtu as modbus_rtulogger = modbus_tk.uti 阅读全文
posted @ 2022-07-18 16:31 hello_Ms_w 阅读(193) 评论(0) 推荐(0) 编辑
摘要: # !/usr/bin/python # -*- coding: UTF-8 -*- import sys import os TESTCASE = os.path.dirname(os.path.abspath(__file__)) DIR = os.path.dirname(TESTCASE) 阅读全文
posted @ 2022-06-30 10:17 hello_Ms_w 阅读(105) 评论(0) 推荐(0) 编辑
摘要: pip install schedule import schedule # 定义需要执行的方法 def job(): print("a simple scheduler in python.") # 设置调度的参数,这里是每2秒执行一次 schedule.every(2).seconds.do(j 阅读全文
posted @ 2022-06-06 16:05 hello_Ms_w 阅读(38) 评论(0) 推荐(0) 编辑
摘要: json的四个方法总结dumps、dump、loads、load dump介绍 1 json .作用:将python内置类型序列化为json对象后写入文件.参数:要存储的数据以及可以用于存储的文件对象json.dump(number,file_object).样例:把列表数据number储存为jso 阅读全文
posted @ 2022-03-06 22:33 hello_Ms_w 阅读(2434) 评论(0) 推荐(0) 编辑
摘要: 深拷贝及浅拷贝区别 浅拷贝copy: 可变类型:(列表,字典,集合)copy函数对可变类型的第一层对象进行拷贝,对拷贝的对象开辟新的内存空间进行存储,不会拷贝对象内部的子对象 不可变类型:(数字,字符串,元组)不可变类型进行拷贝不会给拷贝对象开辟新的内存空间,只是拷贝了这个对象的引用 深拷贝deep 阅读全文
posted @ 2022-03-03 22:36 hello_Ms_w 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 1. 列表操作 分类 关键字 / 函数 / 方法说明 增加 列表.append(值) 在末尾追加值 列表.insert(索引, 值) 在指定位置插入值, 超过索引会追加值 列表.extend(可迭代对象) 将可迭代对象 中 的元素 追加到列表 删除 列表.remove(值) 删除指定值的 第一个匹配 阅读全文
posted @ 2021-06-20 23:43 hello_Ms_w 阅读(99) 评论(1) 推荐(0) 编辑
摘要: from flask import Flask, request from werkzeug.datastructures import FileStorage app = Flask(__name__) @app.route('/', methods=['get', 'post']) def in 阅读全文
posted @ 2021-06-07 23:36 hello_Ms_w 阅读(429) 评论(0) 推荐(0) 编辑