<commit_before>import { select, html } from 'dom'; // helpers
import gyro from 'gyro';
import dynamics from 'dynamics.js';
const socket = io();
const maxRotation = 40;
const ship = select('.Default_box')[0];
const duration = 500;

let rotation = 0, lastRotation = 0;

gyro.startTracking(function(o) {

    lastRotation = rotation,
    rotation = Math.floor(o.x * 10) * -1;

    if(Math.abs(rotation) > maxRotation)
        rotation = maxRotation * (rotation / Math.abs(rotation));

    if(Math.abs(rotation - lastRotation) > 5) {
        dynamics.animate(ship, {
            rotateZ: `${rotation}deg`,
        }, {
            frequency: 300,
            friction: 300,
            duration: duration
        });

        socket.emit('handleRotation', {
            headers: {
                from: 'mobile'
            },
            data: {
                rotation
            }
        });
        setTimeout(() => {
            select('.Default_info')::html(Math.abs(lastRotation));
        }, duration);
    }

});

import Vue from 'vue';
import Router from 'vue-router';
import App from './components/app';
import Home from './components/home';
import Control from './components/control';

Vue.use(Router)
var router = new Router()

router.map({
    '/': {
        component: Home
    },
    '/control': {
        component: Control
    }
})

router.redirect({
  '*': '/'
})

router.start(App, '.app')
<commit_msg>Clean index.js mobile<commit_after>import Vue from 'vue';
import Router from 'vue-router';
import App from './components/app';
import Home from './components/home';
import Control from './components/control';

Vue.use(Router)
var router = new Router()

router.map({
    '/': {
        component: Home
    },
    '/control': {
        component: Control
    }
})

router.redirect({
  '*': '/'
})

router.start(App, '.app')

{'fraction_non_alphanumeric': 0.15735214324470972, 'fraction_numerical': 0.009766684753119913, 'mean_word_length': 2.3285198555956677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1169641', 'n_tokens_mistral': 573, 'n_tokens_neox': 549, 'n_words': 135}