<commit_before>//
// Display.swift
// Thingy
//
// Created by <NAME> on 7/18/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.


import Foundation
import UIKit

/// A struct that provides an extended info on the display.

public struct Display {

	/// An enum that describes the display size in inches.
	public enum Size: Float {
		/// - screen1_32Inch: Small Apple Watch screen.
		case screen1_32Inch = 1.32

		/// - screen1_5Inch: Big Apple Watch screen.
		case screen1_5Inch = 1.5

		/// - screen3_5Inch: 3.5in iPhone screen.
		case screen3_5Inch = 3.5

		/// - screen4Inch: 4in iPhone/iPod touch screen.
		case screen4Inch = 4

		/// - screen4_7Inch: 4.7in iPhone screen.
		case screen4_7Inch = 4.7

		/// - screen5_5Inch: 5.5in iPhone screen.
		case screen5_5Inch = 5.5

		/// - screen5_8Inch: 5.8in iPhone screen.
		case screen5_8Inch = 5.8

		/// - screen7_9Inch: 7.9in iPad screen.
		case screen7_9Inch = 7.9

		/// - screen9_7Inch: 9.7in iPad screen.
		case screen9_7Inch = 9.7

		/// - screen10_5Inch: 10.5in iPad screen.
		case screen10_5Inch = 10.5

		/// - screen12_9Inch: 12.9in iPad screen.
		case screen12_9Inch = 12.9

		/// - notApplicable: Not applicable, in case of the Apple TV.
		case notApplicable = -1
	}

	/// An enum that describes all color spaces.
	public enum ColorSpace {
		/// - Wide color display (P3)
		case p3

		/// - Full sRGB standard
		case sRGB
	}

	/// Screen size in inches.
	public var size: Size

	/// Resolution of the device.
	public var resolution: CGSize

	/// Full physical resolution of the device, without any down-/up-sampling.
	public var physicalResolution: CGSize

	/// Rendered resolution of the device, with down-/up-sampling.
	public var renderedResolution: CGSize

	/// Screen scale, 1.0 for non-Retina devices.
	public var scale: Float

	/// Density of the display in PPI (pixels-per-inch).
	public var density: Int

	/// True Tone display.
	public var hasTrueTone: Bool

	/// Color space.
	public var colorSpace: ColorSpace
}

// MARK: - Screen size comparison

extension Display.Size: Comparable {
	public static func <(lhs: Display.Size, rhs: Display.Size) -> Bool {
		return lhs.rawValue < rhs.rawValue
	}

	public static func ==(lhs: Display.Size, rhs: Display.Size) -> Bool {
		return lhs.rawValue == rhs.rawValue
	}
}<commit_msg>Extend the display sizes enum.<commit_after>//
// Display.swift
// Thingy
//
// Created by <NAME> on 7/18/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
import UIKit

/// A struct that provides an extended info on the display.

public struct Display {

	/// An enum that describes the display size in inches.
	public enum Size: Float {

		/// - screen38mm: 38mm Apple Watch screen.
		case screen38mm = 38

		/// - screen42mm: 42mm Apple Watch screen.
		case screen42mm = 42

		/// - screen40mm: 40mm Apple Watch screen.
		case screen40mm = 40

		/// - screen44mm: 44mm Apple Watch screen.
		case screen44mm = 44

		/// - screen3_5Inch: 3.5in iPhone screen.
		case screen3_5Inch = 3.5

		/// - screen4Inch: 4in iPhone/iPod touch screen.
		case screen4Inch = 4

		/// - screen4_7Inch: 4.7in iPhone screen.
		case screen4_7Inch = 4.7

		/// - screen5_5Inch: 5.5in iPhone screen.
		case screen5_5Inch = 5.5

		/// - screen5_8Inch: 5.8in iPhone screen.
		case screen5_8Inch = 5.8

		/// - screen6_1Inch: 6.1in iPhone screen.
		case screen6_1Inch = 6.1

		/// - screen6_5Inch: 6.5in iPhone screen.
		case screen6_5Inch = 6.5

		/// - screen7_9Inch: 7.9in iPad screen.
		case screen7_9Inch = 7.9

		/// - screen9_7Inch: 9.7in iPad screen.
		case screen9_7Inch = 9.7

		/// - screen10_5Inch: 10.5in iPad screen.
		case screen10_5Inch = 10.5

		/// - screen10_5Inch: 10.5in iPad screen.
		case screen11Inch = 11

		/// - screen12_9Inch: 12.9in iPad screen.
		case screen12_9Inch = 12.9

		/// - notApplicable: Not applicable, in case of the Apple TV.
		case notApplicable = -1
	}

	/// An enum that describes all color spaces.
	public enum ColorSpace {
		/// - Wide color display (P3)
		case p3

		/// - Full sRGB standard
		case sRGB
	}

	/// Screen size in inches.
	public var size: Size

	/// Resolution of the device.
	public var resolution: CGSize

	/// Full physical resolution of the device, without any down-/up-sampling.
	public var physicalResolution: CGSize

	/// Rendered resolution of the device, with down-/up-sampling.
	public var renderedResolution: CGSize

	/// Screen scale, 1.0 for non-Retina devices.
	public var scale: Float

	/// Density of the display in PPI (pixels-per-inch).
	public var density: Int

	/// True Tone display.
	public var hasTrueTone: Bool

	/// Color space.
	public var colorSpace: ColorSpace

}

// MARK: - Screen size comparison

extension Display.Size: Comparable {
	public static func <(lhs: Display.Size, rhs: Display.Size) -> Bool {
		return lhs.rawValue < rhs.rawValue
	}

	public static func ==(lhs: Display.Size, rhs: Display.Size) -> Bool {
		return lhs.rawValue == rhs.rawValue
	}
}
{'fraction_non_alphanumeric': 0.0967741935483871, 'fraction_numerical': 0.035638822369347796, 'mean_word_length': 2.948832035595106, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2090790', 'n_tokens_mistral': 2452, 'n_tokens_neox': 2158, 'n_words': 887}