<commit_before><?php
require_once '../vendor/autoload.php';

use ICal\ICal;

$ical = new ICal('MyCal.ics');

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">
    <title>PHP ICS Parser example</title>
    <style>.caption { overflow-x: scroll }</style>
</head>
<body style="background-color: #eee">
<div class="container">
    <h3>PHP ICS Parser example</h3>
    <ul class="list-group">
        <li class="list-group-item">
            <span class="badge"><?php echo $ical->eventCount ?></span>
            The number of events
        </li>
        <li class="list-group-item">
            <span class="badge"><?php echo $ical->todoCount ?></span>
            The number of todos
        </li>
    </ul>

    <h4>Events March through April:</h4>
    <div class="row">
    <?php
    $events = $ical->eventsFromRange('2016-03-01', '2016-04-31');
    foreach ($events as $event) : ?>
        <div class="col-sm-6 col-md-4">
            <div class="thumbnail">
                <div class="caption">
                    <h3><?php echo $event->summary . ' (' . date('d-m-Y H:i', $ical->iCalDateToUnixTimestamp($event->dtstart)) . ')' ?></h3>
                    <p>SUMMARY: <?php echo $event->summary ?></p>
                    <p>DTSTART: <?php echo $event->dtstart ?></p>
                    <p>DTEND: <?php echo $event->dtend ?></p>
                    <p>DURATION: <?php echo $event->duration ?></p>
                    <p>DTSTAMP: <?php echo $event->dtstamp ?></p>
                    <p>UID: <?php echo $event->uid ?></p>
                    <p>CREATED: <?php echo $event->created ?></p>
                    <p>LAST-MODIFIED: <?php echo $event->lastmodified ?></p>
                    <p>DESCRIPTION: <?php echo $event->description ?></p>
                    <p>LOCATION: <?php echo $event->location ?></p>
                    <p>SEQUENCE: <?php echo $event->sequence ?></p>
                    <p>STATUS: <?php echo $event->status ?></p>
                    <p>TRANSP: <?php echo $event->transp ?></p>
                    <p>ORGANIZER: <?php echo $event->organizer ?></p>
                    <p>ATTENDEE(S): <?php echo $event->attendee ?></p>
                </div>
            </div>
        </div>
    <?php
    endforeach
    ?>
    </div>

    <h4>All Events:</h4>
    <div class="row">
    <?php
    $events = $ical->events();
    foreach ($events as $event) : ?>
        <div class="col-sm-6 col-md-4">
            <div class="thumbnail">
                <div class="caption">
                    <h3><?php echo $event->summary . ' (' . date('d-m-Y H:i', $ical->iCalDateToUnixTimestamp($event->dtstart)) . ')' ?></h3>
                    <p>SUMMARY: <?php echo $event->summary ?></p>
                    <p>DTSTART: <?php echo $event->dtstart ?></p>
                    <p>DTEND: <?php echo $event->dtend ?></p>
                    <p>DURATION: <?php echo $event->duration ?></p>
                    <p>DTSTAMP: <?php echo $event->dtstamp ?></p><commit_msg>Only show headings if Event data exists Minor tweak to styling<commit_after><?php
require_once '../vendor/autoload.php';

use ICal\ICal;

$ical = new ICal('MyCal.ics');

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">
    <title>PHP ICS Parser example</title>
    <style>.caption { overflow-x: auto }</style>
</head>
<body style="background-color: #eee">
<div class="container">
    <h3>PHP ICS Parser example</h3>
    <ul class="list-group">
        <li class="list-group-item">
            <span class="badge"><?php echo $ical->eventCount ?></span>
            The number of events
        </li>
        <li class="list-group-item">
            <span class="badge"><?php echo $ical->todoCount ?></span>
            The number of todos
        </li>
    </ul>

    <?php
        $events = $ical->eventsFromRange('2016-03-01', '2016-04-31');
        if ($events) echo '<h4>Events March through April:</h4>';
    ?>
    <div class="row">
    <?php
    foreach ($events as $event) : ?>
        <div class="col-sm-6 col-md-4">
            <div class="thumbnail">
                <div class="caption">
                    <h3><?php echo $event->summary . ' (' . date('d-m-Y H:i', $ical->iCalDateToUnixTimestamp($event->dtstart)) . ')' ?></h3>
                    <p>SUMMARY: <?php echo $event->summary ?></p>
                    <p>DTSTART: <?php echo $event->dtstart ?></p>
                    <p>DTEND: <?php echo $event->dtend ?></p>
                    <p>DURATION: <?php echo $event->duration ?></p>
                    <p>DTSTAMP: <?php echo $event->dtstamp ?></p>
                    <p>UID: <?php echo $event->uid ?></p>
                    <p>CREATED: <?php echo $event->created ?></p>
                    <p>LAST-MODIFIED: <?php echo $event->lastmodified ?></p>
                    <p>DESCRIPTION: <?php echo $event->description ?></p>
                    <p>LOCATION: <?php echo $event->location ?></p>
                    <p>SEQUENCE: <?php echo $event->sequence ?></p>
                    <p>STATUS: <?php echo $event->status ?></p>
                    <p>TRANSP: <?php echo $event->transp ?></p>
                    <p>ORGANIZER: <?php echo $event->organizer ?></p>
                    <p>ATTENDEE(S): <?php echo $event->attendee ?></p>
                </div>
            </div>
        </div>
    <?php
    endforeach
    ?>
    </div>

    <?php if ($events) echo '<h4>All Events:</h4>' ?>
    <div class="row">
    <?php
    $events = $ical->events();
    foreach ($events as $event) : ?>
        <div class="col-sm-6 col-md-4">
            <div class="thumbnail">
                <div class="caption">
                    <h3><?php echo $event->summary . ' (' . date('d-m-Y H:i', $ical->iCalDateToUnixTimestamp($event->dtstart)) . ')' ?></h3>
                    <p>SUMMARY: <?php echo $event->summary ?></p>
                    <p>DTSTART: <?php echo $event->dtstart ?></p>
                    <p>DTEND: <?php echo $event->dtend ?></p>
                    <p>DURATION: <?php echo $event->duration ?></p>
                    <p>DTSTAMP: <?php echo $event->dtstamp ?></p>
{'fraction_non_alphanumeric': 0.19688079061148858, 'fraction_numerical': 0.010500308832612723, 'mean_word_length': 1.9083969465648856, 'pattern_counts': {'":': 0, '<': 233, '<?xml version=': 0, '>': 293, 'https://': 2, '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': '66609', 'n_tokens_mistral': 2113, 'n_tokens_neox': 2072, 'n_words': 475}