化身天使的博客

摘要: 一:shell脚本 #!/bin/bash #祖传开头 . /etc/profile #系统环境变量, 有空格 source ~/.bash_profile #用户环境变量 python abc.py #执行命令 二:crontab crontab -l #查看计划任务 crontab -e #编辑 阅读全文
posted @ 2021-09-01 17:27 化身天使 阅读(43) 评论(0) 推荐(0)
摘要: 1. 移动 0 //行首 $ //行尾 ^ //行首非空白字符 fx //向后移动到字符x Fx //向后移动到字符x e #单词尾 ge #上一个单词尾 b #向后移动一个单词,把符号或标点当作单词处理 B #向后移动一个单词,不把符号或标点当作单词处理 w #向前移动一个单词,将符号或标点当作单 阅读全文
posted @ 2021-09-01 15:47 化身天使 阅读(53) 评论(0) 推荐(0)
摘要: 一.批处理 @echo off ::不显示命令执行过程 E: cd E:\nginx-1.21.1 start nginx.exe -s stop :: start用于新开一个窗口执行命令, 不会阻碍后续命令执行 start nginx.exe :: 如果前一个命令执行完占用终端, 不加start会 阅读全文
posted @ 2021-09-01 14:53 化身天使 阅读(109) 评论(0) 推荐(0)
摘要: 1. 使用js 1.1 外部脚本引入 <script>脚本内容写在script标签里</script> <script src="../js/ajax.js"></script> //src里写脚本地址,可以是本地,也可以是链接 1.2 嵌入html <script>脚本内容写在script标签里< 阅读全文
posted @ 2021-08-09 13:11 化身天使 阅读(85) 评论(0) 推荐(0)
摘要: 1.使用zmail库发邮件 import zmail server = zmail.server('邮件@163.com','密码') #发送 mail = {'subject':'标题', 'content_text':'内容', 'attachments': [r'C:\Users\用户名\De 阅读全文
posted @ 2021-08-07 23:17 化身天使 阅读(34) 评论(0) 推荐(0)
摘要: import datetime t = datetime.date.today() #获取年月日,类型date t = datetime.datetime.now() #获取完整当前时间,类型date t = datetime.datetime.utfnow() #获取utf时间,Mongodb使用 阅读全文
posted @ 2021-08-07 22:59 化身天使 阅读(143) 评论(0) 推荐(0)
摘要: 官方文档: https://sanic.dev/zh/guide/getting-started.html 1.路由 @bp.route('/api/export', methods=["get","post"]) #同时支持get, post请求 @bp.get('/api/export/<tag 阅读全文
posted @ 2021-08-07 22:52 化身天使 阅读(482) 评论(0) 推荐(0)
摘要: 12.1 PysimpleGUI 1.示例 import PySimpleGUI as sg import tools ''' ''' #0.数据定义 #一.相关函数 def gui(): #sg.theme_previewer() #所有主题预览 #sg.preview_all_look_and_ 阅读全文
posted @ 2021-08-07 21:11 化身天使 阅读(304) 评论(0) 推荐(0)
摘要: 2.1 requests库 2.1.1 直接上手 #1 下载文件 import requests #0.数据定义 src =r'C:\Users\clockx.cab' headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) ' 阅读全文
posted @ 2021-08-07 21:06 化身天使 阅读(56) 评论(0) 推荐(0)
摘要: 创建类 class frame(wx.Frame): #创建一个类myframe,继承自wx.Frame def __init__ (self,src): #构造函数,对象实例化的时候,自动 执行该函数里的内容,本例中实例化时需传入参数src def ww(self,a): #定义一个方法(函数) 阅读全文
posted @ 2021-08-07 21:03 化身天使 阅读(53) 评论(0) 推荐(0)