<commit_before>import React from 'react';
import classes from './Schedule.scss';
import eventInfoClasses from 'components/EventInfo/EventInfo.scss';
import ScheduleElement from 'components/ScheduleElement';
import { Col, Row } from 'react-bootstrap';

const data = [
  {
    // Months are zero-indexed for whatever reason
    // This is a historical artifact from the Java (yes, Java) APIs
    date: new Date(2018, 9, 13),
    events: [
      {
        time: '9:00AM - 10:45AM',
        name: 'Check-In',
        locations: ['Schiciano Atrium']
      },
      {
        time: '11:00AM - 12:30PM',
        name: 'Opening Ceremony',
        locations: ['Reynolds Theatre']
      },
      {
        time: '1:00PM - 2:00PM',
        name: 'Lunch',
        locations: ['Schiciano Atrium']
      },
      { time: '2:00PM', name: 'Hacking Commences' },
      {
        time: '2:00PM - 2:30PM',
        name: '<NAME>ation Mixer',
        locations: ['CIEMAS']
      },
      {
        time: '2:00PM - 8:00PM',
        name: 'Frisbee, Football, Volleyball',
        locations: ['Harrington Quad']
      },
      {
        time: '2:30PM - 3:30PM',
        name: 'Arduino Workshop by <NAME>',
        locations: ['Hudson 201']
      },
      {
        time: '2:30PM - 3:30PM',
        name: 'VR Workshop by <NAME>',
        locations: ['Hudson 232']
      },
      {
        time: '3:00PM - 4:30PM',
        name: 'Javascript Workshop by Co-Lab',
        locations: ['Hudson 216']
      },
      {
        time: '3:00PM - 5:00PM',
        name: 'Puppies!!!!!',
        locations: ['Harrington Quad']
      },
      {
        time: '4:30PM - 5:30PM',
        name: 'API Workshop by <NAME>',
        locations: ['Hudson 115A']
      },
      {
        time: '4:45PM - 6:15PM',
        name: 'Mobile Workshop by Co-Lab',
        locations: ['Hudson 216']
      },
      {
        time: '6:30PM - 8:00PM',
        name: 'Dinner',
        locations: ['Schiciano Atrium']
      },
      {
        time: '8:00PM - 9:00PM',
        name: '<NAME>',
        locations: ['CIEMAS 1st floor']
      },
      {
        time: '9:00PM - 10:00PM',
        name: 'Mixer for Female-Identifying and Non-Binary Hackers',
        locations: ['Innovation Co-Lab']
      },
      {
        time: '9:00PM - 10:00PM',
        name: '<NAME>',
        locations: ['CoLab']
      },
      {
        time: '10:00PM - 11:00PM',
        name: '<NAME>',
        locations: ["Twinnie's 2nd Floor"]
      },
      {
        time: '11:00PM - 11:45PM',
        name: 'Spicy Noodle Challenge',
        locations: ['Schiciano Atrium']
      }
    ]
  },
  {
    date: new Date(2018, 9, 14),
    events: [
      {
        time: '12:00AM - 8:00AM',
        name: 'Midnight Snacks',
        locations: ["Twinnie's"]
      },
      {
        time: '9:00AM - 9:45AM',
        name: 'Breakfast',
        locations: ['Schiciano Atrium']
      },
      {
        time: '11:00AM - 12:00PM',
        name: 'Turning Hack into Startup by <NAME>',
        locations: ['Hudson 222']
      },
      {
        time: '12:00PM - 1:30PM',
        name: 'Lunch',
        locations: ['Schiciano Atrium']
      },
      { time: '1:30PM', name: 'Hacking Ends' },
      { time: '2:00PM', name: 'Judging Begins' },
      {
        time: '2:00PM - 2:45PM',
        name: 'First Round Judging',
        locations: ['CIEMAS Lobby']
      },
      {
        time: '2:45PM - 3:30PM',
        name: 'Finalist Demos',
        locations: ['CIEMAS Lobby']
      },
      {
        time: '3:30PM - 4:00PM',
        name: 'Final Judging',
        locations: ['CIEMAS Lobby']
      },
      {
        time: '4:00PM',
        name: 'HackDuke Ends'
      },
      {
        time: '4:30PM - 5:30PM',
        name: 'Closing Ceremony',
        locations: ['Reynolds Theatre']
      },
      {
        time: '6:00PM',
        name: 'VTech Bus Leaves',
        locations: ['Science Drive']
      }
    ]
  }
];

const formatDate = date => {
  const dayOfWeek = date.toLocaleDateString('en-US', {
    weekday: 'short'
  });
  return `${dayOfWeek} ${date.getMonth() + 1}/${date.getDate()}`;
};

