<commit_before>//
//  AppAnalytic.swift
//  Pods
//
//  Created by <NAME> on 2016-06-19.
//
//

import Foundation

public class AppAnalytics{
    
    private let _accessKey: String
    private var _APIURL = "http://appanalytics.ir/api/v1/iosservice/initialize/";
    private let _UUID: String
    
    //MARK: submitCampain Function
    public func submitCampaign(){
        let url = NSURL(string: self._APIURL + self._UUID)
        let request = NSMutableURLRequest(URL: url!)
        
        request.setValue(self._accessKey, forHTTPHeaderField: "Access-Key")
        
        NSURLSession.sharedSession().dataTaskWithRequest(request) { (data: NSData?, response: NSURLResponse?, error: NSError?) in
            if let data = data {
                print("AppAnalytic Info: [", String(data: data, encoding: NSUTF8StringEncoding),"]")
            }
            if let error = error {
                print("AppAnalytic Error: [\(error.localizedDescription)")
            }
            }.resume()
    }
    
    //MARK: Init
    public init(accessKey key: String){
        self._accessKey = key
        if let id = UIDevice.currentDevice().identifierForVendor {
            self._UUID = id.UUIDString
        } else {
            self._UUID = "error"
        }
    }
}<commit_msg>remove optional log info<commit_after>//
//  AppAnalytic.swift
//  Pods
//
//  Created by <NAME> on 2016-06-19.
//
//

import Foundation

public class AppAnalytics{
    
    private let _accessKey: String
    private var _APIURL = "http://appanalytics.ir/api/v1/iosservice/initialize/";
    private let _UUID: String
    
    //MARK: submitCampain Function
    public func submitCampaign(){
        let url = NSURL(string: self._APIURL + self._UUID)
        let request = NSMutableURLRequest(URL: url!)
        
        request.setValue(self._accessKey, forHTTPHeaderField: "Access-Key")
        
        NSURLSession.sharedSession().dataTaskWithRequest(request) { (data: NSData?, response: NSURLResponse?, error: NSError?) in
            if let data = data {
                print("AppAnalytic Info: [", String(data: data, encoding: NSUTF8StringEncoding)!,"]")
            }
            if let error = error {
                print("AppAnalytic Error: [\(error.localizedDescription)")
            }
            }.resume()
    }
    
    //MARK: Init
    public init(accessKey key: String){
        self._accessKey = key
        if let id = UIDevice.currentDevice().identifierForVendor {
            self._UUID = id.UUIDString
        } else {
            self._UUID = "error"
        }
    }
}
{'fraction_non_alphanumeric': 0.11451863354037267, 'fraction_numerical': 0.007763975155279503, 'mean_word_length': 2.097355769230769, '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': '4882152', 'n_tokens_mistral': 774, 'n_tokens_neox': 755, 'n_words': 175}