<commit_before>﻿$PSVersionTable
$PSVersionTable.PSVersion

$SystemManaged  = Get-WmiObject -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile} 
$total_physicalmem = gwmi Win32_ComputerSystem | % {[Math]::round($_.TotalPhysicalMemory/1MB,0)} 
$physical_mem = get-ciminstance -class 'cim_physicalmemory' | % { $_.Capacity/1024/1024}

$PF =gwmi Win32_PageFileUsage 
$PageFileLocation = $PF.Name;
$PageFileSize = $PF.AllocatedBaseSize 

Write-Host "physical memory          : "$physical_mem
Write-Host "total physical memory    : "$total_physicalmem
Write-Host "page file system managed : "$SystemManaged
Write-Host "page file location       : "$PageFileLocation
Write-Host "page file size           : "$PageFileSize
Write-Host "InitialSize              : "${CurrentPageFile}.InitialSize
Write-Host "MaximumSize              : "$CurrentPageFile.MaximumSize

if($env:APPVEYOR -eq "true"){
    Write-Host !!!!!!! on AppVeyor: changing page file settings !!!!!!!!!!
    #disable automatically managed page file settings
    $c = Get-WmiObject Win32_computersystem -EnableAllPrivileges
    if($c.AutomaticManagedPagefile){
        Write-Host disabling managed page file settings
        $c.AutomaticManagedPagefile = $false
        $c.Put() | Out-Null
    }

    $new_page_size=18000
    $CurrentPageFile = Get-WmiObject -Class Win32_PageFileSetting
    if($CurrentPageFile.InitialSize -ne $new_page_size){
        Write-Host "setting new page file size to $new_page_size"
        $CurrentPageFile.InitialSize=$new_page_size
        $CurrentPageFile.MaximumSize=$new_page_size
        $CurrentPageFile.Put() | Out-Null
    }

    Write-Host "new ------------ "
    Write-Host "system managed:" (Get-WmiObject -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile})
    Write-Host "page file size:" (gwmi Win32_PageFileUsage).AllocatedBaseSize
    Write-Host "InitialSize: "${CurrentPageFile}.InitialSize
    Write-Host "MaximumSize: "$CurrentPageFile.MaximumSize
} else {
    Write-Host not on AppVeyor, leaving page file as is
}

#list drives
Get-WmiObject -Class Win32_LogicalDisk |
    Where-Object {$_.DriveType -ne 5} |
    Sort-Object -Property Name | 
    Select-Object Name, VolumeName, FileSystem, Description, VolumeDirty, `
        @{"Label"="DiskSize(GB)";"Expression"={"{0:N}" -f ($_.Size/1GB) -as [float]}}, `
        @{"Label"="FreeSpace(GB)";"Expression"={"{0:N}" -f ($_.FreeSpace/1GB) -as [float]}}, `
        @{"Label"="%Free";"Expression"={"{0:N}" -f ($_.FreeSpace/$_.Size*100) -as [float]}} |
    Format-Table -AutoSize

<commit_msg>AppVeyor: new try, nr.1<commit_after>﻿$PSVersionTable
$PSVersionTable.PSVersion

$comp_name = $env:COMPUTERNAME
$user_name = $env:USERNAME
Write-Host $comp_name $user_name

$on_appveyor = $false
if($comp_name -eq "appveyor-vm" -And $user_name -eq "appveyor"){
    $on_appveyor = $true
}


$SystemManaged  = Get-WmiObject -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile} 
$total_physicalmem = gwmi Win32_ComputerSystem | % {[Math]::round($_.TotalPhysicalMemory/1MB,0)} 
$physical_mem = get-ciminstance -class 'cim_physicalmemory' | % { $_.Capacity/1024/1024}

$PF =gwmi Win32_PageFileUsage 
$PageFileLocation = $PF.Name;
$PageFileSize = $PF.AllocatedBaseSize 

Write-Host "physical memory          : "$physical_mem
Write-Host "total physical memory    : "$total_physicalmem
Write-Host "page file system managed : "$SystemManaged
Write-Host "page file location       : "$PageFileLocation
Write-Host "page file size           : "$PageFileSize
Write-Host "InitialSize              : "${CurrentPageFile}.InitialSize
Write-Host "MaximumSize              : "$CurrentPageFile.MaximumSize

if($on_appveyor -eq $true){

    Write-Host !!!!!!! on AppVeyor: changing page file settings !!!!!!!!!!

    $dirs = (
        "C:\qt",
        "C:\Users\appveyor\AppData\Local\Microsoft\Web Platform Installer",
        "C:\Program Files\Microsoft SQL Server",
        "C:\ProgramData\Package Cache"
    )
    Foreach($dir in $dirs){
        if(Test-Path $dir) {
            Write-Host found $dir
            Remove-Item $dir -Force -Recurse
        } else {
            Write-Host not found $dir
        }
    }

    #disable automatically managed page file settings
    $c = Get-WmiObject Win32_computersystem -EnableAllPrivileges
    if($c.AutomaticManagedPagefile){
        Write-Host disabling managed page file settings
        $c.AutomaticManagedPagefile = $false
        $c.Put() | Out-Null
    }

    $new_page_size=18000
    $CurrentPageFile = Get-WmiObject -Class Win32_PageFileSetting
    if($CurrentPageFile.InitialSize -ne $new_page_size){
        Write-Host "setting new page file size to $new_page_size"
        $CurrentPageFile.InitialSize=$new_page_size
        $CurrentPageFile.MaximumSize=$new_page_size
        $CurrentPageFile.Put() | Out-Null
    }

    Write-Host "new ------------ "
    Write-Host "system managed:" (Get-WmiObject -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile})
    Write-Host "page file size:" (gwmi Win32_PageFileUsage).AllocatedBaseSize
    Write-Host "InitialSize: "${CurrentPageFile}.InitialSize
    Write-Host "MaximumSize: "$CurrentPageFile.MaximumSize
} else {
    Write-Host not on AppVeyor, leaving page file as is
}

#list drives
Get-WmiObject -Class Win32_LogicalDisk |
    Where-Object {$_.DriveType -ne 5} |
    Sort-Object -Property Name | 
    Select-Object Name, VolumeName, FileSystem, Description, VolumeDirty, `
        @{"Label"="DiskSize(GB)";"Expression"={"{0:N}" -f ($_.Size/1GB) -as [float]}}, `
        @{"Label"="FreeSpace(GB)";"Expression"={"{0:N}" -f ($_.FreeSpace/1GB) -as [float]}}, `
        @{"Label"="%Free";"Expression"={"{0:N}" -f ($_.FreeSpace/$_.Size*100) -as [float]}} |
    Format-Table -AutoSize


{'fraction_non_alphanumeric': 0.13736741436271951, 'fraction_numerical': 0.014084507042253521, 'mean_word_length': 3.594249201277955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6793366', 'n_tokens_mistral': 1917, 'n_tokens_neox': 1827, 'n_words': 391}