<commit_before>import Foundation
import CoreGraphics

/// Protocol that may be used to constraint a generic to numeric types
public protocol Number {
    /// Initialize an instance with another Number
    init(_ number: Number)
    /// Initialize an instance with a double value
    init(_ double: Double)
    /// Convert the instance into a double value
    func toDouble() -> Double
}

/// Addition support for Number types
public func +<T: Number>(lhs: T, rhs: T) -> T {
    return T(lhs.toDouble() + rhs.toDouble())
}

/// Postfix increment support for Number types
public postfix func ++<T: Number>(inout number: T) -> T {
    number = T(number.toDouble() + 1)
    return number
}

/// Postfix decrement support for Number types
public postfix func --<T: Number>(inout number: T) -> T {
    number = T(number.toDouble() - 1)
    return number
}

/// Extension that makes Int conform to Number
extension Int: Number {
    public init(_ number: Number) {
        self.init(number.toDouble())
    }
    
    public init(double: Double) {
        self.init(double)
    }
    
    public func toDouble() -> Double {
        return Double(self)
    }
}

/// Extension that makes UInt32 conform to Number
extension UInt32: Number {
    public init(_ number: Number) {
        self.init(number.toDouble())<commit_msg>Number: Remove unnecessary double-based initializer from Int<commit_after>import Foundation
import CoreGraphics

/// Protocol that may be used to constraint a generic to numeric types
public protocol Number {
    /// Initialize an instance with another Number
    init(_ number: Number)
    /// Initialize an instance with a double value
    init(_ double: Double)
    /// Convert the instance into a double value
    func toDouble() -> Double
}

/// Addition support for Number types
public func +<T: Number>(lhs: T, rhs: T) -> T {
    return T(lhs.toDouble() + rhs.toDouble())
}

/// Postfix increment support for Number types
public postfix func ++<T: Number>(inout number: T) -> T {
    number = T(number.toDouble() + 1)
    return number
}

/// Postfix decrement support for Number types
public postfix func --<T: Number>(inout number: T) -> T {
    number = T(number.toDouble() - 1)
    return number
}

/// Extension that makes Int conform to Number
extension Int: Number {
    public init(_ number: Number) {
        self.init(number.toDouble())
    }
    
    public func toDouble() -> Double {
        return Double(self)
    }
}

/// Extension that makes UInt32 conform to Number
extension UInt32: Number {
    public init(_ number: Number) {
        self.init(number.toDouble())
{'fraction_non_alphanumeric': 0.10829493087557604, 'fraction_numerical': 0.004608294930875576, 'mean_word_length': 2.9231927710843375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '1158437', 'n_tokens_mistral': 732, 'n_tokens_neox': 719, 'n_words': 285}