<commit_before><?php

  # called from bin/unpaid.php

  function check_updates () {
    $installed = `git rev-parse HEAD`;
    
    $url = "https://api.github.com/repos/Cooba13/proxypool-simplestats/commits";
    $options = array('http' => array('user_agent'=> 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36', 'timeout' => '5'));
    $context = stream_context_create($options);
    $response = file_get_contents($url, false, $context);
    $commits = json_decode($response);
    
    if ( trim($installed) == $commits[0]->sha ) {
      return False;
    } else
      return True;
  }

  $update = true;

  $file = dirname(__FILE__) . "/../include/gen-update.php";
  if ( file_exists($file) && ((filemtime($file)) > date("U"))) {
    $update = false;
  }
  
  if ( $update ) {
    if ( check_updates() ) {
      file_put_contents($file, '<?php $current = false; ?>');
    } else {
      file_put_contents($file, '<?php $current = true; ?>');
    }<commit_msg>touch of file and delay ... kinda forgot<commit_after><?php

  # called from bin/unpaid.php

  function check_updates () {
    $installed = `git rev-parse HEAD`;
    
    $url = "https://api.github.com/repos/Cooba13/proxypool-simplestats/commits";
    $options = array('http' => array('user_agent'=> 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36', 'timeout' => '5'));
    $context = stream_context_create($options);
    $response = file_get_contents($url, false, $context);
    $commits = json_decode($response);
    
    if ( trim($installed) == $commits[0]->sha ) {
      return False;
    } else
      return True;
  }

  $update = true;

  $file = dirname(__FILE__) . "/../include/gen-update.php";
  if ( file_exists($file) && ((filemtime($file)) + 43200 > date("U"))) {
    $update = false;
  }
  
  if ( $update ) {
    touch($file);
    if ( check_updates() ) {
      file_put_contents($file, '<?php $current = false; ?>');
    } else {
      file_put_contents($file, '<?php $current = true; ?>');
    }
{'fraction_non_alphanumeric': 0.18788745827372436, 'fraction_numerical': 0.030996661897949453, 'mean_word_length': 3.1626984126984126, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '3164744', 'n_tokens_mistral': 795, 'n_tokens_neox': 739, 'n_words': 144}