<commit_before>var getSeats = require('../dao/seat').getSeats;
var reload = require('../dao/seat').reload;
var crypto = require('../lib/crypto');
var config = require('../config');

exports.entry = function *() {
  yield this.render('main');
};

exports.take = function *() {
  var seat;
  var seats = getSeats();
  if (seats.length <= 0) {
    return this.body = {
      status: -2,
      message: 'no more',
      data: {}
    };
  }
  seat = seats.pop();
  this.body = {
    status: 0,
    message: 'ok',
    data: {
      seat: seat,
      url: '/ticket/' + crypto.encrypt(seat)
    }
  };
};

exports.all = function *() {
  yield this.render('all', {seats: getSeats()});
};

exports.reload = function *() {
  if (this.request.body.password !== config.password) {
    return this.body = {
      status: -1,
      message: '口令无效'
    };
  }
  reload();
  this.body = {
    status: 0,<commit_msg>update qrcode<commit_after>var getSeats = require('../dao/seat').getSeats;
var reload = require('../dao/seat').reload;
var crypto = require('../lib/crypto');
var config = require('../config');

exports.entry = function *() {
  yield this.render('main');
};

exports.take = function *() {
  var seat;
  var seats = getSeats();
  if (seats.length <= 0) {
    return this.body = {
      status: -2,
      message: 'no more',
      data: {}
    };
  }
  seat = seats.pop();
  this.body = {
    status: 0,
    message: 'ok',
    data: {
      seat: seat,
      url: 'http://muc.lab4310.com/ticket/' + crypto.encrypt(seat)
    }
  };
};

exports.all = function *() {
  yield this.render('all', {seats: getSeats()});
};

exports.reload = function *() {
  if (this.request.body.password !== <PASSWORD>) {
    return this.body = {
      status: -1,
      message: '口令无效'
    };
  }
  reload();
  this.body = {
    status: 0,
{'fraction_non_alphanumeric': 0.20077220077220076, 'fraction_numerical': 0.007722007722007722, 'mean_word_length': 2.5223300970873788, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '6305489', 'n_tokens_mistral': 665, 'n_tokens_neox': 651, 'n_words': 136}