<commit_before>//
//  CGPoint+KDTreeGrowing.swift
//  Pods
//
//  Created by <NAME> on 28/03/16.
//
//

import Foundation

extension CGPoint: KDTreePoint {
    public static var dimensions = 2
    
    public func kdDimension(_ dimension: Int) -> Double {
        return dimension == 0 ? Double(self.x) : Double(self.y)
    }

    public func squaredDistance(to otherPoint: CGPoint) -> Double {
        let x = self.x - otherPoint.x
        let y = self.y - otherPoint.y
        return Double(x*x + y*y)
    }
}<commit_msg>Only provide CGPoint instance for mac/ios<commit_after>//
//  CGPoint+KDTreeGrowing.swift
//  Pods
//
//  Created by <NAME> on 28/03/16.
//
//

import Foundation
#if os(iOS)
    import CoreGraphics
#elseif os(macOS)
    import CoreGraphics
#endif

#if os(iOS) || os(macOS)
extension CGPoint: KDTreePoint {
    public static var dimensions = 2
    
    public func kdDimension(_ dimension: Int) -> Double {
        return dimension == 0 ? Double(self.x) : Double(self.y)
    }

    public func squaredDistance(to otherPoint: CGPoint) -> Double {
        let x = self.x - otherPoint.x
        let y = self.y - otherPoint.y
        return Double(x*x + y*y)
    }
}
#endif
{'fraction_non_alphanumeric': 0.12258606213266163, 'fraction_numerical': 0.01343408900083963, 'mean_word_length': 2.435158501440922, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '2742174', 'n_tokens_mistral': 426, 'n_tokens_neox': 394, 'n_words': 110}