<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">

  <title>Income Visualizer | Sprinkler Example</title>
  <link rel="stylesheet" href="css/style.css">
  <style>
    body { color: orange; background: brown; }
    a:link, a:visited { color: orange; }
    a:hover, a:active { color: white; }
    .info { user-select: none; }
  </style>
</head>
<body>
  <canvas id="canvas"></canvas>

  <div class="info">
    <h1>Income Visualizer</h1>
    <p>Input your monthly income to see how it looks in real-time. <br>Built with <a href="https://github.com/axelpale/sprinkler">sprinkler.js</a></p>
    <form id="income-form">
      <label for="monthly-income">$</label>
      <input id="monthly-income" type="text" value="4000">
    </form>

    <div id="earnings">
      <span>Earnings this far:</span><br>
      $<span id="earnings-money"></span>
    </div>
  </div>

  <script src="https://unpkg.com/sprinkler@1.10.0/dist/sprinkler.min.js"></script>
  <script>
  (function () {
    var c = document.getElementById('canvas')
    var spri = sprinkler.create(c)

    var images = [
      'img/5cent.png', // 21.3 mm
      'img/2cent.png', // 18.8 mm
      'img/1cent.png' // 16.3 mm
    ]

    var stop = null
    var startUpdateRain = function (income) {
      if (stop) {
        stop()
      }
      stop = spri.start(images, {
        imagesInSecond: income / (30 * 24 * 60 * 60),
        zMin: 1, zMax: 1,
        dyMin: 500, dyMax: 500,
        ddyMin: 500, ddyMax: 500
      })
    }

    var earningsMoney = document.getElementById('earnings-money')
    var incomeInput = document.getElementById('monthly-income')
    var incomeForm = document.getElementById('income-form')
    var readInput = function () {
      return parseFloat(incomeInput.value)
    }

    // Update after user modifies the income.
    incomeInput.addEventListener('change', function () {
      startUpdateRain(readInput())
    })
    incomeForm.addEventListener('submit', function (ev) {
      ev.preventDefault() // avoid page reload
      incomeInput.blur() // remove focus from form
      startUpdateRain(readInput())<commit_msg>Correct terminology: rename spri to rain<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">

  <title>Income Visualizer | Sprinkler Example</title>
  <link rel="stylesheet" href="css/style.css">
  <style>
    body { color: orange; background: brown; }
    a:link, a:visited { color: orange; }
    a:hover, a:active { color: white; }
    .info { user-select: none; }
  </style>
</head>
<body>
  <canvas id="canvas"></canvas>

  <div class="info">
    <h1>Income Visualizer</h1>
    <p>Input your monthly income to see how it looks in real-time. <br>Built with <a href="https://github.com/axelpale/sprinkler">sprinkler.js</a></p>
    <form id="income-form">
      <label for="monthly-income">$</label>
      <input id="monthly-income" type="text" value="4000">
    </form>

    <div id="earnings">
      <span>Earnings this far:</span><br>
      $<span id="earnings-money"></span>
    </div>
  </div>

  <script src="https://unpkg.com/sprinkler@1.10.0/dist/sprinkler.min.js"></script>
  <script>
  (function () {
    var c = document.getElementById('canvas')
    var rain = sprinkler.create(c)

    var images = [
      'img/5cent.png', // 21.3 mm
      'img/2cent.png', // 18.8 mm
      'img/1cent.png' // 16.3 mm
    ]

    var stop = null
    var startUpdateRain = function (income) {
      if (stop) {
        stop()
      }
      stop = rain.start(images, {
        imagesInSecond: income / (30 * 24 * 60 * 60),
        zMin: 1, zMax: 1,
        dyMin: 500, dyMax: 500,
        ddyMin: 500, ddyMax: 500
      })
    }

    var earningsMoney = document.getElementById('earnings-money')
    var incomeInput = document.getElementById('monthly-income')
    var incomeForm = document.getElementById('income-form')
    var readInput = function () {
      return parseFloat(incomeInput.value)
    }

    // Update after user modifies the income.
    incomeInput.addEventListener('change', function () {
      startUpdateRain(readInput())
    })
    incomeForm.addEventListener('submit', function (ev) {
      ev.preventDefault() // avoid page reload
      incomeInput.blur() // remove focus from form
      startUpdateRain(readInput())
{'fraction_non_alphanumeric': 0.15945279210585334, 'fraction_numerical': 0.02108095985647006, 'mean_word_length': 2.939929328621908, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 4, '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': '1507670', 'n_tokens_mistral': 1575, 'n_tokens_neox': 1455, 'n_words': 332}