<commit_before>﻿## Octopus Azure Context script, version 1.0
## --------------------------------------------------------------------------------------
## 
## This script is used to load the Azure Powershell module and select the Azure subscription
##
## The sript is passed the following parameters. 
##
##   $OctopusAzureModulePath = "....\Calamari\AzurePowershell\Azure.psd1"
##   $OctopusAzureCertificateFileName = "...."
##   $OctopusAzureCertificatePassword = "...."
##   $OctopusAzureSubscriptionId = "..."
##   $OctopusAzureSubscriptionName = "..."
##   $OctopusAzureTargetScript = "..."

Write-Verbose "Azure context parameters: "
Write-Verbose "  Subscription ID:       $OctopusAzureSubscriptionId"
Write-Verbose "  Subscription name:     $OctopusAzureSubscriptionName"

Write-Verbose "Importing Windows Azure modules"

Import-Module $OctopusAzureModulePath

if (!(Get-AzureSubscription -SubscriptionName $OctopusAzureSubscriptionName)) {
	Write-Verbose "Loading the management certificate"

	Add-Type -AssemblyName "System"
	$certificate = new-object System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList @($OctopusAzureCertificateFileName, $OctopusAzureCertificatePassword)
<commit_msg>Corrected issue with Azure powershell when loading subscription<commit_after>﻿## Octopus Azure Context script, version 1.0
## --------------------------------------------------------------------------------------
## 
## This script is used to load the Azure Powershell module and select the Azure subscription
##
## The sript is passed the following parameters. 
##
##   $OctopusAzureModulePath = "....\Calamari\AzurePowershell\Azure.psd1"
##   $OctopusAzureCertificateFileName = "...."
##   $OctopusAzureCertificatePassword = "...."
##   $OctopusAzureSubscriptionId = "..."
##   $OctopusAzureSubscriptionName = "..."
##   $OctopusAzureTargetScript = "..."

Write-Verbose "Azure context parameters: "
Write-Verbose "  Subscription ID:       $OctopusAzureSubscriptionId"
Write-Verbose "  Subscription name:     $OctopusAzureSubscriptionName"

Write-Verbose "Importing Windows Azure modules"

Import-Module $OctopusAzureModulePath

if (!(Get-AzureSubscription -SubscriptionName $OctopusAzureSubscriptionName -ErrorAction SilentlyContinue)) {
	Write-Verbose "Loading the management certificate"

	Add-Type -AssemblyName "System"
	$certificate = new-object System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList @($OctopusAzureCertificateFileName, $OctopusAzureCertificatePassword)

{'fraction_non_alphanumeric': 0.17261904761904762, 'fraction_numerical': 0.007936507936507936, 'mean_word_length': 3.6598890942698707, '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': '6332132', 'n_tokens_mistral': 692, 'n_tokens_neox': 655, 'n_words': 155}