<commit_before>#!/usr/bin/ruby
require 'digest/sha1'

scripts={}

Dir[ "#{File.dirname(__FILE__)}/scripts/*.lua" ].each do |f|
  scripts[File.basename(f, ".lua") .to_sym]=IO.read f
end

def cquote(str)
  out=[]
  str.each_line do |l|<commit_msg>check redis script syntax before generating c strings<commit_after>#!/usr/bin/ruby
require 'digest/sha1'

scripts={}

Dir[ "#{File.dirname(__FILE__)}/scripts/*.lua" ].each do |f|
  scripts[File.basename(f, ".lua") .to_sym]=IO.read f
  
  exit 1 unless system "luac5.1 -p #{f}"
end

def cquote(str)
  out=[]
  str.each_line do |l|
{'fraction_non_alphanumeric': 0.18989547038327526, 'fraction_numerical': 0.008710801393728223, 'mean_word_length': 4.4245283018867925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3069638', 'n_tokens_mistral': 241, 'n_tokens_neox': 232, 'n_words': 53}