摘要: # str转datetime datetime.strptime('2023-06-29 15:54:44', '%Y-%m-%d %H:%M:%S') # datetime转str datetime.now().strftime('%Y-%m-%d %H:%M:%S') # 时间差 (now_da 阅读全文
posted @ 2023-06-30 13:42 你说夕阳很美 阅读(25) 评论(0) 推荐(0)
摘要: # 匹配 import re res = '你的上次登录时间是 2023-06-29 15:54:44' match_obj = re.match(r'你的上次登录时间是 (.*)', res, re.M | re.I) print(match_obj.group(1)) 阅读全文
posted @ 2023-06-30 13:35 你说夕阳很美 阅读(22) 评论(1) 推荐(0)
摘要: C:\Users\daizichuan>python -m sysconfig Platform: "win-amd64" Python version: "3.10" Current installation scheme: "nt" Paths: data = "D:\miniconda3" i 阅读全文
posted @ 2023-06-30 11:59 你说夕阳很美 阅读(79) 评论(0) 推荐(0)
摘要: parameter:形参(formal parameter),体现在函数内部,作用域是这个函数体。 argument :实参(actual parameter),调用函数实际传递的参数。 阅读全文
posted @ 2023-06-29 11:22 你说夕阳很美 阅读(172) 评论(0) 推荐(0)
摘要: python中,可以简单理解为: 可哈希的数据类型,即不可变的数据结构(数值类型(int,float,bool)字符串str、元组tuple、自定义类的对象)。 不可哈希的数据类型,即可变的数据结构 (字典dict,列表list,集合set)。 阅读全文
posted @ 2023-06-28 16:06 你说夕阳很美 阅读(65) 评论(0) 推荐(0)
摘要: # coding=utf-8 phone = ['iPhone', 'HuaWei', 'Mi'] number = [1, 2, 3] color = ['白', '黑'] for p in phone: for n in number: for c in color: print(f'{p}{n 阅读全文
posted @ 2023-06-26 09:56 你说夕阳很美 阅读(91) 评论(0) 推荐(0)
摘要: def download_file(file_name): '''IE下载,提示要打开或保存。。。,这里是另存为''' pyperclip.copy(file_name) time.sleep(1) # 从ie界面切换到下载提示 pyautogui.press('f6') time.sleep(0. 阅读全文
posted @ 2023-06-20 10:40 你说夕阳很美 阅读(174) 评论(0) 推荐(0)
摘要: @echo off set _task=notepad.exe set _svr=c:\windows\notepad.exe set _des=start.bat :checkstart tasklist | findstr /I "%_task%" if %errorlevel% == 0 (g 阅读全文
posted @ 2023-06-18 15:44 你说夕阳很美 阅读(90) 评论(0) 推荐(0)
摘要: #!/bin/bash #获取逻辑CPU个数 processors=`cat /proc/cpuinfo | grep "processor" | wc -l` function cpu() { NUM=1 while [ $NUM -le $processors ]; do util=`vmsta 阅读全文
posted @ 2023-06-18 13:35 你说夕阳很美 阅读(48) 评论(0) 推荐(0)
摘要: @echo off echo +++++++++++++请选择用户配置文件里已保存的WiFi名称+++++++++++++++++ netsh wlan show profiles set/p WiFiName=请输入WiFi名称: echo ++++++++++++++++++++++++WiFi 阅读全文
posted @ 2023-06-18 13:29 你说夕阳很美 阅读(76) 评论(0) 推荐(0)