<commit_before><template>
  <div id="app" class="section">
    <div class="heading">
      <p class="title">
        UK Lottery Data
      </p>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Parameters
        </p>
      </div>
      <b-field>
        <Datepicker v-model="params.start" v-on:input="adjustFieldData" :disabled="flags.dates" input-class="input"></Datepicker>
        <Datepicker v-model="params.end" v-on:input="adjustFieldData" :disabled="flags.dates" input-class="input"></Datepicker>
        <b-select v-model="params.set" expanded>
          <option value="all" selected>All Sets</option>
          <option v-for="s in sets" :value="s">Set: {{ s }}</option>
        </b-select>
        <b-select v-model="params.machine" expanded>
          <option value="all" selected>All Machines</option>
          <option v-for="m in machines" :value="m">Machine: {{ m }}</option>
        </b-select>
        <p class="control">
          <button class="button" @click="runQuery">Submit</button>
        </p>
      </b-field>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Data
        </p>
      </div>
      <b-table :data="tables.main.data" :default-sort="[ 'num', 'desc' ]" :bordered="tables.main.cfg.isBordered" :striped="tables.main.cfg.isStriped" :narrowed="tables.main.cfg.isNarrowed" :checkable="tables.main.cfg.isCheckable" :paginated="tables.main.cfg.isPaginated">
        <template scope="props">
          <b-table-column field="label" label="" sortable>
            {{ props.row.label}}
          </b-table-column>
  
          <b-table-column field="num[0]" label="Ball 1" sortable numeric>
            {{ props.row.num[0] }}
          </b-table-column>
  
          <b-table-column field="num[1]" label="Ball 2" sortable numeric>
            {{ props.row.num[1] }}
          </b-table-column>
  
          <b-table-column field="num[2]" label="Ball 3" sortable numeric>
            {{ props.row.num[2] }}
          </b-table-column>
  
          <b-table-column field="num[3]" label="Ball 4" sortable numeric>
            {{ props.row.num[3] }}
          </b-table-column>
  
          <b-table-column field="num[4]" label="Ball 5" sortable numeric>
            {{ props.row.num[4] }}
          </b-table-column>
  
          <b-table-column field="num[5]" label="Ball 6" sortable numeric>
            {{ props.row.num[5] }}
          </b-table-column>
  
          <b-table-column field="num[6]" label="Bonus" sortable numeric>
            {{ props.row.num[6] }}
          </b-table-column>
        </template>
      </b-table>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Frequency Distribution
        </p>
      </div>
      <BarChart :chart-data="charts.freqDist.data" :options="charts.freqDist.options" :height="200"></BarChart>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Results Over Time
        </p>
      </div>
      <LineChart :chart-data="charts.timeSeries.data" :options="charts.timeSeries.options" :height="200"></LineChart>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import Buefy from 'buefy'
import VueResource from 'vue-resource'
import Datepicker from 'vuejs-datepicker'
import LineChart from '@/components/LineChart'
import BarChart from '@/components/BarChart'

Vue.use(Buefy)
Vue.use(VueResource)

var colors = [
  "rgba(31,119,180,1)",
  "rgba(255,127,14,1)",
  "rgba(44,160,44,1)",
  "rgba(214,39,40,1)",
  "rgba(148,103,189,1)",
  "rgba(140,86,75,1)",
  "rgba(227,119,194,1)",
]

