<commit_before><#
#>

function Eject-Drive  # {{{
{
<# {{{2
  .SYNOPSIS
    Eject the current CD-ROM from the given Drive
  .PARAMETER DriveLetter
    The drive letter to eject.
    Mandatory, no default.
  .EXAMPLE
    Eject-Drive D
  .EXAMPLE
    Eject-Drive -DriveLetter D
#> # }}}2
  [CmdletBinding()] 
  Param(
    [Parameter(Mandatory=$true)][string] $DriveLetter
  )
  $shellapp = new-object -com Shell.Application
  $shellapp.Namespace(17).ParseName("${DriveLetter}:").InvokeVerb("Eject")
  [System.Runtime.Interopservices.Marshal]::ReleaseComObject($shellapp)
  Remove-Variable shellapp
} # }}}

if ($env:PACKER_BUILDER_TYPE -match 'vmware')
{
  $image  = $null
  $volume = Get-Volume | where FileSystemLabel -match 'VMWare Tools'
  if ($volume)
  {
    $drive=$volume.DriveLetter
    Write-Output "Found VMWare Tools mounted on ${drive}:"
  }
  else
  {
    $iso_path = Join-Path $env:HOME "windows.iso"
    if (Test-Path $iso_path)
    {
      Write-Host "Mounting ISO $iso_path"<commit_msg>There is no HOME on Windows...<commit_after><#
#>

function Eject-Drive  # {{{
{
<# {{{2
  .SYNOPSIS
    Eject the current CD-ROM from the given Drive
  .PARAMETER DriveLetter
    The drive letter to eject.
    Mandatory, no default.
  .EXAMPLE
    Eject-Drive D
  .EXAMPLE
    Eject-Drive -DriveLetter D
#> # }}}2
  [CmdletBinding()] 
  Param(
    [Parameter(Mandatory=$true)][string] $DriveLetter
  )
  $shellapp = new-object -com Shell.Application
  $shellapp.Namespace(17).ParseName("${DriveLetter}:").InvokeVerb("Eject")
  [System.Runtime.Interopservices.Marshal]::ReleaseComObject($shellapp)
  Remove-Variable shellapp
} # }}}

if ($env:PACKER_BUILDER_TYPE -match 'vmware')
{
  $image  = $null
  $volume = Get-Volume | where FileSystemLabel -match 'VMWare Tools'
  if ($volume)
  {
    $drive=$volume.DriveLetter
    Write-Output "Found VMWare Tools mounted on ${drive}:"
  }
  else
  {
    $iso_path = Join-Path $env:USERPROFILE "windows.iso"
    if (Test-Path $iso_path)
    {
      Write-Host "Mounting ISO $iso_path"
{'fraction_non_alphanumeric': 0.14053254437869822, 'fraction_numerical': 0.0039447731755424065, 'mean_word_length': 3.539149888143177, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2747610', 'n_tokens_mistral': 748, 'n_tokens_neox': 724, 'n_words': 160}