<commit_before>(function() {
  'use strict'

  angular.module('app')
    .service('PosesService', service)
  service.$inject = ['$http']

  function service($http, $stateParams, $state, $filter) {

// THIS IS BROKEN ATM

    // let sortPosts
    // this.sort = function(sortOrder) {
    //   sortPosts = sortOrder
    //   console.log(sortPosts);
    // }
    // this.sorted = function() {
    //   console.log(sortPosts);
    //   return sortPosts
    //   return $http.get('/posts').then((all) => {
    //     return $filter('orderBy')(all.data, sortPosts)
    //   }).then((sorted) => {
    //     return sorted
    //   })
    // }

    this.allPoses = function() { // Grabs all poses
      return $http.get('/api/poses').then(all => all.data)
    }
    this.$Pose = function(id) { // Grab a post by ID
      return $http.get(`poses/${id}`).then(one => one.data)
    }

    //
    // this.newPost = function(newPost) { // Makes new post
    //   $http.post('/posts', newPost)
    //   $state.reload();
    // }
    //
    // this.$del = function(id) { // Removes Post by ID
    //   $http.delete(`/posts/${$stateParams.id}`).then(d => $state.go('app.all'))
    // }
    //
    // this.$like = function(post, dir) { // Handles both likes and dislikes
    //   post.negative = false // Makes my error span pop out atcha
    //   dir == true ?
    //     $http.post(`/posts/${post.id}/likes`)
    //     .then(likes => post.likes = likes.data.likes) :
    //     (dir == false && post.likes > 0) ?
    //     $http.delete(`/posts/${post.id}/likes`)
    //     .then(dislikes => post.likes = dislikes.data.likes) :
    //     post.negative = !post.negative // makes my error pop out if they try and go past 0
    // }<commit_msg>poses by id service<commit_after>(function() {
  'use strict'

  angular.module('app')
    .service('PosesService', service)
  service.$inject = ['$http']

  function service($http, $stateParams, $state, $filter) {

// THIS IS BROKEN ATM

    // let sortPosts
    // this.sort = function(sortOrder) {
    //   sortPosts = sortOrder
    //   console.log(sortPosts);
    // }
    // this.sorted = function() {
    //   console.log(sortPosts);
    //   return sortPosts
    //   return $http.get('/posts').then((all) => {
    //     return $filter('orderBy')(all.data, sortPosts)
    //   }).then((sorted) => {
    //     return sorted
    //   })
    // }

    this.allPoses = function() { // Grabs all poses
      return $http.get('/api/poses').then(all => all.data)
    }
    this.$Pose = function(id) { // Grab a post by ID
      return $http.get(`/api/poses/${id}`).then(one => one.data)
    }

    //
    // this.newPost = function(newPost) { // Makes new post
    //   $http.post('/posts', newPost)
    //   $state.reload();
    // }
    //
    // this.$del = function(id) { // Removes Post by ID
    //   $http.delete(`/posts/${$stateParams.id}`).then(d => $state.go('app.all'))
    // }
    //
    // this.$like = function(post, dir) { // Handles both likes and dislikes
    //   post.negative = false // Makes my error span pop out atcha
    //   dir == true ?
    //     $http.post(`/posts/${post.id}/likes`)
    //     .then(likes => post.likes = likes.data.likes) :
    //     (dir == false && post.likes > 0) ?
    //     $http.delete(`/posts/${post.id}/likes`)
    //     .then(dislikes => post.likes = dislikes.data.likes) :
    //     post.negative = !post.negative // makes my error pop out if they try and go past 0
    // }
{'fraction_non_alphanumeric': 0.19832804842894206, 'fraction_numerical': 0.0011530700490054772, 'mean_word_length': 1.9557069846678024, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4718155', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1178, 'n_words': 235}