<commit_before>import * as ts from 'typescript';
import { BadRequestError } from './errors';

class SnippetGenerator {
    async compile(snippet: ISnippet): Promise<ICompiledSnippet> {
        // TODO: Compilation time log here

        if (snippet == null) {
            throw new BadRequestError('Snippet is null');
        }

        let compiledSnippet: ICompiledSnippet = {
            id: snippet.id,
            gist: snippet.gist,
            author: snippet.author,
            source: snippet.source,
            name: snippet.name,
            description: snippet.description,
            host: snippet.host,
            host_version: snippet.host_version,
            platform: snippet.platform,
            origin: snippet.origin,
            created_at: snippet.created_at,
            modified_at: snippet.modified_at,
            style: snippet.style.content,
            template: snippet.template.content,<commit_msg>minor fix on snippet source<commit_after>import * as ts from 'typescript';
import { BadRequestError } from './errors';

class SnippetGenerator {
    async compile(snippet: ISnippet): Promise<ICompiledSnippet> {
        // TODO: Compilation time log here

        if (snippet == null) {
            throw new BadRequestError('Snippet is null');
        }

        let compiledSnippet: ICompiledSnippet = {
            id: snippet.id,
            gist: snippet.gist,
            author: snippet.author,
            name: snippet.name,
            description: snippet.description,
            host: snippet.host,
            host_version: snippet.host_version,
            platform: snippet.platform,
            origin: snippet.origin,
            created_at: snippet.created_at,
            modified_at: snippet.modified_at,
            style: snippet.style.content,
            template: snippet.template.content,
{'fraction_non_alphanumeric': 0.08810810810810811, 'fraction_numerical': 0.0, 'mean_word_length': 2.0544554455445545, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5694817', 'n_tokens_mistral': 502, 'n_tokens_neox': 468, 'n_words': 119}