<commit_before>angular.module("mirmindr")
.controller("tasksCtrl",function($scope,$mdToast,$mdDialog,$firebaseArray){
  var ref = new Firebase("https://mirmindr.firebaseio.com");
  var authData = ref.getAuth();
  function setUserRef(uid){
    $scope.userRef = ref.child("users").child(uid);
    $scope.authenticated = true;
    $scope.tasks = $firebaseArray($scope.userRef.child("tasks"));
    $scope.subjects = $firebaseArray($scope.userRef.child("subjects"));
  }
  if (authData) {
    console.log("Authenticated");
    setUserRef(authData.uid);
  }
  $scope.user = {
    email: "",
    password: ""
  };

  $scope.toggleSubjects = function() {
    $scope.editingSubjects = $scope.editingSubjects ? false : true;
    // If editingSubjects is true, make it false. Or vice versa
  };

  $scope.toggleAddingTask = function() {
    $scope.addingTask = $scope.addingTask ? false : true;
    // If addingTask is true, make it false. Or vice versa
  };

  $scope.deleteTask = function(task) {
    $scope.tasks.$remove(task);
    // Remove task from $scope.tasks
  };
  $scope.editTask = function(task,form)
  {
    if(form.$valid) {
      console.log($scope.task);
      $scope.task.dueDate = $scope.newTask.dueDate.getTime();
      $scope.task.done = false;
      $scope.newTask = {};
      $scope.addingTask = false;
    } else {
      $scope.showActionToast("Missing something?")
    }
  };
  $scope.toggleDone = function(task) {
    // Mark task as done
    task.done = task.done ? false: true;

    // Alert with a toast
    $scope.showActionToast("'" + task.name + "' has been marked as done");

    // Save the tasks array
    $scope.tasks.$save(task);
  };

  $scope.isOverdue = function(task) {
    // Return true if the task's dueDate is older than now.
  };

  $scope.newTask = {};
  chrome.identity.getProfileUserInfo(function(data){
    if(data.email) {
      console.log("Email found");
      $scope.user.email = data.email;<commit_msg>Overdue Function in Progress<commit_after>angular.module("mirmindr")
.controller("tasksCtrl",function($scope,$mdToast,$mdDialog,$firebaseArray){
  var ref = new Firebase("https://mirmindr.firebaseio.com");
  var authData = ref.getAuth();
  function setUserRef(uid){
    $scope.userRef = ref.child("users").child(uid);
    $scope.authenticated = true;
    $scope.tasks = $firebaseArray($scope.userRef.child("tasks"));
    $scope.subjects = $firebaseArray($scope.userRef.child("subjects"));
  }
  if (authData) {
    console.log("Authenticated");
    setUserRef(authData.uid);
  }
  $scope.user = {
    email: "",
    password: ""
  };

  $scope.toggleSubjects = function() {
    $scope.editingSubjects = $scope.editingSubjects ? false : true;
    // If editingSubjects is true, make it false. Or vice versa
  };

  $scope.toggleAddingTask = function() {
    $scope.addingTask = $scope.addingTask ? false : true;
    // If addingTask is true, make it false. Or vice versa
  };

  $scope.deleteTask = function(task) {
    $scope.tasks.$remove(task);
    // Remove task from $scope.tasks
  };
  $scope.editTask = function(task,form)
  {
    if(form.$valid) {
      console.log($scope.task);
      $scope.task.dueDate = $scope.newTask.dueDate.getTime();
      $scope.task.done = false;
      $scope.newTask = {};
      $scope.addingTask = false;
    } else {
      $scope.showActionToast("Missing something?")
    }
  };
  $scope.toggleDone = function(task) {
    // Mark task as done
    task.done = task.done ? false: true;

    // Alert with a toast
    $scope.showActionToast("'" + task.name + "' has been marked as done");

    // Save the tasks array
    $scope.tasks.$save(task);
  };

  $scope.isOverdue = function(task) {
    //Return true if current date is past dueDate
  };

  $scope.newTask = {};
  chrome.identity.getProfileUserInfo(function(data){
    if(data.email) {
      console.log("Email found");
      $scope.user.email = data.email;
{'fraction_non_alphanumeric': 0.15866495507060333, 'fraction_numerical': 0.0, 'mean_word_length': 3.1982758620689653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1327313', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1269, 'n_words': 248}