Download scripts/_size_report.ps1 from GRIMIAI-VNAnhdev/GROMAIVN: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/datasets/GRIMIAI-VNAnhdev/GROMAIVN/resolve/main/scripts/_size_report.ps1
- Command line
-
hf download hf://datasets/GRIMIAI-VNAnhdev/GROMAIVN/scripts/_size_report.ps1
-
curl -L -o _size_report.ps1 https://huggingface.co/datasets/GRIMIAI-VNAnhdev/GROMAIVN/resolve/main/scripts/_size_report.ps1
1.13 kB
| $ErrorActionPreference = 'SilentlyContinue' | |
| (Get-Process -Id $PID).PriorityClass = 'BelowNormal' | |
| $out = 'D:\GROM_ktined\scripts\_size_report.txt' | |
| $r = New-Object System.Collections.ArrayList | |
| $d = Get-PSDrive D | |
| [void]$r.Add(('D free GB: {0:N2} | used GB: {1:N2}' -f ($d.Free/1GB), ($d.Used/1GB))) | |
| $paths = 'data\data','data\data\sources','data\dataset','data\dataset_extra','data\db_exports','data\local_uploads','data\picture','data\raw_text','scripts' | |
| foreach ($p in $paths) { | |
| $f = Join-Path 'D:\GROM_ktined' $p | |
| if (Test-Path $f) { | |
| $s = Get-ChildItem $f -Recurse -File | Measure-Object Length -Sum | |
| [void]$r.Add(('{0} | {1:N2} GB | {2} files' -f $p, ($s.Sum/1GB), $s.Count)) | |
| } | |
| } | |
| $s = Get-ChildItem 'D:\GROM_ktined' -Recurse -File | Measure-Object Length -Sum | |
| [void]$r.Add(('TOTAL | {0:N2} GB | {1} files' -f ($s.Sum/1GB), $s.Count)) | |
| Get-ChildItem 'D:\GROM_ktined\data\data\sources' -Directory | ForEach-Object { | |
| $t = Get-ChildItem $_.FullName -Recurse -File | Measure-Object Length -Sum | |
| [void]$r.Add((' src/{0} | {1:N2} GB | {2} files' -f $_.Name, ($t.Sum/1GB), $t.Count)) | |
| } | |
| $r | Out-File $out -Encoding utf8 | |