<commit_before>(function() {
  'use strict';
  var module = angular.module('restaurantAdminViewControllers', [
    'ngResource'
  ]);

  module.controller('RestaurantAdminViewCtrl', ['$scope', '$resource',
    function($scope, $resource) {
      $scope.restaurant = $resource('api/v1/restaurants/me').get();
    }
  ]);

  module.controller('RestaurantOfferListCtrl', ['$scope', '$resource',
    function($scope, $resource) {
      $scope.offers = $resource('api/v1/restaurants/me/offers').query();
    }
  ]);

  module.controller('RestaurantAddOfferCtrl', ['$scope', 'fileReader',
    function($scope, fileReader) {
      $scope.postOffer = function() {
      };
      $scope.setAsPreview = function(file) {
        if (file) {
          fileReader.readAsDataUrl(file, $scope).then(function(result) {
            $scope.previewImageSrc = result;
          });
        } else {
          $scope.$apply(function(){
            $scope.previewImageSrc = '';
          });
        }
      };
    }
  ]);

  module.directive('previewImage', [
    function() {
      return {
        restrict: 'A',
        link: function($scope, element){
          element.bind('change', function(event){
            var file = (event.srcElement || event.target).files[0];
            $scope.setAsPreview(file);
          });<commit_msg>format bits of code<commit_after>(function() {
  'use strict';
  var module = angular.module('restaurantAdminViewControllers', [
    'ngResource'
  ]);

  module.controller('RestaurantAdminViewCtrl', ['$scope', '$resource',
    function($scope, $resource) {
      $scope.restaurant = $resource('api/v1/restaurants/me').get();
    }
  ]);

  module.controller('RestaurantOfferListCtrl', ['$scope', '$resource',
    function($scope, $resource) {
      $scope.offers = $resource('api/v1/restaurants/me/offers').query();
    }
  ]);

  module.controller('RestaurantAddOfferCtrl', ['$scope', 'fileReader',
    function($scope, fileReader) {
      $scope.postOffer = function() {
      };
      $scope.setAsPreview = function(file) {
        if (file) {
          fileReader.readAsDataUrl(file, $scope).then(function(result) {
            $scope.previewImageSrc = result;
          });
        } else {
          $scope.$apply(function() {
            $scope.previewImageSrc = '';
          });
        }
      };
    }
  ]);

  module.directive('previewImage', [
    function() {
      return {
        restrict: 'A',
        link: function($scope, element) {
          element.bind('change', function(event) {
            var file = (event.srcElement || event.target).files[0];
            $scope.setAsPreview(file);
          });
{'fraction_non_alphanumeric': 0.170261066969353, 'fraction_numerical': 0.0022701475595913734, 'mean_word_length': 2.5972789115646258, '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': '4554570', 'n_tokens_mistral': 803, 'n_tokens_neox': 788, 'n_words': 111}