<commit_before><link href="http://fonts.googleapis.com/css?family=Droid+Sans+Mono&v2" rel="stylesheet" type="text/css">

<style>
  body { margin: 0; padding: 8px; background: #f1f1f1; font-size: 12px; }
  textarea#source, textarea#results { border-radius: 4px; resize: none; font-family: 'Droid Sans Mono', monospace; font-size: 12px; line-height: 18px; background: #fff; color: #999; border: 1px solid #d9d9d9; border-top: 1px solid silver; padding: 12px; margin: 0; height: 200px; width: 400px; }
  textarea#source:hover, textarea#results:hover, textarea#source:focus, textarea#results:focus { border: 1px solid #4d90fe; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); outline: none; }
  textarea#source { margin: 0 0 8px; }
  #error { font-family: 'Droid Sans Mono', monospace; color: #a00; font-size: 12px; line-height: 18px; margin: 8px 0 0; }
</style>

<script type="text/coffeescript">
  $error = $(document.getElementById('error'))
  source_el = document.getElementById('source')
  $source = $(source_el)
  results_el = document.getElementById('results')

  compile = ->
    try
      results_el.value = CoffeeScript.compile(source_el.value, bare: on)
      $error.hide()
    catch error then $error.text(error.message).show()
<commit_msg>added persistence with localStorage<commit_after><link href="http://fonts.googleapis.com/css?family=Droid+Sans+Mono&v2" rel="stylesheet" type="text/css">

<style>
  body { margin: 0; padding: 8px; background: #f1f1f1; font-size: 12px; }
  textarea#source, textarea#results { border-radius: 4px; resize: none; font-family: 'Droid Sans Mono', monospace; font-size: 12px; line-height: 18px; background: #fff; color: #999; border: 1px solid #d9d9d9; border-top: 1px solid silver; padding: 12px; margin: 0; height: 200px; width: 400px; }
  textarea#source:hover, textarea#results:hover, textarea#source:focus, textarea#results:focus { border: 1px solid #4d90fe; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); outline: none; }
  textarea#source { margin: 0 0 8px; }
  #error { font-family: 'Droid Sans Mono', monospace; color: #a00; font-size: 12px; line-height: 18px; margin: 8px 0 0; }
</style>

<script type="text/coffeescript">
  $error = $(document.getElementById('error'))
  source_el = document.getElementById('source')
  $source = $(source_el)
  results_el = document.getElementById('results')

  source = localStorage.getItem('source', source)
  source_el.value = source if source
  results = localStorage.getItem('results', results)
  results_el.value = results if source

  compile = ->
    source = source_el.value
    localStorage.setItem('source', source)

    try
      results = CoffeeScript.compile(source, bare: on)
      localStorage.setItem('results', results)
      results_el.value = results
      $error.hide()
    catch error then $error.text(error.message).show()

{'fraction_non_alphanumeric': 0.1476510067114094, 'fraction_numerical': 0.0381490639350053, 'mean_word_length': 5.025531914893617, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '7603148', 'n_tokens_mistral': 1048, 'n_tokens_neox': 942, 'n_words': 247}