<commit_before>Modernizr = require 'Modernizr'

AudioContext = Modernizr.prefixed 'AudioContext', window
context = new AudioContext()

SelfHypnosis2 = require './SelfHypnosis2'
player = new SelfHypnosis2 context

if module.hot
  module.hot.accept './SelfHypnosis2', ->
    player.stop()
    SelfHypnosis2 = require './SelfHypnosis2'
    player = new SelfHypnosis2 context
    player.play()

  module.hot.accept()

  module.hot.dispose (data) ->
    player.stop()
    data.time = player.time

  if module.hot.data
    player.time = module.hot.data.time

player.play()<commit_msg>workaround for chrome gc bug<commit_after>Modernizr = require 'Modernizr'

AudioContext = Modernizr.prefixed 'AudioContext', window
context = new AudioContext()

SelfHypnosis2 = require './SelfHypnosis2'
player = new SelfHypnosis2 context

if module.hot
  module.hot.accept './SelfHypnosis2', ->
    player.stop()
    SelfHypnosis2 = require './SelfHypnosis2'
    player = new SelfHypnosis2 context
    player.play()

  module.hot.accept()

  module.hot.dispose (data) ->
    player.stop()
    data.time = player.time

  if module.hot.data
    player.time = module.hot.data.time

player.play()

# in Chrome 39, you must store a reference to this object or the modulators will
# get garbage collected and stop modulating. This does not happen in when using
# webpack-dev-server because the module hot swapping code will hold a reference
# to the current player object to prevent collection.
window.player = player
{'fraction_non_alphanumeric': 0.09865771812080537, 'fraction_numerical': 0.010738255033557046, 'mean_word_length': 3.825242718446602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7301198', 'n_tokens_mistral': 486, 'n_tokens_neox': 456, 'n_words': 134}