<commit_before>app.directive('profilePublicprofile', [
  "settings",
  "User",
  "$routeParams",
  function(
    settings,
    User,
    $routeParams ) {
    return {
      templateUrl: settings.widgets + 'profile/publicprofile.html',
      link: function($scope, element, attrs) {
        User.get({ public_url: $routeParams.url, _populate:"courses"}, function(res){
          var data = res[0];
          if(data != false) {
            $scope.first_name = data.first_name;
            $scope.profile_pic = data.profile_pic;
            $scope.last_name = data.last_name;
            $scope.email = data.email;
            $scope.phone_number = data.phone_number;
            $scope.url = data.public_url;
            $scope.description = data.description;
            $scope.homepage = data.homepage;
            $scope.linkedin = data.linkedin;
            $scope.facebook = data.facebook;
            $scope.twitter = data.twitter;
            $scope.github = data.github;
            $scope.user = data;
            $scope.role = data.role;
            $scope.personality = data.personality;
            $scope.courses = data.courses;
          }else {
              $scope.first_name = "No profile found";
          }
        }); 

        showPicture = function(){
            var pic = ""
            if($scope.profile_pic === undefined || $scope.profile_pic === ""){
              pic = "/img/profile_default.png";
            }else{
              pic = './uploads/' + $scope.profile_pic;
            }

            $('.profile__about__img').css({
              'background' : 'url('+ pic + ')',
              '-webkit-background-size': 'contain',
              '-moz-background-size': 'contain',
              '-o-background-size': 'contain',
              'background-size': 'contain'      
            })
        }

      
      showPicture();


      } <commit_msg>small fix<commit_after>app.directive('profilePublicprofile', [
  "settings",
  "User",
  "$routeParams",
  function(
    settings,
    User,
    $routeParams ) {
    return {
      templateUrl: settings.widgets + 'profile/publicprofile.html',
      link: function($scope, element, attrs) {

        showPicture = function(){
            var pic = ""
            if($scope.profile_pic === undefined || $scope.profile_pic === ""){
              pic = "/img/profile_default.png";
            }else{
              pic = './uploads/' + $scope.profile_pic;
            }

            $('.profile__about__img').css({
              'background' : 'url('+ pic + ')',
              '-webkit-background-size': 'contain',
              '-moz-background-size': 'contain',
              '-o-background-size': 'contain',
              'background-size': 'contain'      
            })
        }

        User.get({ public_url: $routeParams.url, _populate:"courses"}, function(res){
          var data = res[0];

          if(data != false) {
            $scope.first_name = data.first_name;
            $scope.profile_pic = data.profile_pic;
            $scope.last_name = data.last_name;
            $scope.email = data.email;
            $scope.phone_number = data.phone_number;
            $scope.url = data.public_url;
            $scope.description = data.description;
            $scope.homepage = data.homepage;
            $scope.linkedin = data.linkedin;
            $scope.facebook = data.facebook;
            $scope.twitter = data.twitter;
            $scope.github = data.github;
            $scope.user = data;
            $scope.role = data.role;
            $scope.personality = data.personality;
            $scope.courses = data.courses;
          }else {
              $scope.first_name = "No profile found";
          }
            showPicture();

        }); 
      } 
{'fraction_non_alphanumeric': 0.13908872901678657, 'fraction_numerical': 0.0005329070077271516, 'mean_word_length': 1.645525017618041, 'pattern_counts': {'":': 0, '<': 3, '<?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': '350031', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1044, 'n_words': 179}