<commit_before>#!/usr/bin/tclsh8.6

source ihex.tcl

set list 0

set arg 0
if {[lindex $argv $arg] eq "-d"} {
  incr arg
  set def [lindex $argv $arg]
  incr arg
} elseif {[lindex $argv $arg] eq "-l"} {
  set list 1
  incr arg
}
set out [lindex $argv $arg]
incr arg

proc def2name {def} {
 return [regsub {DEF[0-9]+_(.*)} $def \\1]
}
proc eep_set_var {eep_var name value} {
 upvar $eep_var eep
 global opt_sz
 set addr $::opt($name)

 if {$opt_sz($name) == 1} {
  set eep [binary format a*@${addr}c $eep $value]<commit_msg>usage info for eeprom_set_var<commit_after>#!/usr/bin/tclsh8.6

source ihex.tcl

set list 0

set arg 0
if {[lindex $argv $arg] eq "-d"} {
  incr arg
  set def [lindex $argv $arg]
  incr arg
} elseif {[lindex $argv $arg] eq "-l"} {
  set list 1
  incr arg
} else {
 puts "usage: [info script] \[-l | -d <defaults-set>\] <eeprom_file>"
 exit 0
}
set out [lindex $argv $arg]
incr arg

proc def2name {def} {
 return [regsub {DEF[0-9]+_(.*)} $def \\1]
}
proc eep_set_var {eep_var name value} {
 upvar $eep_var eep
 global opt_sz
 set addr $::opt($name)

 if {$opt_sz($name) == 1} {
  set eep [binary format a*@${addr}c $eep $value]
{'fraction_non_alphanumeric': 0.1679721496953873, 'fraction_numerical': 0.018276762402088774, 'mean_word_length': 3.5454545454545454, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5586719', 'n_tokens_mistral': 513, 'n_tokens_neox': 499, 'n_words': 159}