上一页 1 2 3 4 5 6 ··· 8 下一页

2021年5月28日

摘要: #! /usr/bin/env python # -*- coding:utf-8 -*- import time, functools from random import random import logging as logging_logger __all__ = [ 'retry' ] 阅读全文
posted @ 2021-05-28 17:23 哎呀!土豆 阅读(221) 评论(0) 推荐(0) 编辑

2020年10月22日

摘要: 添加日志文件和日志流 # -*- coding: utf-8 -*- import logging from logging.handlers import TimedRotatingFileHandler from config import ROOT_PATH class MyTimedRota 阅读全文
posted @ 2020-10-22 09:55 哎呀!土豆 阅读(70) 评论(0) 推荐(0) 编辑

2020年8月6日

摘要: python生成二维码(二维码的实质就是一个url),需要依赖包qrcode和PIL(或者Pillow-PIL) import qrcodeimg = qrcode.make('www.baidu.com')img.save('./baidu.png') 阅读全文
posted @ 2020-08-06 16:58 哎呀!土豆 阅读(148) 评论(0) 推荐(0) 编辑

2020年7月17日

摘要: 最重要的快捷键 1. ctrl+shift+A:万能命令行 2. shift两次:查看资源文件 新建工程第一步操作 1. module设置把空包分层去掉,compact empty middle package 2. 设置当前的工程是utf-8,设置的Editor-->File Encodings- 阅读全文
posted @ 2020-07-17 18:46 哎呀!土豆 阅读(765) 评论(0) 推荐(0) 编辑

2020年1月8日

摘要: Git简介: Git是目前世界上最先进的分布式版本控制系统我们开发的所有工具都用Git来做版本控制 Git的四个工作区域: 工作区:当前编辑的区域缓存区:add 之后的区域本地仓库:commit之后的区域远程仓库:push之后远程的区域 Git常用命令(1) git status 查看git的状态( 阅读全文
posted @ 2020-01-08 15:47 哎呀!土豆 阅读(1117) 评论(0) 推荐(0) 编辑

2019年11月13日

摘要: 读取excel文件的模块 import xlrd book=xlrd.open_workbook('stu.xls') sheet=book.sheet_by_index(0) #根据sheet编号来 # sheet=book.sheet_by_name('sheet1') #根据 sheet名称来 阅读全文
posted @ 2019-11-13 18:23 哎呀!土豆 阅读(140) 评论(0) 推荐(0) 编辑

2019年10月25日

摘要: 自动发送邮件 # -*- coding: utf-8 -*- import smtplib # 发送字符串的邮件 from email.mime.text import MIMEText # 处理多种形态的邮件主体我们需要 MIMEMultipart 类 # 设置服务器所需信息 fromaddr = 阅读全文
posted @ 2019-10-25 11:34 哎呀!土豆 阅读(990) 评论(0) 推荐(0) 编辑

2019年8月11日

摘要: 快排 二分法查找 选择排序 冒泡排序 阅读全文
posted @ 2019-08-11 15:04 哎呀!土豆 阅读(178) 评论(0) 推荐(0) 编辑

2019年7月8日

摘要: # 注册的form class RegForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput, label='密码', min_length=6) # 重写默认字段 re_password = forms.CharField(widget=forms.PasswordInput, ... 阅读全文
posted @ 2019-07-08 22:09 哎呀!土豆 阅读(105) 评论(0) 推荐(0) 编辑

2019年6月29日

摘要: 用户登陆,把token放到数据库中 认证组件,数据库中token过期时间14天,redis中存放的 token,用户id(k,v) 过期时间为7天 阅读全文
posted @ 2019-06-29 16:59 哎呀!土豆 阅读(112) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页

导航