<commit_before>'use strict';

angular.module('myApp.RecipeService', [])
.factory('recipes', [
    '$http',
    function($http) {
        var factory = {}; 
        
        $http.get('js/recipes.js')
        .success(function(data, status, headers, config) {
            //recipes = data;
            factory.recipes = data;
        })
        .error(function(data, status, headers, config){
            
        });
        
        factory.recipes = [];
        
        factory.setSearch = function (category, search){
            this.currentSearch = {"category": category, "search": search};
        }
        factory.getRecipes = function(category, search) {
            this.setSearch(category, search);
            return recipes;
        }
        
        factory.getCategories = function(search) {
            setSearch(null, search);
            return [
                {name: 'All', count: 5},
                {name: 'Soups', count:1}<commit_msg>Changes made by <NAME> (<EMAIL>).<commit_after>'use strict';

angular.module('myApp.RecipeService', [])
.factory('recipes', [
    '$http',
    function($http) {
        var factory = {}; 

        factory.recipes = [];

        /*$http.get('js/recipes.js')
        .success(function(data, status, headers, config) {
            //recipes = data;
            factory.recipes = data;
        })
        .error(function(data, status, headers, config){
            
        });*/
        
        $.getJSON('js/recipes.js', function(data) {
            factory.recipes = data;
        });
        
        
        
        factory.setSearch = function (category, search){
            this.currentSearch = {"category": category, "search": search};
        }
        factory.getRecipes = function(category, search) {
            this.setSearch(category, search);
            return recipes;
        }
        
        factory.getCategories = function(search) {
            setSearch(null, search);
            return [
                {name: 'All', count: 5},
                {name: 'Soups', count:1}
{'fraction_non_alphanumeric': 0.1411192214111922, 'fraction_numerical': 0.0019464720194647203, 'mean_word_length': 1.6563307493540051, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, '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': '5200106', 'n_tokens_mistral': 568, 'n_tokens_neox': 552, 'n_words': 107}