随笔- 310
文章- 1
评论- 0
阅读-
85655
06 2023 档案
python 协程
摘要:什么是协程 协程(co-routine,又称微线程、纤程)是一种多方协同的工作方式。协程不是进程或线程,其执行过程类似于 Python 函数调用,Python 的 asyncio 模块实现的异步IO编程框架中,协程是对使用 async 关键字定义的异步函数的调用。当前执行者在某个时刻主动让出(yie
阅读全文
python 读取yaml配置文件
摘要:# coding:utf-8 import yaml #pip install pyyaml import os import json base_path = os.path.dirname(os.path.abspath(__file__)) conf_file= os.path.join(ba
阅读全文
python configparser读取配置文件
摘要:# coding:utf-8 import configparser import os import json base_path = os.path.dirname(os.path.abspath(__file__)) conf_file= os.path.join(base_path,"con
阅读全文
linux判断文件是否存在
摘要:#!/bin/bash file="/home/test.txt" now_time=`date -u "+%Y-%m-%d %H:%M:%S" -d "8 hour"` if [ ! -f "$file" ];then echo "check time:[$now_time] file $file
阅读全文
华为云 linux下安装mysql
摘要:下载 MySQL :: Download MySQL Community Server 创建目录并解压 #创建目录 mkdir /usr/local/mysql #解压文件并重命名 tar -zxvf mysql-8.0.33-linux-glibc2.28-x86_64.tar.gz mv mys
阅读全文