<commit_before>var shell = require('gl-now')({ clearColor: [1, 1, 1, 0] })
var camera = require('game-shell-orbit-camera')(shell)
var analyze = require('web-audio-analyser')
var badge = require('soundcloud-badge')
var fs = require('fs')

var createTexture = require('gl-texture2d')
var createShader  = require('gl-shader')
var GLMatrix      = require('gl-matrix')
var createBuffer  = require('gl-buffer')
var createVAO     = require('gl-vao')

var mat4 = GLMatrix.mat4
var quat = GLMatrix.quat

shell.on('gl-init', init)
shell.on('gl-render', render)

var analyzer

badge({
    client_id: 'ded451c6d8f9ff1c62f72523f49dab68'
  , song: 'https://soundcloud.com/dylan_king/modern-housing'
  , dark: true
  , getFonts: true
}, function(err, src, json, div) {
  if (err) throw err

  var audio = new Audio

  audio.loop = true
  audio.addEventListener('canplay', function() {
    audio.play()
    analyzer = analyze(audio)
    analyzer.waveform(wave)
  })

  audio.src = src
  document.body.appendChild(div)
})

var waveform = document.createElement('canvas')
var wctx = waveform.getContext('2d')<commit_msg>cors issue for playback from soundcloud<commit_after>var shell = require('gl-now')({ clearColor: [1, 1, 1, 0] })
var camera = require('game-shell-orbit-camera')(shell)
var analyze = require('web-audio-analyser')
var badge = require('soundcloud-badge')
var fs = require('fs')

var createTexture = require('gl-texture2d')
var createShader  = require('gl-shader')
var GLMatrix      = require('gl-matrix')
var createBuffer  = require('gl-buffer')
var createVAO     = require('gl-vao')

var mat4 = GLMatrix.mat4
var quat = GLMatrix.quat

shell.on('gl-init', init)
shell.on('gl-render', render)

var analyzer

badge({
    client_id: 'ded451c6d8f9ff1c62f72523f49dab68'
  , song: 'https://soundcloud.com/dylan_king/modern-housing'
  , dark: true
  , getFonts: true
}, function(err, src, json, div) {
  if (err) throw err

  var audio = new Audio

  audio.loop = true
  audio.addEventListener('canplay', function() {
    audio.play()
    analyzer = analyze(audio)
    analyzer.waveform(wave)
  })
  audio.crossOrigin = 'Anonymous'
  audio.src = src
  document.body.appendChild(div)
})

var waveform = document.createElement('canvas')
var wctx = waveform.getContext('2d')
{'fraction_non_alphanumeric': 0.14935925762262484, 'fraction_numerical': 0.022978347326557666, 'mean_word_length': 4.5085158150851585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1381154', 'n_tokens_mistral': 819, 'n_tokens_neox': 785, 'n_words': 176}