<commit_before>import { observable, autorun, autorunAsync, transaction } from 'mobx';
import request from 'superagent'

const API_PUBLIC_KEY = "<KEY>";

class SearchModel {

  @observable searchText = "";
  @observable results = [];
  @observable totalResults = 0;
  @observable error = null;
  @observable loading = false;

  constructor() {

    autorunAsync(() => {
        this.search(this.searchText)
      },
      1000
    );
  }

  search = (text) => {

    // console.log('persisting into local fucking storage !!!');
    request
      .get(`http://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(text)}&api_key=${API_PUBLIC_KEY}`)
      .set('Accept', 'application/json')
      .end((error, { body }) => {

        this.loading = false;

        if (error) {
          this.error = error;
        }<commit_msg>remove console.log<commit_after>import { observable, autorun, autorunAsync, transaction } from 'mobx';
import request from 'superagent'

const API_PUBLIC_KEY = "<KEY>";

class SearchModel {

  @observable searchText = "";
  @observable results = [];
  @observable totalResults = 0;
  @observable error = null;
  @observable loading = false;

  constructor() {

    autorunAsync(() => {
        this.search(this.searchText)
      },
      1000
    );
  }

  search = (text) => {

    request
      .get(`http://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(text)}&api_key=${API_PUBLIC_KEY}`)
      .set('Accept', 'application/json')
      .end((error, { body }) => {

        this.loading = false;

        if (error) {
          this.error = error;
        }
{'fraction_non_alphanumeric': 0.15491183879093198, 'fraction_numerical': 0.007556675062972292, 'mean_word_length': 2.847457627118644, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '629432', 'n_tokens_mistral': 528, 'n_tokens_neox': 504, 'n_words': 100}