1. Antora Generator
echo off
cls
chcp 65001
set BASE_URL=D:/Install/Antora/AsciiDoc
set ANTORA_URL=%BASE_URL%/asciidoc-generator/
set SITE_URL=%BASE_URL%/asciidoc-distro/docs/index.html
d:
cd %ANTORA_URL%
rem --extension @antora/pdf-extension
rem --extension @antora/lunr-extension
rem -r asciidoctor-pdf
rem -r @djencks/asciidoctor-mathjax
rem --fetch antora-playbook.yml
antora antora-playbook.yml & start %SITE_URL%
2. Jupyter PyTorch
echo off
cls
chcp 65001
set JUPYTER_URL=D:/Install/Dev/workspace/jupyter-module
d:
cd %JUPYTER_URL%
rem 设置Conda环境变量
rem set CONDA_PATH=D:/Install/Dev/Conda
rem 添加Conda的脚本路径到系统变量
rem set PATH=%PATH%;%CONDA_PATH%\Scripts\
call conda activate PyTorch
call jupyter lab
pause
3. Jupyter YoloV8
conda create -n YoloV8 -y
# conda deactivate
conda activate YoloV8
conda install -c conda-forge ultralytics -y
conda install pytorch torchvision torchaudio cpuonly -c pytorch -y
yolo task=detect mode=predict model=yolov8n.pt source=d:/YoloV8SampleImage.jpg
(YoloV8) D:\>yolo task=detect mode=predict model=yolov8n.pt source=d:/YoloV8SampleImage.jpg
Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt to 'yolov8n.pt'...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.23M/6.23M [02:05<00:00, 51.9kB/s]
Ultralytics YOLOv8.2.31 🚀 Python-3.12.3 torch-2.3.1 CPU (12th Gen Intel Core(TM) i7-12700H)
YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients
image 1/1 d:\YoloV8SampleImage.jpg: 448x640 10 persons, 1 bus, 2 traffic lights, 2 backpacks, 2 handbags, 324.9ms
Speed: 3.6ms preprocess, 324.9ms inference, 23.4ms postprocess per image at shape (1, 3, 448, 640)
Results saved to runs\detect\predict
💡 Learn more at https://docs.ultralytics.com/modes/predict
(YoloV8) D:\>
(YoloV8) D:\>yolo task=detect mode=predict model=yolov8n.pt source=d:/YoloV8SampleVideo.mp4
|
C:\Users\Administrator\AppData\Roaming\Ultralytics\settings.yaml
-
修改datasets_dir和runs_dir
settings_version: 0.0.4
datasets_dir: D:\datasets
weights_dir: weights
runs_dir: runs
uuid: ea9d13da4cd129837398c471115598a2d3517ce1bbbdec915fb2c475c3b987d2
sync: true
api_key: ''
openai_api_key: ''
clearml: true
comet: true
dvc: true
hub: true
mlflow: true
neptune: true
raytune: true
tensorboard: true
wandb: true
4. Common Tool
echo off
cls
chcp 65001
:menu
echo.
echo ==========
echo 请选择任务类型:
echo ==========
echo 1 - Notepad
echo 2 - Calculator
echo 9 - Exit
echo.
set /p m=请输入数字,并回车:
if %m%==1 goto note
if %m%==2 goto calc
if %m%==9 goto eof
:note
cd %windir%\system32\notepad.exe
start notepad.exe
goto menu
:calc
cd %windir%\system32\calc.exe
start calc.exe
goto menu
5. Enable Group Policy
@echo off
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\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:"%SystemRoot%\servicing\Packages\%%i"
pause
6. Enable HyperV
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL