<commit_before>app.controller('LeadListCtrl', ['$scope','$filter','Auth','Lead','Leadstatus','Tag','Edge',
    function($scope,$filter,Auth,Lead,Leadstatus,Tag,Edge) {
      $("ul.page-sidebar-menu li").removeClass("active");
      $("#id_Leads").addClass("active");

      document.title = "Leads: Home";
     $scope.isSignedIn = false;
     $scope.immediateFailed = false;
     $scope.nextPageToken = undefined;
     $scope.prevPageToken = undefined;
     $scope.isLoading = false;
     $scope.leadpagination = {};
     $scope.currentPage = 01;
     $scope.pages = [];
     $scope.selectedOption='all';
     $scope.stage_selected={};

      $scope.leads = [];
      $scope.lead = {};

      $scope.lead.access ='public';
      $scope.order = '-updated_at';
      $scope.status = 'New';
      $scope.selected_tags = [];
      $scope.draggedTag=null;
      $scope.tag = {};
      $scope.showNewTag=false;
      $scope.showUntag=false;
     $scope.edgekeytoDelete=undefined;
        $scope.color_pallet=[
         {'name':'red','color':'#F7846A'},
         {'name':'orange','color':'#FFBB22'},
         {'name':'yellow','color':'#EEEE22'},
         {'name':'green','color':'#BBE535'},
         {'name':'blue','color':'#66CCDD'},
         {'name':'gray','color':'#B5C5C5'},
         {'name':'teal','color':'#77DDBB'},
         {'name':'purple','color':'#E874D6'},
         ];
         $scope.tag.color= {'name':'green','color':'#BBE535'};
         if (chrome.app.isInstalled) {
                console.log('*************** YES *************');
                $scope.extensionInstalled = true;
                $scope.$apply();
          }else{
                console.log('NOOOOO');
                console.log(chrome.app);
                $scope.extensionInstalled = false;
          }

      // What to do after authentication
        $scope.runTheProcess = function(){
            var params = {'order' : $scope.order,'limit':20};
            Lead.list($scope,params);
            Leadstatus.list($scope,{});
            var paramsTag = {'about_kind':'Lead'};
          Tag.list($scope,paramsTag);
          // for (var i=0;i<100;i++)
          //   {
          //       var params = {
          //                 'firstname': 'Dja3fer',
          //                 'lastname':'M3amer ' + i.toString(),
          //                 'access':'public'
          //               }
          //       Lead.insert($scope,params);
          //   }

        };
      $scope.installChromeExtension = function(){
          chrome.webstore.install();
      }
      $scope.fromNow = function(fromDate){
          return moment(fromDate,"YYYY-MM-DD HH:mm Z").fromNow();
      }
       $scope.getPosition= function(index){
        if(index<4){

          return index+1;
        }else{

          return (index%4)+1;
        }
     };
        // We need to call this to refresh token when user credentials are invalid
       $scope.refreshToken = function() {
            Auth.refreshToken();
       };
     $scope.listNextPageItems = function(){


        var nextPage = $scope.currentPage + 1;
        var params = {};
          if ($scope.pages[nextPage]){
            params = {'order' : $scope.order,'limit':6,<commit_msg>delete install chrome extension from leadcontroller<commit_after>app.controller('LeadListCtrl', ['$scope','$filter','Auth','Lead','Leadstatus','Tag','Edge',
    function($scope,$filter,Auth,Lead,Leadstatus,Tag,Edge) {
      $("ul.page-sidebar-menu li").removeClass("active");
      $("#id_Leads").addClass("active");

      document.title = "Leads: Home";
     $scope.isSignedIn = false;
     $scope.immediateFailed = false;
     $scope.nextPageToken = undefined;
     $scope.prevPageToken = undefined;
     $scope.isLoading = false;
     $scope.leadpagination = {};
     $scope.currentPage = 01;
     $scope.pages = [];
     $scope.selectedOption='all';
     $scope.stage_selected={};

      $scope.leads = [];
      $scope.lead = {};

      $scope.lead.access ='public';
      $scope.order = '-updated_at';
      $scope.status = 'New';
      $scope.selected_tags = [];
      $scope.draggedTag=null;
      $scope.tag = {};
      $scope.showNewTag=false;
      $scope.showUntag=false;
     $scope.edgekeytoDelete=undefined;
        $scope.color_pallet=[
         {'name':'red','color':'#F7846A'},
         {'name':'orange','color':'#FFBB22'},
         {'name':'yellow','color':'#EEEE22'},
         {'name':'green','color':'#BBE535'},
         {'name':'blue','color':'#66CCDD'},
         {'name':'gray','color':'#B5C5C5'},
         {'name':'teal','color':'#77DDBB'},
         {'name':'purple','color':'#E874D6'},
         ];
         $scope.tag.color= {'name':'green','color':'#BBE535'};


      // What to do after authentication
        $scope.runTheProcess = function(){
            var params = {'order' : $scope.order,'limit':20};
            Lead.list($scope,params);
            Leadstatus.list($scope,{});
            var paramsTag = {'about_kind':'Lead'};
          Tag.list($scope,paramsTag);
          // for (var i=0;i<100;i++)
          //   {
          //       var params = {
          //                 'firstname': 'Dja3fer',
          //                 'lastname':'M3amer ' + i.toString(),
          //                 'access':'public'
          //               }
          //       Lead.insert($scope,params);
          //   }

        };
      
      $scope.fromNow = function(fromDate){
          return moment(fromDate,"YYYY-MM-DD HH:mm Z").fromNow();
      }
       $scope.getPosition= function(index){
        if(index<4){

          return index+1;
        }else{

          return (index%4)+1;
        }
     };
        // We need to call this to refresh token when user credentials are invalid
       $scope.refreshToken = function() {
            Auth.refreshToken();
       };
     $scope.listNextPageItems = function(){


        var nextPage = $scope.currentPage + 1;
        var params = {};
          if ($scope.pages[nextPage]){
            params = {'order' : $scope.order,'limit':6,
{'fraction_non_alphanumeric': 0.18761384335154827, 'fraction_numerical': 0.013578407021029972, 'mean_word_length': 2.0275689223057642, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '4548810', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1773, 'n_words': 261}