<commit_before>const _ = require("lodash");
const expect = require("chai").expect;
const Bacon = require("baconjs");
const goalsFromRatings = require("../src/goalsFromRatings");
const goals = require("../src/goals");
const Seed = require("../src/Seed");
const Time = require("../src/Time");

describe("sandbox", () => {
    context("live goals", () => {
        it("", (done) => {
            const time = new Time().setMinutes(90);
            const seed = Math.random().toString().toSeed();
            const goals = [1200, 1000].toRatings().goals(time, seed);

            const goalTimes = _(goals)
                .map(goals =>
                    _(_.range(goals))
                        .map(Math.random)
                        .map(x => x * 90)
                        .orderBy(x => x)
                        .map(mins => new Time().setMinutes(mins))
                        .value())
                .tap(console.log)
                .value();

            Bacon.fromArray(goalTimes[0])
                .doLog()
                .flatMap((time) =>
                    Bacon.later(time.scale(2 / 5400).milliseconds, time))<commit_msg>Tweaks sandbox, failing<commit_after>const _ = require("lodash");
const expect = require("chai").expect;
const Bacon = require("baconjs");
const goalsFromRatings = require("../src/goalsFromRatings");
const goals = require("../src/goals");
const Seed = require("../src/Seed");
const Time = require("../src/Time");
const goalTimes = require("../src/goalTimes");

describe("sandbox", () => {
    context("live goals", () => {
        it("", (done) => {
            const time = new Time().setMinutes(90);
            const seed = Math.random().toString().toSeed();
            const goals = [1200, 1000].toRatings().goals(time, seed);

            const times = _(goals)
                .thru(goals => goalTimes(goals, time, seed))
                .map(goals =>
                    _(goals)
                        .map(mins => new Time().setMinutes(mins))
                        .value())
                .tap(console.log)
                .value();

            Bacon.fromArray(times[0])
                .doLog()
                .flatMap((time) =>
                    Bacon.later(time.scale(2 / 5400).milliseconds, time))
{'fraction_non_alphanumeric': 0.1704946996466431, 'fraction_numerical': 0.015017667844522967, 'mean_word_length': 1.7190876350540216, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '570656', 'n_tokens_mistral': 702, 'n_tokens_neox': 629, 'n_words': 122}