<commit_before>//
//  Config.swift
//  Theo
//
//  Created by <NAME> on 9/21/14.
//  Copyright (c) 2014 Theo. All rights reserved.
//

import Foundation


struct Config {
    let username: String
    let password: String
    let host: String
    
    init(pathToFile: String) {

        let jsonData: NSData = NSData(contentsOfFile: pathToFile)!
        var jsonError: NSError?
        let JSON: AnyObject? = NSJSONSerialization.JSONObjectWithData(jsonData, options: NSJSONReadingOptions(0), error: &jsonError) as AnyObject!
        let jsonConfig: [String:String]! = JSON as [String:String]
        
        self.username = jsonConfig["username"]!
        self.password = jsonConfig["password"]!
        self.host     = jsonConfig["host"]!
    }
}<commit_msg>downcasting based on Swift 1.2 changes<commit_after>//
//  Config.swift
//  Theo
//
//  Created by <NAME> on 9/21/14.
//  Copyright (c) 2014 Theo. All rights reserved.
//

import Foundation


struct Config {
    let username: String
    let password: String
    let host: String
    
    init(pathToFile: String) {

        let jsonData: NSData = NSData(contentsOfFile: pathToFile)!
        var jsonError: NSError?
        let JSON: AnyObject? = NSJSONSerialization.JSONObjectWithData(jsonData, options: NSJSONReadingOptions(0), error: &jsonError) as AnyObject!
        let jsonConfig: [String:String]! = JSON as! [String:String]
        
        self.username = jsonConfig["username"]!
        self.password = jsonConfig["password"]!
        self.host     = jsonConfig["host"]!
    }
}
{'fraction_non_alphanumeric': 0.11642949547218628, 'fraction_numerical': 0.014230271668822769, 'mean_word_length': 2.78239608801956, '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': '6324784', 'n_tokens_mistral': 495, 'n_tokens_neox': 464, 'n_words': 125}