摘要: 协程&异步编程&asyncio 1.项目示例 1.1在python3.7 之前的版本 主要为 asyncio.ensure_future() 实例化task 使用 loop = asyncio.get_event_loop() done, deping = loop.run_until_comple 阅读全文
posted @ 2021-03-17 16:28 ShanCe-刘勇 阅读(98) 评论(0) 推荐(0) 编辑
摘要: *20264 upstream prematurely closed connection while reading response header from upstream, client: 222.82.177.81, server: dashapi.im.izdax.cn, request 阅读全文
posted @ 2021-03-15 18:49 ShanCe-刘勇 阅读(287) 评论(0) 推荐(0) 编辑
摘要: ######根据docker 的概念, 容器内不因该保存持久化数据 ####1. 在容器内挂载本地目录 docker run -it -v /home/dock/Downloads:/usr/Downloads:ro ceshi /bin/bash 将本地的/home/dock/Downloads 阅读全文
posted @ 2021-03-15 13:28 ShanCe-刘勇 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 书写 gunicron 配置文件 dash-gunicron.py public-gunicron.py 使用其配置请求记录, 那么nginx 可以不写请求日志 书写错误日志 dash-gunicron.py workers=8 # 进程数 threads = 2 # 工作者的线程数 bind = 阅读全文
posted @ 2021-03-15 13:10 ShanCe-刘勇 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Linux系统: mkdir ~/.pip cat > ~/.pip/pip.conf << EOF [global] trusted-host=mirrors.aliyun.com index-url=https://mirrors.aliyun.com/pypi/simple/ EOF Wind 阅读全文
posted @ 2021-03-12 18:01 ShanCe-刘勇 阅读(94) 评论(0) 推荐(0) 编辑
摘要: http://c.biancheng.net/docker/ ####1. 常用命令 service docker start # 启动docker服务 service docker stop # 停止docker 服务 service docker restart # 重启docker 服务 do 阅读全文
posted @ 2021-03-12 13:54 ShanCe-刘勇 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 我的Docker 版本为 1.12.6 宿主机为CentOS7 从网上找了几个速度比较快的镜像地址: Docker 官方中国区 https://registry.docker-cn.com 网易 http://hub-mirror.c.163.com ustc https://docker.mirr 阅读全文
posted @ 2021-03-12 13:05 ShanCe-刘勇 阅读(2693) 评论(0) 推荐(0) 编辑
摘要: 树的概念 数的性质: 在二叉树的第n层上至多有节点 \[ 2 ^ {n-1} \] 深度未k的数至多有节点 \[ 2^n-1 \] 对于任意一颗二叉树,若终端节点数为n, 而度数为2的节点数为 N ,有 n = N + 1 具有n个节点的完全二叉树的深度为 \[ \log_2n +1 \] 访问方式 阅读全文
posted @ 2021-03-09 15:36 ShanCe-刘勇 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 刚学react,在网上看了好多蒙的很,就写了个简单暴力的,如果有什么问题欢迎提出来。 1. 封装 Route export default class PrivateRoute extends Component { render() { return ( <Route {...this.props 阅读全文
posted @ 2021-02-22 18:56 ShanCe-刘勇 阅读(516) 评论(0) 推荐(0) 编辑
摘要: 1. 简单封装使用 创建一个request组件来定义全局url import axios from 'axios'; export const newVar = axios.create({ baseURL:"http://127.0.0.1:8080", timeout: 5000 }) 切记这里 阅读全文
posted @ 2021-02-22 11:32 ShanCe-刘勇 阅读(694) 评论(0) 推荐(0) 编辑