跳至主要内容

博文

进度条

https://pypi.org/project/progress/ https://github.com/tqdm/tqdm https://stackoverflow.com/questions/3160699/python-progress-bar?page=1&tab=votes#tab-top https://towardsdatascience.com/a-complete-guide-to-using-progress-bars-in-python-aa7f4130cda8 progress ,  progressbar2 ,  alive-progress ,  tqdm . # Progress from time import sleep from progress.bar import Bar with Bar('Processing...') as bar:     for i in range(100):         sleep(0.02)         bar.next() from time import sleep from progress.bar import Bar with Bar('Loading', fill='@', suffix='%(percent).1f%% - %(eta)ds') as bar:     for i in range(100):         sleep(0.02)         bar.next() from time import sleep from progress.spinner import MoonSpinner with MoonSpinner('Processing…') as bar:     for i in range(100):         sleep(0.02)         bar.next() # Progressb...

关闭windows自动更新

选项1.禁用Windows Update服务 选项2.设置计量连接 选项1.禁用Windows Update服务 选项2.设置计量连接 关闭windows自动更新 选项1.组策略编辑器 win10家庭版的系统上默认禁用组策略(gpedit.msc) 打开方式:以管理员身份运行以下批处理文件 @echo off pushd "%~dp0" dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i" pause 选项2.禁用Windows Update服务 脚本 https://github.com/f1tz/BlockWin10AU/blob/master/Block%20WAU.bat @echo off title BLOCK Win10AU! mode con cols=70 lines=15 color 1f echo ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ echo ※                    禁用Windows10自动更新                         ※ echo ※                        ...

bat 详解

:: 创建一个字符串 :: This program just displays Hello World  @echo off set message=Hello World  echo %message% :: 输出Hello World :: 创建一个空字符串 :: 通过在初始化期间不为其分配任何值来创建一个空字符串 :: 要检查是否存在空字符串,您需要将变量名称括在方括号中,并将其与方括号中的值进行比较 @echo off SET a= SET b=Hello  if "%a%"=="" (echo "String A is empty")  if "%b%"=="" (echo "String B is empty ") :: 输出 String A is empty :: 字符串插值是通过将常量,变量,文字和表达式的值包含在字符串文字中来构造新的String值的方法 @echo off  SET a=He llo  SET b=World SET /A d=50  SET c=%a% and %b% %d% echo %c% :: 输出 He llo  and World 50 ::  @echo off set str=Hello World call :strLen str strlen echo String is %strlen% characters long exit /b :strLen setlocal enabledelayedexpansion :strLen_Loop    if not "!%1:~%len%!"=="" set /A len+=1 & goto :strLen_Loop (endlocal & set %2=%len%) goto :eof :: 输出 String is 11 characters long :: 提取左边字符串 :: 关键是0,5用于指定需要显示的字符。在这种情况下,我们说应该显示字符0到5 @echo off  set str=Helloworld echo %str% set str=%str:~0,5% echo %...

安装和卸载软件(msi\exe)

如何判断一个软件是64位的还是32位的? 情况1、 未安装--右键安装程序查看属性,兼容性,勾选兼容模式查看最低适配是vista的是64位,反之32位, 不太准确 情况2、 已安装--运行软件,64位操作系统打开任务管理器看进程后缀名,带*32就是32位,反之64位 https://www.joci.net/xxbk/126251/ FileMon 和 Regmon 不再可供下载。从Windows 2000 SP4,Windows XP SP2,Windows Server 2003 SP1和Windows Vista开始的Windows版本上,它们已被 Process Monitor 取代 https://adamtheautomator.com/procmon/ Process Monitor 是Windows的高级监视工具,它显示实时文件系统,注册表和进程/线程活动。 它结合了两个旧的Sysinternals实用程序 Filemon 和  Regmon的功能 ,并添加了广泛的增强功能列表,包括丰富的和非破坏性的过滤,全面的事件属性(例如会话ID和用户名),可靠的过程信息,带有集成符号的完整线程堆栈支持每个操作,同时记录到文件等。 它独特的强大功能将使Process Monitor成为您的系统故障排除和恶意软件搜索工具包中的核心实用程序。 https://wikileaks.org/ciav7p1/cms/page_42991626.html HKLM\Software\Microsoft\Cryptography\MachineGuid Machine GUID/Cryptography GUID---该密钥通常用作机器的唯一标识符。它也已用于将两台计算机链接在一起-在某些情况下,计算机GUID是与设备(MP3播放器等)一起传递的。 Machine GUID不是唯一 https://docs.microsoft.com/zh-cn/windows/win32/properties/props-system-identity-uniqueid?redirectedfrom=MSDN UniqueID才是唯一 注册表 是存储系统和应用程序的设置信息 打开注册表的方式很简单:cmd中输入regedit 卸载路径只有一个 已安装32位的程序,如果是系统是32位...

python 代码示例

  加密软件 谷歌搜registration codes python和license keys python https://www.nuvovis.com/python-software-licensing.html https://build-system.fman.io/generating-license-keys https://codereview.stackexchange.com/questions/95499/register-login-and-authentication-through-terminal 获取MAC地址并生成序列号,从序列号生成激活密钥 secrets模块资料 https://blog.miguelgrinberg.com/post/the-new-way-to-generate-secure-tokens-in-python # 不足十位左边加零 while True:     num = input('Enter a number : ')     print('The zero-padded number is : ', str(num).rjust(10, '0')) 查找n个自然数的和 # Sum of natural numbers up to num   num = 16   if num < 0 :     print ( "Enter a positive number" ) else :     sum = 0     # use while loop to iterate until zero     while ( num > 0 ) :         sum + = num        num - = 1     print ( "The sum is" , sum )   使用匿名函数显示整数2的幂 # Display the powers of 2 using anonymous function ...