<commit_before><!DOCTYPE html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>
        CSGO Team In-game logos
    </title>
    <link href="//cdn.jsdelivr.net/bootswatch/3.3.1.2/paper/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <h2>
            Available teams
            <a class="btn btn-primary pull-right" href="all.zip">
                Download zip with all teams
            </a>
        </h2>
        <table class="table table-hover">
            <tbody>
                <?php
                $items = scandir( '.' );
                $teamList = array();
                $skiplist = array( '.', '..', 'index.php' );
                foreach( $items as $item ) :
                    if( in_array( $item, $skiplist ) ) :
                        continue;
                    endif;

                    $dotPosition = strpos( $item, '.' );

                    $identifier = substr( $item, 0, $dotPosition );

                    if( empty( $identifier ) ) :
                        continue;
                    endif;

                    if( !isset( $teamList[ $identifier ] ) ) :
                        $teamList[ $identifier ] = new stdClass();
                        $teamList[ $identifier ]->identifier = $identifier;
                    endif;

                    switch( substr( $item, $dotPosition + 1 ) ) :
                        case 'png':
                            $teamList[ $identifier ]->hasImage = true;
                            break;
                        case 'cfg':
                            $teamList[ $identifier ]->hasConfig = true;
                            $file = fopen( $item, 'r' );
                            $teamList[ $identifier ]->name = fread( $file, filesize( $item ) );
                            fclose( $file );
                            break;
                        case 'zip':
                            $teamList[ $identifier ]->hasZip = true;
                            break;
                    endswitch;
                endforeach;
                foreach( $teamList as $team ) :
                    if( !isset( $team->hasImage ) || !$team->hasImage ) :
                        continue;
                    endif;
                    ?>
                    <tr>
                        <td>
                            <?php
                            if( $team->hasConfig ) :
                                echo $team->name;
                            else :
                                ?>
                                ???
                                <?php
                            endif;
                            ?>
                        </td>
                        <td>
                            <?php echo $team->identifier ?>
                        </td>
                        <td class="text-right">
                            <?php
                            if( $team->hasImage ) :
                                ?>
                                <a class="btn btn-sm btn-primary" href="<?php echo $team->identifier, '.png'; ?>">
                                    Download logo
                                </a>
                                <?php
                            endif;
                            ?>
                        </td>
                        <td class="text-right">
                            <?php
                            if( $team->hasConfig ) :
                                ?>
                                <a class="btn btn-sm btn-primary" href="<?php echo $team->identifier, '.cfg'; ?>">
                                    Download config
                                </a>
                                <?php
                            endif;
                            ?>
                        </td>
                        <td class="text-right">
                            <?php
                            if( $team->hasZip ) :
                                ?>
                                <a class="btn btn-sm btn-primary" href="<?php echo $team->identifier, '.zip'; ?>">
                                    Download zip with logo and config
                                </a>
                                <?php
                            endif;
                            ?>
                        </td>
                    </tr>
                    <?php<commit_msg>Additional improvement to the team-list display<commit_after><!DOCTYPE html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>
        CSGO Team In-game logos
    </title>
    <link href="//cdn.jsdelivr.net/bootswatch/3.3.1.2/paper/bootstrap.min.css" rel="stylesheet">
    <style>
        table tbody > tr > td.vertical-middle {
            vertical-align: middle;
        }
    </style>
</head>
<body>
    <div class="container">
        <h2>
            Available teams
            <a class="btn btn-primary pull-right" href="all.zip">
                Download zip with all teams
            </a>
        </h2>
        <table class="table table-hover">
            <tbody>
                <?php
                $items = scandir( '.' );
                $teamList = array();
                $skiplist = array( '.', '..', 'index.php' );
                foreach( $items as $item ) :
                    if( in_array( $item, $skiplist ) ) :
                        continue;
                    endif;

                    $dotPosition = strpos( $item, '.' );

                    $identifier = substr( $item, 0, $dotPosition );

                    if( empty( $identifier ) ) :
                        continue;
                    endif;

                    if( !isset( $teamList[ $identifier ] ) ) :
                        $teamList[ $identifier ] = new stdClass();
                        $teamList[ $identifier ]->identifier = $identifier;
                    endif;

                    switch( substr( $item, $dotPosition + 1 ) ) :
                        case 'png':
                            $teamList[ $identifier ]->hasImage = true;
                            break;
                        case 'cfg':
                            $teamList[ $identifier ]->hasConfig = true;
                            $file = fopen( $item, 'r' );
                            $teamList[ $identifier ]->name = fread( $file, filesize( $item ) );
                            fclose( $file );
                            break;
                        case 'zip':
                            $teamList[ $identifier ]->hasZip = true;
                            break;
                    endswitch;
                endforeach;
                foreach( $teamList as $team ) :
                    if( !isset( $team->hasImage ) || !$team->hasImage ) :
                        continue;
                    endif;
                    ?>
                    <tr>
                        <td class="vertical-middle">
                            <img src="<?php echo $team->identifier, '.png'; ?>">
                        </td>
                        <td>
                            <p class="lead">
                                <?php
                                if( $team->hasConfig ) :
                                    echo $team->name;
                                else :
                                    ?>
                                    ???
                                    <?php
                                endif;
                                ?>
                            </p>
                            <em>
                                <?php echo $team->identifier ?>
                            </em>
                        </td>
                        <td class="text-right vertical-middle">
                            <?php
                            if( $team->hasImage ) :
                                ?>
                                <a class="btn btn-sm btn-primary" href="<?php echo $team->identifier, '.png'; ?>">
                                    Download logo
                                </a>
                                <?php
                            endif;
                            ?>
                        </td>
                        <td class="text-right vertical-middle">
                            <?php
                            if( $team->hasConfig ) :
                                ?>
                                <a class="btn btn-sm btn-primary" href="<?php echo $team->identifier, '.cfg'; ?>">
                                    Download config
                                </a>
                                <?php
                            endif;
                            ?>
                        </td>
                        <td class="text-right vertical-middle">
                            <?php
                            if( $team->hasZip ) :
                                ?>
                                <a class="btn btn-sm btn-primary" href="<?php echo $team->identifier, '.zip'; ?>">
                                    Download zip with logo and config
                                </a>
                                <?php
                            endif;
                            ?>
                        </td>
                    </tr>
                    <?php
{'fraction_non_alphanumeric': 0.10937990170448604, 'fraction_numerical': 0.00209139391404371, 'mean_word_length': 0.6737836891844592, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 142, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2088177', 'n_tokens_mistral': 2209, 'n_tokens_neox': 2041, 'n_words': 462}