class Schedule extends React.Component {
  render() {
    return (
      <div>
        <div className={eventInfoClasses.container}>
          <div className={eventInfoClasses.title}>SCHEDULE</div>
          <Row>
            {data.map(({ date, events }, dayIndex) => (
              <Col md={6} key={date}>
                <div
                  className={
                    dayIndex === 0
                      ? classes.leftColumnContainer
                      : classes.rightColumnContainer
                  }
                >
                  <div className={classes.dateHeader}>{formatDate(date)}</div>
                  <div className={classes.contentContainer}>
                    {events.map(({ time, name, locations }, index) => {
                      let [startTime, endTime] = time.split(' - ');
                      startTime += ' -';
                      return (
                        <ScheduleElement
                          startTime={startTime}
                          key={index}
                          endTime={endTime}
                          title={name}
                          location={locations && locations[0]}<commit_msg>Schedule display bugfix<commit_after>import React from 'react';
import classes from './Schedule.scss';
import eventInfoClasses from 'components/EventInfo/EventInfo.scss';
import ScheduleElement from 'components/ScheduleElement';
import { Col, Row } from 'react-bootstrap';

const data = [
  {
    // Months are zero-indexed for whatever reason
    // This is a historical artifact from the Java (yes, Java) APIs
    date: new Date(2018, 9, 13),
    events: [
      {
        time: '9:00AM - 10:45AM',
        name: 'Check-In',
        locations: ['Schiciano Atrium']
      },
      {
        time: '11:00AM - 12:30PM',
        name: 'Opening Ceremony',
        locations: ['Reynolds Theatre']
      },
      {
        time: '1:00PM - 2:00PM',
        name: 'Lunch',
        locations: ['Schiciano Atrium']
      },
      { time: '2:00PM', name: 'Hacking Commences' },
      {
        time: '2:00PM - 2:30PM',
        name: '<NAME>',
        locations: ['CIEMAS']
      },
      {
        time: '2:00PM - 8:00PM',
        name: 'Frisbee, Football, Volleyball',
        locations: ['Harrington Quad']
      },
      {
        time: '2:30PM - 3:30PM',
        name: 'Arduino Workshop by <NAME>',
        locations: ['Hudson 201']
      },
      {
        time: '2:30PM - 3:30PM',
        name: 'VR Workshop by <NAME>',
        locations: ['Hudson 232']
      },
      {
        time: '3:00PM - 4:30PM',
        name: 'Javascript Workshop by Co-Lab',
        locations: ['Hudson 216']
      },
      {
        time: '3:00PM - 5:00PM',
        name: 'Puppies!!!!!',
        locations: ['Harrington Quad']
      },
      {
        time: '4:30PM - 5:30PM',
        name: 'API Workshop by <NAME>',
        locations: ['Hudson 115A']
      },
      {
        time: '4:45PM - 6:15PM',
        name: 'Mobile Workshop by Co-Lab',
        locations: ['Hudson 216']
      },
      {
        time: '6:30PM - 8:00PM',
        name: 'Dinner',
        locations: ['Schiciano Atrium']
      },
      {
        time: '8:00PM - 9:00PM',
        name: '<NAME>',
        locations: ['CIEMAS 1st floor']
      },
      {
        time: '9:00PM - 10:00PM',
        name: 'Mixer for Female-Identifying and Non-Binary Hackers',
        locations: ['Innovation Co-Lab']
      },
      {
        time: '9:00PM - 10:00PM',
        name: '<NAME>',
        locations: ['CoLab']
      },
      {
        time: '10:00PM - 11:00PM',
        name: '<NAME>',
        locations: ["Twinnie's 2nd Floor"]
      },
      {
        time: '11:00PM - 11:45PM',
        name: 'Spicy Noodle Challenge',
        locations: ['Schiciano Atrium']
      }
    ]
  },
  {
    date: new Date(2018, 9, 14),
    events: [
      {
        time: '12:00AM - 8:00AM',
        name: '<NAME>',
        locations: ["Twinnie's"]
      },
      {
        time: '9:00AM - 9:45AM',
        name: 'Breakfast',
        locations: ['Schiciano Atrium']
      },
      {
        time: '11:00AM - 12:00PM',
        name: 'Turning Hack into Startup by <NAME>',
        locations: ['Hudson 222']
      },
      {
        time: '12:00PM - 1:30PM',
        name: 'Lunch',
        locations: ['Schiciano Atrium']
      },
      { time: '1:30PM', name: 'Hacking Ends' },
      { time: '2:00PM', name: 'Judging Begins' },
      {
        time: '2:00PM - 2:45PM',
        name: 'First Round Judging',
        locations: ['CIEMAS Lobby']
      },
      {
        time: '2:45PM - 3:30PM',
        name: 'Finalist Demos',
        locations: ['CIEMAS Lobby']
      },
      {
        time: '3:30PM - 4:00PM',
        name: 'Final Judging',
        locations: ['CIEMAS Lobby']
      },
      {
        time: '4:00PM',
        name: 'HackDuke Ends'
      },
      {
        time: '4:30PM - 5:30PM',
        name: 'Closing Ceremony',
        locations: ['Reynolds Theatre']
      },
      {
        time: '6:00PM',
        name: 'VTech Bus Leaves',
        locations: ['Science Drive']
      }
    ]
  }
];

const formatDate = date => {
  const dayOfWeek = date.toLocaleDateString('en-US', {
    weekday: 'short'
  });
  return `${dayOfWeek} ${date.getMonth() + 1}/${date.getDate()}`;
};

class Schedule extends React.Component {
  render() {
    return (
      <div>
        <div className={eventInfoClasses.container}>
          <div className={eventInfoClasses.title}>SCHEDULE</div>
          <Row>
            {data.map(({ date, events }, dayIndex) => (
              <Col md={6} key={date}>
                <div
                  className={
                    dayIndex === 0
                      ? classes.leftColumnContainer
                      : classes.rightColumnContainer
                  }
                >
                  <div className={classes.dateHeader}>{formatDate(date)}</div>
                  <div className={classes.contentContainer}>
                    {events.map(({ time, name, locations }, index) => {
                      let [startTime, endTime] = time.split(' - ');
                      if (endTime) startTime += ' -';
                      return (
                        <ScheduleElement
                          startTime={startTime}
                          key={index}
                          endTime={endTime}
                          title={name}
                          location={locations && locations[0]}
{'fraction_non_alphanumeric': 0.15135135135135136, 'fraction_numerical': 0.04096728307254623, 'mean_word_length': 1.536925667548713, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 46, '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': '5507842', 'n_tokens_mistral': 3641, 'n_tokens_neox': 3305, 'n_words': 753}