<commit_before>import * as React from "react";
import "isomorphic-fetch";
import { ILanguage, ILicense, IList, IMaintainer, ISoftware, ISyntax, ITag } from "./interfaces";
import { Home } from "./Home";

interface IState {
    languages: ILanguage[];
    licenses: ILicense[];
    lists: IList[];
    maintainers: IMaintainer[];
    ruleCount: number;
    software: ISoftware[];
    syntaxes: ISyntax[];
    tags: ITag[];
};

export class HomeContainer extends React.Component<{}, IState> {
    constructor(props: any) {
        super(props);
        this.state = {
            languages: [],
            licenses: [],
            lists: [],
            maintainers: [],
            ruleCount: 0,
            software: [],
            syntaxes: [],
            tags: []
        };
    }

    componentDidMount() {
        this.fetchLanguages();
        this.fetchLicenses();
        this.fetchLists();
        this.fetchMaintainers();
        this.fetchSoftware();
        this.fetchSyntaxes();
        this.fetchTags();
        this.fetchRuleCount();
    };

    fetchLanguages() {
        fetch("/api/v1/languages")
            .then(r => r.json() as Promise<ILanguage[]>)
            .then(p => { this.setState({ languages: p }); });
    };<commit_msg>comment call to rules count for now<commit_after>import * as React from "react";
import "isomorphic-fetch";
import { ILanguage, ILicense, IList, IMaintainer, ISoftware, ISyntax, ITag } from "./interfaces";
import { Home } from "./Home";

interface IState {
    languages: ILanguage[];
    licenses: ILicense[];
    lists: IList[];
    maintainers: IMaintainer[];
    ruleCount: number;
    software: ISoftware[];
    syntaxes: ISyntax[];
    tags: ITag[];
};

export class HomeContainer extends React.Component<{}, IState> {
    constructor(props: any) {
        super(props);
        this.state = {
            languages: [],
            licenses: [],
            lists: [],
            maintainers: [],
            ruleCount: 0,
            software: [],
            syntaxes: [],
            tags: []
        };
    }

    componentDidMount() {
        this.fetchLanguages();
        this.fetchLicenses();
        this.fetchLists();
        this.fetchMaintainers();
        this.fetchSoftware();
        this.fetchSyntaxes();
        this.fetchTags();
        // this.fetchRuleCount();
    };

    fetchLanguages() {
        fetch("/api/v1/languages")
            .then(r => r.json() as Promise<ILanguage[]>)
            .then(p => { this.setState({ languages: p }); });
    };
{'fraction_non_alphanumeric': 0.14990138067061143, 'fraction_numerical': 0.0015779092702169625, 'mean_word_length': 2.107843137254902, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '7389999', 'n_tokens_mistral': 722, 'n_tokens_neox': 725, 'n_words': 160}