<commit_before>// The MIT License (MIT)
//
// Copyright (c) 2016 <NAME> (github.com/kean).

import Foundation

#if os(macOS)
    import AppKit.NSImage
    /// Alias for NSImage
    public typealias Image = NSImage
#else
    import UIKit.UIImage
    /// Alias for UIImage
    public typealias Image = UIImage
#endif

/// Asynchronously fulfills the request into the given target.
///
/// For more info see `loadImage(with:into:)` method of `Manager` class.
public func loadImage(with url: URL, into target: Target) {
    Manager.shared.loadImage(with: url, into: target)
}

/// Asynchronously fulfills the request into the given target.
///
/// For more info see `loadImage(with:into:)` method of `Manager` class.
public func loadImage(with request: Request, into target: Target) {
    Manager.shared.loadImage(with: request, into: target)
}

public extension Manager {
    /// Shared `Manager` instance.
    ///
    /// Shared manager is created with `Loader.shared` and `Cache.shared`.
    public static var shared = Manager(loader: Loader.shared, cache: Cache.shared)
}

public extension Loader {
    /// Shared `Loading` object.
    ///
    /// Shared loader is created with `DataLoader()`, `DataDecoder()` and
    // `Cache.shared`. The resulting loader is wrapped in a `Deduplicator`.
    public static var shared: Loading = Deduplicator(loader: Loader(loader: DataLoader(), decoder: DataDecoder(), cache: Cache.shared))
}

public extension Cache {
    /// Shared `Cache` instance.
    public static var shared = Cache()
}
<commit_msg>Add convenience global loadImage(with:into:handler:) function<commit_after>// The MIT License (MIT)
//
// Copyright (c) 2016 <NAME> (github.com/kean).

import Foundation

#if os(macOS)
    import AppKit.NSImage
    /// Alias for NSImage
    public typealias Image = NSImage
#else
    import UIKit.UIImage
    /// Alias for UIImage
    public typealias Image = UIImage
#endif

/// Asynchronously fulfills the request into the given target.
///
/// For more info see `loadImage(with:into:)` method of `Manager`.
public func loadImage(with url: URL, into target: Target) {
    Manager.shared.loadImage(with: url, into: target)
}

/// Asynchronously fulfills the request into the given target.
///
/// For more info see `loadImage(with:into:)` method of `Manager`.
public func loadImage(with request: Request, into target: Target) {
    Manager.shared.loadImage(with: request, into: target)
}

/// Asynchronously fulfills the request into the given target and calls
/// the given `handler`.
///
/// For more info see `loadImage(with:into:handler:)` method of `Manager`.
public func loadImage(with request: Request, into target: AnyObject, handler: @escaping Manager.Handler) {
    Manager.shared.loadImage(with: request, into: target, handler: handler)
}

public extension Manager {
    /// Shared `Manager` instance.
    ///
    /// Shared manager is created with `Loader.shared` and `Cache.shared`.
    public static var shared = Manager(loader: Loader.shared, cache: Cache.shared)
}

public extension Loader {
    /// Shared `Loading` object.
    ///
    /// Shared loader is created with `DataLoader()`, `DataDecoder()` and
    // `Cache.shared`. The resulting loader is wrapped in a `Deduplicator`.
    public static var shared: Loading = Deduplicator(loader: Loader(loader: DataLoader(), decoder: DataDecoder(), cache: Cache.shared))
}

public extension Cache {
    /// Shared `Cache` instance.
    public static var shared = Cache()
}

{'fraction_non_alphanumeric': 0.12363427257044278, 'fraction_numerical': 0.0023001725129384704, 'mean_word_length': 3.4774774774774775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6392371', 'n_tokens_mistral': 1016, 'n_tokens_neox': 979, 'n_words': 360}