<commit_before>//
//  MapViewController.swift
//  red-analyzer
//
//  Created by <NAME> on 31/10/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import UIKit
import MapKit

class MapViewController: UIViewController {
    
    @IBOutlet weak var mapView: MKMapView!
    var lattitude :Double?
    var longtitude :Double?

    override func viewDidLoad() {
        super.viewDidLoad()
        
        if let _ = lattitude {
            self.lattitude = 52.371567
        }
        
        if let _ = longtitude {
            self.longtitude = 4.910287
        }
        
        let initialLocation = CLLocation(latitude: lattitude!, longitude: longtitude!)
        centerMapOnLocation(initialLocation)

        let dropPin = MKPointAnnotation()
        dropPin.coordinate = CLLocationCoordinate2DMake(lattitude!, longtitude!)
        mapView.addAnnotation(dropPin)
        
        // Do any additional setup after loading the view.
    }
    
    let regionRadius: CLLocationDistance = 1000
    func centerMapOnLocation(location: CLLocation) {
        let coordinateRegion = MKCoordinateRegionMakeWithDistance(location.coordinate,
            regionRadius * 2.0, regionRadius * 2.0)
        mapView.setRegion(coordinateRegion, animated: true)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
<commit_msg>bug fix on no internet/ not loaded yet.<commit_after>//
//  MapViewController.swift
//  red-analyzer
//
//  Created by <NAME> on 31/10/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import UIKit
import MapKit

class MapViewController: UIViewController {
    
    @IBOutlet weak var mapView: MKMapView!
    var lattitude :Double?
    var longtitude :Double?

    override func viewDidLoad() {
        super.viewDidLoad()
                
        if (lattitude == nil) {
            self.lattitude = 52.371567
        }
        
        if (longtitude == nil) {
            self.longtitude = 4.910287
        }
        
        let initialLocation = CLLocation(latitude: lattitude!, longitude: longtitude!)
        centerMapOnLocation(initialLocation)

        let dropPin = MKPointAnnotation()
        dropPin.coordinate = CLLocationCoordinate2DMake(lattitude!, longtitude!)
        mapView.addAnnotation(dropPin)
        
        // Do any additional setup after loading the view.
    }
    
    let regionRadius: CLLocationDistance = 1000
    func centerMapOnLocation(location: CLLocation) {
        let coordinateRegion = MKCoordinateRegionMakeWithDistance(location.coordinate,
            regionRadius * 2.0, regionRadius * 2.0)
        mapView.setRegion(coordinateRegion, animated: true)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}

{'fraction_non_alphanumeric': 0.08032786885245902, 'fraction_numerical': 0.018579234972677595, 'mean_word_length': 2.3898148148148146, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2551387', 'n_tokens_mistral': 1079, 'n_tokens_neox': 990, 'n_words': 281}