03 2021 档案

摘要:1. matplotlib →绘图 2. numpy → 处理数值型数组 3. pandas → 处理字符串, 时间序列、字典等 一 . matplotlib (切记x,y 都必须是数字, 通过xticks , yticks 将字符串与数字对应) 1.基础练习 ​ python的底层绘图库,主要做数 阅读全文
posted @ 2021-03-29 19:13 ShanCe-刘勇 阅读(67) 评论(0) 推荐(0)
摘要:1. matplotlib →绘图 2. numpy → 处理数值型数组 3. pandas → 处理字符串, 时间序列、字典等 二、numpy 学习 ​ 一个在python中做科学计算的基础库,重在数值计算, 也在大部分python科学计算库的基础库, 多用于大型、多维数组上执行数值运算。 1.安 阅读全文
posted @ 2021-03-29 19:11 ShanCe-刘勇 阅读(111) 评论(0) 推荐(0)
摘要:1. matplotlib →绘图 2. numpy → 处理数值型数组 3. pandas → 处理字符串, 时间序列、字典等 三、pandas 学习 ​ numpy 帮我们处理数值型数据, pandas 可以帮我们处理字符串、时间序列等。 一、常用数据类型 Series 一维, 由 "索引" 跟 阅读全文
posted @ 2021-03-29 18:07 ShanCe-刘勇 阅读(108) 评论(0) 推荐(0)
摘要:1.多线程 from threading import Thread 示例1 from threading import Thread def func1(name): for i in range(1000): print("func1", i) def func2(name): for i in 阅读全文
posted @ 2021-03-25 20:18 ShanCe-刘勇 阅读(74) 评论(0) 推荐(0)
摘要:bs4 基本使用 pip install bs4 https://beautifulsoup.readthedocs.io/zh_CN/v4.4.0/ 将html 转换为 将页面源代码交给BeautifulSoup, 进行解析 find 只找第一个满足条件的 find_all 所有满足条件的 通过g 阅读全文
posted @ 2021-03-25 20:17 ShanCe-刘勇 阅读(48) 评论(0) 推荐(0)
摘要:此过程结合flask-socketio 和 sockeio.js 讲解 1.初始 flask-socketio https://blog.csdn.net/eleanoryss/article/details/109600154 这个链接是介绍 websocket 和 HTTP 长连接的差别 web 阅读全文
posted @ 2021-03-18 20:03 ShanCe-刘勇 阅读(676) 评论(0) 推荐(0)
摘要:协程&异步编程&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-刘勇 阅读(151) 评论(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-刘勇 阅读(382) 评论(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-刘勇 阅读(118) 评论(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-刘勇 阅读(328) 评论(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-刘勇 阅读(117) 评论(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-刘勇 阅读(59) 评论(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-刘勇 阅读(3030) 评论(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-刘勇 阅读(77) 评论(0) 推荐(0)