Skip to content

Commit

Permalink
Deployed af37fc2 with MkDocs version: 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Nov 4, 2024
0 parents commit fe214d7
Show file tree
Hide file tree
Showing 908 changed files with 411,268 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
1,133 changes: 1,133 additions & 0 deletions 404.html

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions _data/generate_dates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
from datetime import datetime, date, timedelta
import yaml

def daterange(start_date, end_date):
for n in range(int((end_date - start_date).days)):
yield start_date + timedelta(n)

def get_input_datetime(prompt):
while True:
try:
print(prompt)
input_date = input().split("/")
return datetime(int(input_date[2]), int(input_date[0]), int(input_date[1]))
except IndexError as e:
print(f"Error occurred in processing date input: {e}")
pass

start_date = get_input_datetime("Enter semester start date (mm/dd/yyyy):")
end_date = get_input_datetime("Enter semester end date (mm/dd/yyyy):")

dict_file = []
for single_date in daterange(start_date, end_date):
if (single_date.weekday() > 4):
continue

str_date = single_date.strftime("%a %b %d")
dict_file.append({
"date": str_date,
"lecture": {
"name": "",
"link": ""
},
"recitation": {
"name": "",
"slides": "",
"handout": "",
"quiz": ""
},
"reading": {
"name": "",
"link": ""
},
"homework": {
"name": "",
"deadline": "",
"link": "",
"numDays": 0
}
})

class LineBreakDumper(yaml.SafeDumper):
# Reference: https://github.com/yaml/pyyaml/issues/127
def write_line_break(self, data=None):
super().write_line_break(data)

if len(self.indents) == 1:
super().write_line_break()

with open(r'schedule.yaml', 'w') as file:
yaml.dump(dict_file, file, Dumper=LineBreakDumper, default_flow_style=False)
11 changes: 11 additions & 0 deletions _data/links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- name: Canvas
link: https://canvas.cmu.edu/
icon: assets/images/logos/canvas.png

- name: Slack
link: https://slack.com/
icon: assets/images/logos/slack.png

- name: Gradescope
link: https://www.gradescope.com/
icon: assets/images/logos/gradescope.png
Loading

0 comments on commit fe214d7

Please sign in to comment.