<commit_before>// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Xunit;

namespace System
{
    public static class PlatformDetection
    {
        public static bool IsWindows { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
        public static bool IsWindows7 { get; } = IsWindows && GetWindowsVersion() == 6 && GetWindowsMinorVersion() == 1;
        public static bool IsOSX { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
        public static bool IsNetBSD { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"));
        public static bool IsNotWindowsNanoServer { get; } = (IsWindows && GetWindowsVersion() == 10 &&
                File.Exists(Path.Combine(Environment.GetEnvironmentVariable("windir"), "regedit.exe")));

        public static int WindowsVersion { get; } = GetWindowsVersion();

        public static bool IsUbuntu1510 { get; } = GetIsUbuntu1510();

        private static bool GetIsUbuntu1510()
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
            {<commit_msg>Fix nano server detection logic.<commit_after>// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Xunit;

namespace System
{
    public static class PlatformDetection
    {
        public static bool IsWindows { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
        public static bool IsWindows7 { get; } = IsWindows && GetWindowsVersion() == 6 && GetWindowsMinorVersion() == 1;
        public static bool IsOSX { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
        public static bool IsNetBSD { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"));
        public static bool IsNotWindowsNanoServer { get; } = (IsWindows &&
                File.Exists(Path.Combine(Environment.GetEnvironmentVariable("windir"), "regedit.exe")));

        public static int WindowsVersion { get; } = GetWindowsVersion();

        public static bool IsUbuntu1510 { get; } = GetIsUbuntu1510();

        private static bool GetIsUbuntu1510()
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
            {
{'fraction_non_alphanumeric': 0.09493192133131619, 'fraction_numerical': 0.012102874432677761, 'mean_word_length': 3.513651877133106, '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': '2484475', 'n_tokens_mistral': 719, 'n_tokens_neox': 669, 'n_words': 214}