<commit_before>import Foundation

class MHomeGiphyUrl
{
    
}<commit_msg>Factory random url<commit_after>import Foundation

class MHomeGiphyUrl
{
    private static let kKeyRoot:String = "giphy"
    private static let kKeyHost:String = "host"
    private static let kKeyRandom:String = "random"
    
    class func factoryRandom() -> URL?
    {
        guard
        
            let urlMap:[String:AnyObject] = MHome.factoryUrlMap(),
            let giphyRoot:[String:AnyObject] = urlMap[kKeyRoot] as? [String:AnyObject],
            let host:String = giphyRoot[kKeyHost] as? String,
            let random:String = giphyRoot[kKeyRandom] as? String
        
        else
        {
            return nil
        }
        
        let pathString:String = "\(host)\(random)"
        
        guard
        
            let url:URL = URL(string:pathString)
        
        else
        {
            return nil
        }
        
        return url
    }
}
{'fraction_non_alphanumeric': 0.08359456635318704, 'fraction_numerical': 0.0, 'mean_word_length': 1.7449856733524356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6329867', 'n_tokens_mistral': 281, 'n_tokens_neox': 277, 'n_words': 63}