<commit_before>autocode.state['tour'] = function() {
  autocode.popover.close();
  
  autocode.hint.locked = true;
  
  var click_event = navigator.userAgent.match(/mobile/i) ? 'touchend' : 'click';
  var hint_offset_top = -10;
  
  var import_check;
  var imports_click = function() {
    $(this).unbind(click_event, imports_click);
    
    autocode.hint.open({
      target: $('#imports-search'),
      text: 'Select a module to import into your project. For example, try typing "bower".'
    });
    
    $('#imports-search').keyup(imports_init_click);
    
    import_check = setInterval(function() {
      if ($('#imports-content-readme button').length) {
        clearInterval(import_check);
        delete(import_check);
        
        module_click();
      }
    }, 1000);
    
    autocode.resize.hint();
    
    $('#imports-search').focus();
  };
  
  var overview_click = function() {
    $(this).unbind(click_event, overview_click);
    
    $('#tour-content').hide();
    
    autocode.hint.open({
      minTop: 0,
      offsetTop: -10,
      target: $('#imports-tab'),
      text: 'Once done, click this tab to import modules.'
    });
    
    $('#imports-tab').bind(click_event, imports_click);
    
    autocode.resize.hint();
  };
  $('#overview-tab').bind(click_event, overview_click);
  
  var imports_init_click = function() {
    $(this).unbind('keyup', imports_init_click);
    
    autocode.hint.close();
    
    setTimeout(function() {
      $('#popup a').bind(click_event, module_click);
      
      autocode.resize.hint();
    }, 1000);
  };
  
  var check_hint;
  var module_click = function() {
    autocode.listener.remove('import_listener');
    
    check_hint = setInterval(function() {
      if ($('#imports-content-readme button').length) {
        autocode.hint.open({
          scrollUp: 'Scroll back up to click the button',
          target: function() {
            return $('#imports-content-readme button');
          },
          text: 'Click here to add an example from this module to your Autocode configuration.'
        });
        
        $('#imports-content-readme button').bind('click', example_click);

        autocode.resize.hint();
      } else {
        autocode.hint.close({ animated: false });
      }
    }, 100);
  };
  
  var example_click = function() {
    clearInterval(check_hint);
    
    $(this).unbind('click', example_click);
    
    autocode.hint.open({
      offsetTop: hint_offset_top,
      target: $('#generate-icon'),
      text: 'Great! Now let\'s generate some code.',
      top: $('#main').outerHeight()
    });
    
    $('#generate-icon').bind(click_event, generate_click);
    
    autocode.resize.hint();
  };
  
  var generate_click = function() {
    $(this).unbind(click_event, generate_click);
    
    autocode.hint.open({
      target: $('#user'),
      text: 'Woohoo! You used Autocode to generate code! Now login with GitHub to signup :)',
      top: 52
    });
    
    setTimeout(function() {
      autocode.hint.close();
    }, 10000);
    
    autocode.resize.hint();
  };
  
  $('#welcome').fadeOut(function() {
    $('.app').fadeIn();
    
    $('header').fadeIn();
    
    $('.info-icon').hide();
    
    autocode.ws.ip = '172.16.17.32';
    autocode.ws.init();
    
    autocode.repo = 'tour/autocode-' + Math.random();
    autocode.imports = {};
    autocode.data.generators = {};
    
    autocode.project = {
      name: 'My App',
      version: '1.0.0',
      description: 'My amazing new app.',
      url: 'https://example.org',
      author: {
        name: '<NAME>',
        email: '<EMAIL>',
        url: 'http//example.org/my-name',
        copyright: '2015 My Co.'
      }
    };
    autocode.data.originalConfig = '';
    
    //autocode.state['overview']();
    <commit_msg>updated demo server<commit_after>autocode.state['tour'] = function() {
  autocode.popover.close();
  
  autocode.hint.locked = true;
  
  var click_event = navigator.userAgent.match(/mobile/i) ? 'touchend' : 'click';
  var hint_offset_top = -10;
  
  var import_check;
  var imports_click = function() {
    $(this).unbind(click_event, imports_click);
    
    autocode.hint.open({
      target: $('#imports-search'),
      text: 'Select a module to import into your project. For example, try typing "bower".'
    });
    
    $('#imports-search').keyup(imports_init_click);
    
    import_check = setInterval(function() {
      if ($('#imports-content-readme button').length) {
        clearInterval(import_check);
        delete(import_check);
        
        module_click();
      }
    }, 1000);
    
    autocode.resize.hint();
    
    $('#imports-search').focus();
  };
  
  var overview_click = function() {
    $(this).unbind(click_event, overview_click);
    
    $('#tour-content').hide();
    
    autocode.hint.open({
      minTop: 0,
      offsetTop: -10,
      target: $('#imports-tab'),
      text: 'Once done, click this tab to import modules.'
    });
    
    $('#imports-tab').bind(click_event, imports_click);
    
    autocode.resize.hint();
  };
  $('#overview-tab').bind(click_event, overview_click);
  
  var imports_init_click = function() {
    $(this).unbind('keyup', imports_init_click);
    
    autocode.hint.close();
    
    setTimeout(function() {
      $('#popup a').bind(click_event, module_click);
      
      autocode.resize.hint();
    }, 1000);
  };
  
  var check_hint;
  var module_click = function() {
    autocode.listener.remove('import_listener');
    
    check_hint = setInterval(function() {
      if ($('#imports-content-readme button').length) {
        autocode.hint.open({
          scrollUp: 'Scroll back up to click the button',
          target: function() {
            return $('#imports-content-readme button');
          },
          text: 'Click here to add an example from this module to your Autocode configuration.'
        });
        
        $('#imports-content-readme button').bind('click', example_click);

        autocode.resize.hint();
      } else {
        autocode.hint.close({ animated: false });
      }
    }, 100);
  };
  
  var example_click = function() {
    clearInterval(check_hint);
    
    $(this).unbind('click', example_click);
    
    autocode.hint.open({
      offsetTop: hint_offset_top,
      target: $('#generate-icon'),
      text: 'Great! Now let\'s generate some code.',
      top: $('#main').outerHeight()
    });
    
    $('#generate-icon').bind(click_event, generate_click);
    
    autocode.resize.hint();
  };
  
  var generate_click = function() {
    $(this).unbind(click_event, generate_click);
    
    autocode.hint.open({
      target: $('#user'),
      text: 'Woohoo! You used Autocode to generate code! Now login with GitHub to signup :)',
      top: 52
    });
    
    setTimeout(function() {
      autocode.hint.close();
    }, 10000);
    
    autocode.resize.hint();
  };
  
  $('#target-icon .text').text('Demo Server');
  
  $('#welcome').fadeOut(function() {
    $('.app').fadeIn();
    
    $('header').fadeIn();
    
    $('.info-icon').hide();
    
    autocode.ws.ip = '172.16.17.32';
    autocode.ws.init();
    
    autocode.repo = 'tour/autocode-' + Math.random();
    autocode.imports = {};
    autocode.data.generators = {};
    
    autocode.project = {
      name: 'My App',
      version: '1.0.0',
      description: 'My amazing new app.',
      url: 'https://example.org',
      author: {
        name: '<NAME>',
        email: '<EMAIL>',
        url: 'http//example.org/my-name',
        copyright: '2015 My Co.'
      }
    };
    autocode.data.originalConfig = '';
    
    //autocode.state['overview']();
    
{'fraction_non_alphanumeric': 0.1674515960230246, 'fraction_numerical': 0.01020408163265306, 'mean_word_length': 2.388741134751773, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3417199', 'n_tokens_mistral': 2536, 'n_tokens_neox': 2483, 'n_words': 455}