<commit_before>enyo.kind({
  kind: "Slides.Slide",
  name: "Slides.CodePlayer",
  layoutKind: 'enyo.FittableRowsLayout',

  published: {
    codeSamples: []
  },

  components: [
    {
      kind: "onyx.Toolbar",
      content: "Playground"
    },
    {
      fit: true,
      kind: 'enyo.FittableColumns',
      components: [
        {
          fit: true,
          kind: 'enyo.FittableRows',
          style: 'padding: 5px;',
          components: [
            {
              kind: 'enyo.FittableColumns',
              style: 'width: 100%; margin-bottom: 5px;',
              components: [
                {
                  fit: true,
                  kind: "enyo.Select",
                  name: "sampleSelect",
                  classes: 'onyx-button', // Super hacky, would be better to specify the same styles in a different class :P
                  style: 'padding-bottom: 5px;',
                },
                {
                  kind: "onyx.Button",
                  name: "loadFile",
                  style: 'margin: 0 0 0 10px;',
                  onclick: "loadFile",
                  content: "Load"
                }
              ]
            },
            {
              fit: true,
              kind: 'CodeEditor',
              style: 'width: 100%;'
            },
            {
              kind: "onyx.Button",
              content: "Make it so!",
              style: 'width: 100%;',
              onclick: "renderIntoSandbox"
            }
          ]
        },
        {
          fit: true,
          kind: 'CodePlayer',
          style: 'width: 50%; padding: 10px;',
          go: function(inCode){
            this.destroyClientControls();
            try {
              var stripWhitespace = inCode.replace(/\s/g, '') // Fuck whitespace
                , regexResults = /\S*name:("|')(\w*)(\1)\S*/m.exec(stripWhitespace)
                , kindName = regexResults[2];
              this.evalCode(inCode);
              this.createComponent({kind: kindName});
              if (this.hasNode()) {
                this.render();
              }
            } catch(e) {
              console.error("Error creating code: " + e);
            }
          }
        }
      ]
    }
  ],

  renderIntoSandbox: function(inSender) {
    this.$.codePlayer.go(this.$.codeEditor.getValue());
  },

  setCodeSamples: function() {
    this.inherited(arguments);

    this.$.sampleSelect.destroyClientControls();
    for(var idx in arguments[0]) {<commit_msg>Modify the regex since it breaks for kinds with named components<commit_after>enyo.kind({
  kind: "Slides.Slide",
  name: "Slides.CodePlayer",
  layoutKind: 'enyo.FittableRowsLayout',

  published: {
    codeSamples: []
  },

  components: [
    {
      kind: "onyx.Toolbar",
      content: "Playground"
    },
    {
      fit: true,
      kind: 'enyo.FittableColumns',
      components: [
        {
          fit: true,
          kind: 'enyo.FittableRows',
          style: 'padding: 5px;',
          components: [
            {
              kind: 'enyo.FittableColumns',
              style: 'width: 100%; margin-bottom: 5px;',
              components: [
                {
                  fit: true,
                  kind: "enyo.Select",
                  name: "sampleSelect",
                  classes: 'onyx-button', // Super hacky, would be better to specify the same styles in a different class :P
                  style: 'padding-bottom: 5px;',
                },
                {
                  kind: "onyx.Button",
                  name: "loadFile",
                  style: 'margin: 0 0 0 10px;',
                  onclick: "loadFile",
                  content: "Load"
                }
              ]
            },
            {
              fit: true,
              kind: 'CodeEditor',
              style: 'width: 100%;'
            },
            {
              kind: "onyx.Button",
              content: "Make it so!",
              style: 'width: 100%;',
              onclick: "renderIntoSandbox"
            }
          ]
        },
        {
          fit: true,
          kind: 'CodePlayer',
          style: 'width: 50%; padding: 10px;',
          go: function(inCode){
            this.destroyClientControls();
            try {
              var stripWhitespace = inCode.replace(/\s/g, '') // Fuck whitespace
                , regexResults = /enyo.kind\(\{\W*\S*name:("|')(\w*)(\1),\S*components:/m.exec(stripWhitespace)
                , kindName = regexResults[2];
              this.evalCode(inCode);
              this.createComponent({kind: kindName});
              if (this.hasNode()) {
                this.render();
              }
            } catch(e) {
              console.error("Error creating code: " + e);
            }
          }
        }
      ]
    }
  ],

  renderIntoSandbox: function(inSender) {
    this.$.codePlayer.go(this.$.codeEditor.getValue());
  },

  setCodeSamples: function() {
    this.inherited(arguments);

    this.$.sampleSelect.destroyClientControls();
    for(var idx in arguments[0]) {
{'fraction_non_alphanumeric': 0.13134505234050958, 'fraction_numerical': 0.009480545131345053, 'mean_word_length': 1.265771812080537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5582814', 'n_tokens_mistral': 1487, 'n_tokens_neox': 1396, 'n_words': 284}