会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
tt_贝塔
纸上得来终觉浅,绝知此事要躬行
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
下一页
2021年9月30日
python 加解密
摘要: 常用加解密 1. md5 加密 import hashlib def private_passwd(passwd: str) -> str: return hashlib.md5(passwd.encode(encoding='UTF-8')).hexdigest() 2. base64 加解密 i
阅读全文
posted @ 2021-09-30 09:37 tt_贝塔
阅读(192)
评论(0)
推荐(1)
2021年9月28日
python 多线程 - 售票
摘要: 1. 多线程使用 多线程共享全局变量,利用互斥锁解决资源竞争 # -*- coding: utf-8 -*- import threading import time import os def sell_ticket(tid): """售票""" global num while True: lo
阅读全文
posted @ 2021-09-28 18:58 tt_贝塔
阅读(129)
评论(0)
推荐(0)
2021年9月16日
pt 安装
摘要: 1. 安装 pt-online-schema-change 工具 可进行修改表结构:包括增加表字段、修改表字段、增加表索引等 wget https://www.percona.com/downloads/percona-toolkit/3.0.8/binary/tarball/percona-too
阅读全文
posted @ 2021-09-16 19:04 tt_贝塔
阅读(143)
评论(0)
推荐(0)
2021年9月14日
python requests 应用
摘要: 1. GET 请求 Content-Type: application/json;charset=utf-8 import requests url = "http://xxxx" body = {"name": "zhangsan"} headers = {"Content-Type": "app
阅读全文
posted @ 2021-09-14 18:13 tt_贝塔
阅读(66)
评论(0)
推荐(0)
2021年9月9日
windows 保持后台运行
摘要: 1.cmd 或 powersehll 执行 .exe文件,关闭 cmd 或 powershell 窗口后,运行的.exe进程会自动杀掉 解决方法:先创建一个.bat文件:如 test.bat 内容如下 if "%1" == "h" goto begin mshta vbscript:createob
阅读全文
posted @ 2021-09-09 20:07 tt_贝塔
阅读(925)
评论(0)
推荐(0)
2021年9月1日
python 判断系统类型
摘要: python 查看系统类型 # -*- coding: utf-8 -*- import platform from logger import logger def is_platform() -> str: type = platform.system() if type in ["Window
阅读全文
posted @ 2021-09-01 18:35 tt_贝塔
阅读(267)
评论(0)
推荐(0)
2021年8月30日
python jsonpath 与 filter 提取数据
摘要: 1. filter filter() 函数用于过滤序列,过滤掉不符合条件的元素,返回由符合条件元素组成的新列表。 用法:filter(function, iterable) infoList= { "Response": { "RequestId": "9d268c8f-26c4-d41d-cdcd
阅读全文
posted @ 2021-08-30 16:32 tt_贝塔
阅读(838)
评论(0)
推荐(0)
2021年8月27日
windows 凭据更改
摘要: 1. git clone xxx 2. 解决方法 控制面板 》用户账户 》管理你的凭据 》Windows 凭据
阅读全文
posted @ 2021-08-27 17:25 tt_贝塔
阅读(384)
评论(0)
推荐(0)
2021年8月26日
python 随机字符串
摘要: # -*- coding=utf-8 -*- import random import string def random_name(len: int) -> str: """生成随机字符串""" str_list = [random.choice(string.digits + string.as
阅读全文
posted @ 2021-08-26 19:58 tt_贝塔
阅读(75)
评论(0)
推荐(0)
2021年8月25日
linux 执行 shell 文件报错 /usr/bin/env: "bash\r"
摘要: 1.#!/usr/bin/env在脚本中的作用 在 linux 的一些脚本,需在开头一行指定脚本的解释程序,如: #!/usr/bin/env bash #!/usr/bin/bash #!/usr/bin/env python 告诉操作系统执行这个脚本的时候,调用 /usr/bin 下的 pyth
阅读全文
posted @ 2021-08-25 11:47 tt_贝塔
阅读(462)
评论(0)
推荐(0)
上一页
1
2
3
下一页
公告