会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
一笔一划82
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2021年9月16日
python 将mysql数据库信息写入xlsx
摘要: 使用openpyxl库 from openpyxl import Workbook import pymysql con = pymysql.connect(host="127.0.0.1", port=3306, user="root", passwd="***", db="student",ch
阅读全文
posted @ 2021-09-16 11:00 一笔一划82
阅读(73)
评论(0)
推荐(0)
2021年9月15日
python-logging模块
摘要: logging模块 import logging logging.basicConfig(level=logging.DEBUG, format="%(message)s %(asctime)s",datefmt="%Y-%m-%d %H:%M:%S") #level:日志报错级别 format:日
阅读全文
posted @ 2021-09-15 17:22 一笔一划82
阅读(38)
评论(0)
推荐(0)
2021年8月26日
Flask-下载文件
摘要: 通过send_from_directory下载upload目录里的文件 send_from_directory(文件目录,目录下的文件名,as_attachment=True:是否显示文件名称) from flask import Flask from flask import send_from_
阅读全文
posted @ 2021-08-26 14:45 一笔一划82
阅读(431)
评论(0)
推荐(0)
2021年8月17日
python学习记录-三引号文本缩进及多行字符串正则匹配
摘要: from textwrap import dedent import re def text_indent(s): dedentString = lambda s: dedent(s[1:])[:-1] return dedentString(s) f = """<pre style="margin
阅读全文
posted @ 2021-08-17 09:03 一笔一划82
阅读(179)
评论(0)
推荐(0)
2021年8月12日
prometheus配置文件信息
摘要: 配置文件设置 docker -d\ > --name=prometheus\ > -p 9090:9090\ > -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml\ # -v 将宿主机/tmp/prometheus.yml的配置文件挂在到容器
阅读全文
posted @ 2021-08-12 16:35 一笔一划82
阅读(174)
评论(0)
推荐(0)
2021年8月10日
docker环境下安装Prometheus
摘要: 1.配置文件 在 Linux /tmp目录下创建prometheus.yml配置文件 # 全局配置段 global: # 采集间隔 scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every
阅读全文
posted @ 2021-08-10 16:53 一笔一划82
阅读(333)
评论(0)
推荐(0)
docker基础
摘要: 1.安装docker 卸载历史版本 sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-log
阅读全文
posted @ 2021-08-10 10:28 一笔一划82
阅读(27)
评论(0)
推荐(0)
2021年8月5日
Flask学习记录-配置文件
摘要: Flask 配置文件设置有以下几种方式: 1.字段赋值方式导入 from flask import Flask app= Flask(__name__) app.config["debug"]= True app.secret_key= 'gfhdfgfhf' 2.py文件导入 from flask
阅读全文
posted @ 2021-08-05 08:57 一笔一划82
阅读(85)
评论(0)
推荐(0)
Flask学习记录-添加路由
摘要: Flask添加路由有两种方式: 1. @app.route("/index", methods=["GET","POST"]) def index(): return "hello world" 2. def order(): return "hello world" app.add_url_rul
阅读全文
posted @ 2021-08-05 08:37 一笔一划82
阅读(137)
评论(0)
推荐(0)
2021年8月2日
Django学习记录7-模板继承
摘要: 模板继承可以减少页面内容的重复定义,实现页面内容的重用 典型应用:网站的头部、尾部是一样的,这些内容可以定义在父模板中,子模板不需要重复定义 block标签:在父模板中预留区域,在子模板中填充 extends继承:继承,写在模板文件的第一行 定义父模板base.html 父模板 <!DOCTYPE
阅读全文
posted @ 2021-08-02 14:25 一笔一划82
阅读(28)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告