<commit_before>const Vue = require('nativescript-vue/dist/index')

new Vue({
    data: {
        items: ['foo', 'bar', 'fizz', 'buzz'],
    },

    template: `
        <page>
            <stack-layout>
                <button @tap="addMore">Add more (+100000)</button>
                <button @tap="remove">remove</button>
                <label :text="items.length" style="text-align: center; font-size: 40;"></label>
                
                <list-view :items="items">
                    <template scope="item">
                        <stack-layout orientation="horizontal" style="padding: 20">
                            <label style="margin-left: 10; width: 100%; font-size: 20;" :text="item.$index"></label>
                        </stack-layout>
                    </template>
                </list-view>
            </stack-layout>
        </page>
    `,

    methods: {
        addMore() {
            let items = []
            for(let i = 0; i < 100000; ++i)
                this.items.push('added')
            this.items = this.items.concat(items)
        },
        remove() {
            this.items.splice(0, 1)
        }
    }
}).$start()<commit_msg>Added reddit example<commit_after>const Vue = require('nativescript-vue/dist/index')
const http = require("http");
Vue.prototype.$http = http

new Vue({
    data: {
        items: [],
    },

    template: `
        <page>
            <stack-layout>
                <list-view :items="items">
                    <template scope="item">
                        <grid-layout rows="80" columns="80, *">
                            <image :src="item.image" row="0" col="0" style="padding: 20;"></image>
                            <label :text="item.title" row="0" col="1" style="padding: 20; font-size: 18"></label>
                        </grid-layout>
                    </template>
                </list-view>
            </stack-layout>
        </page>
    `,

    created() {
        this.$http.getJSON('https://www.reddit.com/r/funny.json').then((res) => {
            this.items = res.data.children.map((item) => {
                return {
                    title: item.data.title,
                    image: item.data.thumbnail
                }
            })
        }).catch((err) => {
            console.log('err..' + err)
        })
    },

    methods: {}
}).$start()
{'fraction_non_alphanumeric': 0.1658206429780034, 'fraction_numerical': 0.01692047377326565, 'mean_word_length': 1.3462301587301588, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 38, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '1440766', 'n_tokens_mistral': 716, 'n_tokens_neox': 656, 'n_words': 120}