export default {
  name: 'app',

  data: function () {
    return {
      params: {
        start: new Date(2015, 9, 10),
        end: new Date(),
        machine: "all",
        set: 0
      },
      flags: {
        dates: {
          to: new Date(1994, 10, 19),
          from: new Date()
        }
      },<commit_msg>fixed missing autoselect on sets<commit_after><template>
  <div id="app" class="section">
    <div class="heading">
      <p class="title">
        UK Lottery Data
      </p>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Parameters
        </p>
      </div>
      <b-field>
        <Datepicker v-model="params.start" v-on:input="adjustFieldData" :disabled="flags.dates" input-class="input"></Datepicker>
        <Datepicker v-model="params.end" v-on:input="adjustFieldData" :disabled="flags.dates" input-class="input"></Datepicker>
        <b-select v-model="params.set" expanded>
          <option disabled value="">Please select one</option>
          <option value="0">All Sets</option>
          <option v-for="s in sets" :value="s">Set: {{ s }}</option>
        </b-select>
        <b-select v-model="params.machine" expanded>
          <option disabled value="">Please select one</option>
          <option value="all">All Machines</option>
          <option v-for="m in machines" :value="m">Machine: {{ m }}</option>
        </b-select>
        <p class="control">
          <button class="button" @click="runQuery">Submit</button>
        </p>
      </b-field>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Data
        </p>
      </div>
      <b-table :data="tables.main.data" :default-sort="[ 'num', 'desc' ]" :bordered="tables.main.cfg.isBordered" :striped="tables.main.cfg.isStriped" :narrowed="tables.main.cfg.isNarrowed" :checkable="tables.main.cfg.isCheckable" :paginated="tables.main.cfg.isPaginated">
        <template scope="props">
          <b-table-column field="label" label="" sortable>
            {{ props.row.label}}
          </b-table-column>
  
          <b-table-column field="num[0]" label="Ball 1" sortable numeric>
            {{ props.row.num[0] }}
          </b-table-column>
  
          <b-table-column field="num[1]" label="Ball 2" sortable numeric>
            {{ props.row.num[1] }}
          </b-table-column>
  
          <b-table-column field="num[2]" label="Ball 3" sortable numeric>
            {{ props.row.num[2] }}
          </b-table-column>
  
          <b-table-column field="num[3]" label="Ball 4" sortable numeric>
            {{ props.row.num[3] }}
          </b-table-column>
  
          <b-table-column field="num[4]" label="Ball 5" sortable numeric>
            {{ props.row.num[4] }}
          </b-table-column>
  
          <b-table-column field="num[5]" label="Ball 6" sortable numeric>
            {{ props.row.num[5] }}
          </b-table-column>
  
          <b-table-column field="num[6]" label="Bonus" sortable numeric>
            {{ props.row.num[6] }}
          </b-table-column>
        </template>
      </b-table>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Frequency Distribution
        </p>
      </div>
      <BarChart :chart-data="charts.freqDist.data" :options="charts.freqDist.options" :height="200"></BarChart>
    </div>
    <div class="box">
      <div class="heading">
        <p class="subtitle">
          Results Over Time
        </p>
      </div>
      <LineChart :chart-data="charts.timeSeries.data" :options="charts.timeSeries.options" :height="200"></LineChart>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import Buefy from 'buefy'
import VueResource from 'vue-resource'
import Datepicker from 'vuejs-datepicker'
import LineChart from '@/components/LineChart'
import BarChart from '@/components/BarChart'

Vue.use(Buefy)
Vue.use(VueResource)

var colors = [
  "rgba(31,119,180,1)",
  "rgba(255,127,14,1)",
  "rgba(44,160,44,1)",
  "rgba(214,39,40,1)",
  "rgba(148,103,189,1)",
  "rgba(140,86,75,1)",
  "rgba(227,119,194,1)",
]

export default {
  name: 'app',

  data: function () {
    return {
      params: {
        start: new Date(2015, 9, 10),
        end: new Date(),
        machine: "all",
        set: "0"
      },
      flags: {
        dates: {
          to: new Date(1994, 10, 19),
          from: new Date()
        }
      },
{'fraction_non_alphanumeric': 0.18038247995064774, 'fraction_numerical': 0.02578655151141271, 'mean_word_length': 2.30183299389002, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, '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': '2983738', 'n_tokens_mistral': 2868, 'n_tokens_neox': 2696, 'n_words': 522}