<commit_before>//
//  AUReachability.swift
//  AppUtility
//
//  Created by <NAME> on 22/08/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import SystemConfiguration

open class AUReachability:NSObject {
    open static let sharedInstance = AUReachability()
    fileprivate override init() {}
    
    // whether the network is reachable or not
    open func isNetworkReachable()-> Bool{
        var zeroAddress = sockaddr_in()
        zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
        zeroAddress.sin_family = sa_family_t(AF_INET)
        
        guard let defaultRouteReachability = withUnsafePointer(to: &zeroAddress, {
            $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {
                SCNetworkReachabilityCreateWithAddress(nil, $0)
            }<commit_msg>Access specifier updated from open to public<commit_after>//
//  AUReachability.swift
//  AppUtility
//
//  Created by <NAME> on 22/08/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import SystemConfiguration

open class AUReachability:NSObject {
    public static let sharedInstance = AUReachability()
    fileprivate override init() {}
    
    // whether the network is reachable or not
    open func isNetworkReachable()-> Bool{
        var zeroAddress = sockaddr_in()
        zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
        zeroAddress.sin_family = sa_family_t(AF_INET)
        
        guard let defaultRouteReachability = withUnsafePointer(to: &zeroAddress, {
            $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {
                SCNetworkReachabilityCreateWithAddress(nil, $0)
            }
{'fraction_non_alphanumeric': 0.09266862170087976, 'fraction_numerical': 0.016422287390029325, 'mean_word_length': 2.9582366589327145, 'pattern_counts': {'":': 0, '<': 7, '<?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': '221080', 'n_tokens_mistral': 514, 'n_tokens_neox': 490, 'n_words': 126}