<commit_before>const functions = require('firebase-functions');
const admin = require('firebase-admin');

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
//  response.send("Hello from Firebase!");
// });

admin.initializeApp(functions.config().firebase);

exports.updateStat = functions.https.onRequest((req, res) => {
  if (req.query.key == require('../config').FUNCTION_KEY) {
    require('./stat.js')().then(() => {
      res.status(200).send('success');
    });
  } else {
    res.status(403).send('Invaild Key');
  }
});

exports.cleanUp = functions.https.onRequest((req, res) => {
  if (req.query.key == require('../config').FUNCTION_KEY) {
    require('./cleanup.js')().then(() => {
      res.status(200).send('success');
    });
  } else {
    res.status(403).send('Invaild Key');
  }
});<commit_msg>update function verification<commit_after>const functions = require('firebase-functions');
const admin = require('firebase-admin');

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
//  response.send("Hello from Firebase!");
// });

admin.initializeApp(functions.config().firebase);

exports.updateStat = functions.https.onRequest((req, res) => {
  if (req.query.key == functions.config().bluesense.key) {
    require('./stat.js')().then(() => {
      res.status(200).send('success');
    });
  } else {
    res.status(403).send('Invaild Key');
  }
});

exports.cleanUp = functions.https.onRequest((req, res) => {
  if (req.query.key == functions.config().bluesense.key) {
    require('./cleanup.js')().then(() => {
      res.status(200).send('success');
    });
  } else {
    res.status(403).send('Invaild Key');
  }
});
{'fraction_non_alphanumeric': 0.21351211964930378, 'fraction_numerical': 0.012377514182568335, 'mean_word_length': 3.8138957816377173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5066742', 'n_tokens_mistral': 623, 'n_tokens_neox': 608, 'n_words': 88}