<commit_before>#!/usr/bin/env python
# encoding: utf-8

import os
import sys


VERSION = "0.4.0"
OUTPUT_DIR = ".."
README_WORK_DIR = "."
DOC_PAGE_DIR = os.path.join(README_WORK_DIR, "pages")


def get_usage_file_path(filename):
    return os.path.join(DOC_PAGE_DIR, "examples", filename)


def write_line_list(f, line_list):
    f.write("\n".join(line_list))
    f.write("\n" * 2)


def write_usage_file(f, filename):
    write_line_list(f, [
        line.rstrip()
        for line in
        open(get_usage_file_path(filename)).readlines()
    ])


def write_examples(f):
    write_line_list(f, [
        "Examples",
        "========",
        "",
        "Create a table",
        "--------------",
        "",
        "Create a table from data matrix",
        "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
    ])

    write_usage_file(f, "create_table_from_data_matrix.txt")

    write_line_list(f, [
        "Insert records into a table",
        "---------------------------",
    ])

    write_usage_file(f, "insert_record_example.rst")

    write_line_list(f, [
        "For more information",
        "--------------------",
        "More examples are available at ",
        "http://simplesqlite.readthedocs.org/en/latest/pages/examples/index.html",
        "",
    ])


def main():
    with open(os.path.join(OUTPUT_DIR, "README.rst"), "w") as f:
        write_line_list(f, [
            "SimpleSQLite",
            "=============",
            "",
        ] + [
            line.rstrip() for line in
            open(os.path.join(
                DOC_PAGE_DIR, "introduction", "badges.txt")).readlines()
        ])

        write_line_list(f, [
            "Summary",
            "-------",
            "",
        ] + [
            line.rstrip() for line in
            open(os.path.join(
                DOC_PAGE_DIR, "introduction", "summary.txt")).readlines()<commit_msg>[ci skip] Rename doc file<commit_after>#!/usr/bin/env python
# encoding: utf-8

import os
import sys


VERSION = "0.4.0"
OUTPUT_DIR = ".."
README_WORK_DIR = "."
DOC_PAGE_DIR = os.path.join(README_WORK_DIR, "pages")


def get_usage_file_path(filename):
    return os.path.join(DOC_PAGE_DIR, "examples", filename)


def write_line_list(f, line_list):
    f.write("\n".join(line_list))
    f.write("\n" * 2)


def write_usage_file(f, filename):
    write_line_list(f, [
        line.rstrip()
        for line in
        open(get_usage_file_path(filename)).readlines()
    ])


def write_examples(f):
    write_line_list(f, [
        "Examples",
        "========",
        "",
        "Create a table",
        "--------------",
        "",
        "Create a table from data matrix",
        "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
    ])

    write_usage_file(f, "create_table_from_data_matrix.txt")

    write_line_list(f, [
        "Insert records into a table",
        "---------------------------",
    ])

    write_usage_file(f, "insert_record_example.txt")

    write_line_list(f, [
        "For more information",
        "--------------------",
        "More examples are available at ",
        "http://simplesqlite.readthedocs.org/en/latest/pages/examples/index.html",
        "",
    ])


def main():
    with open(os.path.join(OUTPUT_DIR, "README.rst"), "w") as f:
        write_line_list(f, [
            "SimpleSQLite",
            "=============",
            "",
        ] + [
            line.rstrip() for line in
            open(os.path.join(
                DOC_PAGE_DIR, "introduction", "badges.txt")).readlines()
        ])

        write_line_list(f, [
            "Summary",
            "-------",
            "",
        ] + [
            line.rstrip() for line in
            open(os.path.join(
                DOC_PAGE_DIR, "introduction", "summary.txt")).readlines()
{'fraction_non_alphanumeric': 0.20021242697822622, 'fraction_numerical': 0.0026553372278279343, 'mean_word_length': 1.8559514783927218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7348493', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1194, 'n_words': 197}