<commit_before>import-module au

$domain   = 'https://github.com'
$releases = "$domain/rg3/youtube-dl/releases/latest"

function global:au_SearchReplace {
  @{
    ".\tools\chocolateyInstall.ps1" = @{
      "(^[$]url\s*=\s*)('.*')"      = "`$1'$($Latest.URL32)'"
      "(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
      "(^[$]checksumType\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'"
        }
    }
}

function global:au_GetLatest {
  $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases

  $re    = '\.exe$'
  $url   = $domain + ($download_page.Links | ? href -match $re | select -First 1 -expand href)
  $filename = $url.Substring($url.LastIndexOf('/') + 1);
  $version  = $url -split '\/' | select -skip 1 -last 1;

  $checksumAsset = $domain + ($download_page.Links | ? href -match "SHA2\-512SUMS$" | select -first 1 -expand href)
  $checksum_page = Invoke-WebRequest -UseBasicParsing -Uri $checksumAsset;
  $checksum = [regex]::Match($checksum_page, "([a-f\d]+)\s*$([regex]::Escape($filename))").Groups[1].Value;<commit_msg>removed usebasicparsing<commit_after>import-module au

$domain   = 'https://github.com'
$releases = "$domain/rg3/youtube-dl/releases/latest"

function global:au_SearchReplace {
  @{
    ".\tools\chocolateyInstall.ps1" = @{
      "(^[$]url\s*=\s*)('.*')"      = "`$1'$($Latest.URL32)'"
      "(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
      "(^[$]checksumType\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'"
        }
    }
}

function global:au_GetLatest {
  $download_page = Invoke-WebRequest -Uri $releases

  $re    = '\.exe$'
  $url   = $domain + ($download_page.Links | ? href -match $re | select -First 1 -expand href)
  $filename = $url.Substring($url.LastIndexOf('/') + 1);
  $version  = $url -split '\/' | select -skip 1 -last 1;

  $checksumAsset = $domain + ($download_page.Links | ? href -match "SHA2\-512SUMS$" | select -first 1 -expand href)
  $checksum_page = Invoke-WebRequest -UseBasicParsing -Uri $checksumAsset;
  $checksum = [regex]::Match($checksum_page, "([a-f\d]+)\s*$([regex]::Escape($filename))").Groups[1].Value;
{'fraction_non_alphanumeric': 0.23504474799811587, 'fraction_numerical': 0.019783325482807347, 'mean_word_length': 3.7837837837837838, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '903533', 'n_tokens_mistral': 852, 'n_tokens_neox': 811, 'n_words': 129}