<commit_before># dashing.js is located in the dashing framework
# It includes jquery & batman for you.
#= require dashing.js

#= require_directory .
#= require_tree ../../widgets

console.log("Yeah! The dashboard has started!")

convertCurrency = (currency, value) ->
  # Assume currency is "GBP" for now
  if Dashing.currentCurrency == "EUR"
    value * 1.21365
  else if Dashing.currentCurrency == "USD"
    value * 1.67459
  else
    value

currencySymbol = (currency) ->
  switch(currency)
    when "GBP"
      "£"
    when "EUR"
      "€"
    when "USD"
      "$"

Dashing.on 'ready', ->
  Dashing.widget_margins ||= [5, 5]
  Dashing.numColumns ||= 4
  Dashing.currentCurrency ||= "GBP"
  Dashing.resize()

Dashing.resize = () ->
  total_width = window.innerWidth - (Dashing.widget_margins[0] * 2 * Dashing.numColumns)
  total_height = window.innerHeight - 86.0
  Dashing.widget_base_dimensions = [total_width/Dashing.numColumns, total_height/Dashing.numRows]

  contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColumns
<commit_msg>Call resize method on window resize<commit_after># dashing.js is located in the dashing framework
# It includes jquery & batman for you.
#= require dashing.js

#= require_directory .
#= require_tree ../../widgets

console.log("Yeah! The dashboard has started!")

convertCurrency = (currency, value) ->
  # Assume currency is "GBP" for now
  if Dashing.currentCurrency == "EUR"
    value * 1.21365
  else if Dashing.currentCurrency == "USD"
    value * 1.67459
  else
    value

currencySymbol = (currency) ->
  switch(currency)
    when "GBP"
      "£"
    when "EUR"
      "€"
    when "USD"
      "$"

Dashing.on 'ready', ->
  Dashing.widget_margins ||= [5, 5]
  Dashing.numColumns ||= 4
  Dashing.currentCurrency ||= "GBP"

  $(window).bind 'resize', (event) =>
    Dashing.resize()

  Dashing.resize()

Dashing.resize = () ->
  total_width = window.innerWidth - (Dashing.widget_margins[0] * 2 * Dashing.numColumns)
  total_height = window.innerHeight - 86.0
  Dashing.widget_base_dimensions = [total_width/Dashing.numColumns, total_height/Dashing.numRows]

  contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColumns

{'fraction_non_alphanumeric': 0.1332741003998223, 'fraction_numerical': 0.020435362061306087, 'mean_word_length': 3.624229979466119, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '4025129', 'n_tokens_mistral': 820, 'n_tokens_neox': 783, 'n_words': 177}