<commit_before>window.flakes = new Array(
    "<%= asset_path('weather/flakes/flake1.gif')%>",
    "<%= asset_path('weather/flakes/flake2.gif')%>",
    "<%= asset_path('weather/flakes/flake3.gif')%>",
    "<%= asset_path('weather/flakes/flake4.gif')%>",
    "<%= asset_path('weather/flakes/flake5.gif')%>"
)
window.show_initiated = false

window.amp = new Array();
window.x_pos = new Array();
window.y_pos = new Array();
window.stx = new Array();
window.sty = new Array();
window.deltax = new Array();
window.obj = new Array();

window.flake = ->
  doc = document.documentElement;
  left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
  top = (window.pageYOffset || doc.scrollTop)  - (doc.clientTop || 0);
  uwidth = window.innerWidth
  uheight = window.innerHeight

  console.log(left, top, uwidth, uheight)

  for i in [0...obj.length]
    y_pos[i] += sty[i]
    if y_pos[i] < top || y_pos[i] > top + uheight || x_pos[i] < left || x_pos[i] > left + uwidth - 70
      x_pos[i] = Math.random() * (left + uwidth - (amp[i]) - 50)
      y_pos[i] = top
    deltax[i] += stx[i]
    obj[i].style.top = y_pos[i] + 'px'
    obj[i].style.left = x_pos[i] + amp[i] * Math.sin(deltax[i]) + 'px'

  setTimeout 'flake()', 40


window.init_snow = (amount = Math.round(uheight / 20)) ->
  while(obj.length > 0)
    document.body.removeChild(obj.shift());

  for i in [0..amount]
    amp[i] = Math.random() * 19
    x_pos[i] = Math.random() * (uwidth - (amp[i]) - 50)
    y_pos[i] = Math.random() * uheight
    stx[i] = 0.03 + Math.random() * 0.25
    sty[i] = 3 + Math.random()
    deltax[i] = 0
    if ie4 or ns6
      new_flake = document.createElement('img')
      new_flake.setAttribute('id', "sn#{i}")
      new_flake.setAttribute('style', "position:absolute; z-index: -1; visibility:visible; top:-50px; left:-50px;")
      new_flake.setAttribute('src', flakes[Math.floor(Math.random() * flakes.length)])
      document.body.appendChild(new_flake);
      obj[i] = new_flake<commit_msg>improvements<commit_after>window.flakes = new Array(
    "<%= asset_path('weather/flakes/flake1.gif')%>",
    "<%= asset_path('weather/flakes/flake2.gif')%>",
    "<%= asset_path('weather/flakes/flake3.gif')%>",
    "<%= asset_path('weather/flakes/flake4.gif')%>",
    "<%= asset_path('weather/flakes/flake5.gif')%>"
)
window.show_initiated = false

window.amp = new Array();
window.x_pos = new Array();
window.y_pos = new Array();
window.stx = new Array();
window.sty = new Array();
window.deltax = new Array();
window.obj = new Array();

window.flake = ->
  doc = document.documentElement;
  left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
  top = (window.pageYOffset || doc.scrollTop)  - (doc.clientTop || 0);
  uwidth = window.innerWidth
  uheight = window.innerHeight

  console.log(left, top, uwidth, uheight)

  for i in [0...obj.length]
    y_pos[i] += sty[i]
    if y_pos[i] < top || y_pos[i] > top + uheight - 50 || x_pos[i] < left || x_pos[i] > left + uwidth - 70
      x_pos[i] = Math.random() * (left + uwidth - (amp[i]) - 50)
      y_pos[i] = top
    deltax[i] += stx[i]
    obj[i].style.top = y_pos[i] + 'px'
    obj[i].style.left = x_pos[i] + amp[i] * Math.sin(deltax[i]) + 'px'

  setTimeout 'flake()', 40


window.init_snow = (amount = 40) ->
  while(obj.length > 0)
    document.body.removeChild(obj.shift());

  for i in [0..amount]
    amp[i] = Math.random() * 19
    x_pos[i] = Math.random() * (uwidth - (amp[i]) - 50)
    y_pos[i] = Math.random() * uheight
    stx[i] = 0.03 + Math.random() * 0.25
    sty[i] = 3 + Math.random()
    deltax[i] = 0
    if ie4 or ns6
      new_flake = document.createElement('img')
      new_flake.setAttribute('id', "sn#{i}")
      new_flake.setAttribute('style', "position:absolute; z-index: -1; visibility:visible; top:-50px; left:-50px;")
      new_flake.setAttribute('src', flakes[Math.floor(Math.random() * flakes.length)])
      document.body.appendChild(new_flake);
      obj[i] = new_flake
{'fraction_non_alphanumeric': 0.1978326612903226, 'fraction_numerical': 0.019153225806451613, 'mean_word_length': 3.4296875, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, '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': '1684883', 'n_tokens_mistral': 1611, 'n_tokens_neox': 1540, 'n_words': 285}