Skip to content

Instantly share code, notes, and snippets.

@kyamagu
Last active October 11, 2021 02:51
Show Gist options
  • Save kyamagu/145d1a90ea13c9267ecd14584c0e6202 to your computer and use it in GitHub Desktop.
Save kyamagu/145d1a90ea13c9267ecd14584c0e6202 to your computer and use it in GitHub Desktop.
ICCV 2021 ics file generator
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "reserved-ability",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: pandas in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (1.2.4)\r\n",
"Requirement already satisfied: ics in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (0.7)\r\n",
"Requirement already satisfied: python-dateutil>=2.7.3 in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (from pandas) (2.8.1)\r\n",
"Requirement already satisfied: pytz>=2017.3 in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (from pandas) (2021.1)\r\n",
"Requirement already satisfied: numpy>=1.16.5 in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (from pandas) (1.19.5)\r\n",
"Requirement already satisfied: arrow<0.15,>=0.11 in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (from ics) (0.14.7)\r\n",
"Requirement already satisfied: tatsu>4.2 in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (from ics) (4.4.0)\r\n",
"Requirement already satisfied: six>1.5 in /Users/a14824/.pyenv/versions/3.7.10/lib/python3.7/site-packages (from ics) (1.15.0)\r\n"
]
}
],
"source": [
"!pip install pandas ics"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "elementary-valuable",
"metadata": {},
"outputs": [],
"source": [
"from datetime import datetime\n",
"from dateutil import tz\n",
"\n",
"import ics\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "opened-lighting",
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>name</th>\n",
" <th>start</th>\n",
" <th>end</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Conference Opening/Awards</td>\n",
" <td>2021-10-12 08:00:00</td>\n",
" <td>2021-10-12 09:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Keynote 1</td>\n",
" <td>2021-10-12 09:00:00</td>\n",
" <td>2021-10-12 10:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Live Paper Session 1a</td>\n",
" <td>2021-10-12 10:00:00</td>\n",
" <td>2021-10-12 11:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Live Paper Session 2a</td>\n",
" <td>2021-10-12 11:00:00</td>\n",
" <td>2021-10-12 12:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Live Paper Session 3a</td>\n",
" <td>2021-10-12 12:00:00</td>\n",
" <td>2021-10-12 13:00:00</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" name start end\n",
"0 Conference Opening/Awards 2021-10-12 08:00:00 2021-10-12 09:00:00\n",
"1 Keynote 1 2021-10-12 09:00:00 2021-10-12 10:00:00\n",
"2 Live Paper Session 1a 2021-10-12 10:00:00 2021-10-12 11:00:00\n",
"3 Live Paper Session 2a 2021-10-12 11:00:00 2021-10-12 12:00:00\n",
"4 Live Paper Session 3a 2021-10-12 12:00:00 2021-10-12 13:00:00"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.read_csv(\"iccv2021.csv\", header=None, names=[\"name\", \"start\", \"end\"], parse_dates=[1, 2])\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "catholic-blocking",
"metadata": {},
"outputs": [],
"source": [
"calendar = ics.Calendar()\n",
"for _, name, start, end in df.itertuples():\n",
" e = ics.Event()\n",
" e.name = name\n",
" e.begin = start.tz_localize(tz.gettz('America/New York')).tz_convert(tz.UTC).isoformat()\n",
" e.end = end.tz_localize(tz.gettz('America/New York')).tz_convert(tz.UTC).isoformat()\n",
" calendar.events.add(e)\n",
" \n",
"with open('iccv2021.ics', 'w') as f:\n",
" f.writelines(calendar)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "positive-hours",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Conference Opening/Awards 2021/10/12 8:00 2021/10/12 9:00
Keynote 1 2021/10/12 9:00 2021/10/12 10:00
Live Paper Session 1a 2021/10/12 10:00 2021/10/12 11:00
Live Paper Session 2a 2021/10/12 11:00 2021/10/12 12:00
Live Paper Session 3a 2021/10/12 12:00 2021/10/12 13:00
Exhibitor Sessions 2021/10/12 13:00 2021/10/12 15:00
Live Paper Session 4a 2021/10/12 15:00 2021/10/12 16:00
Live Paper Session 5a 2021/10/12 16:00 2021/10/12 17:00
Live Paper Session 6a 2021/10/12 17:00 2021/10/12 18:00
PAMI TC meeting 2021/10/12 18:00 2021/10/12 20:00
Social Events/Meetups 1 2021/10/12 20:00 2021/10/12 22:00
Live Paper Session 7a 2021/10/13 8:00 2021/10/13 9:00
Live Paper Session 8a 2021/10/13 9:00 2021/10/13 10:00
Live Paper Session 9a 2021/10/13 10:00 2021/10/13 11:00
Exhibitor Sessions 2021/10/13 11:00 2021/10/13 14:00
Social Events/Meetups 2 2021/10/13 14:00 2021/10/13 16:00
Panel 1 - Old school/New school 2021/10/13 16:00 2021/10/13 17:00
Live Paper Session 10a 2021/10/13 17:00 2021/10/13 18:00
Live Paper Session 11a 2021/10/13 18:00 2021/10/13 19:00
Live Paper Session 12a 2021/10/13 19:00 2021/10/13 20:00
Social Events/Meetups 3 2021/10/13 20:00 2021/10/13 22:00
Live Paper Session 4b 2021/10/14 8:00 2021/10/14 9:00
Live Paper Session 5b 2021/10/14 9:00 2021/10/14 10:00
Live Paper Session 6b 2021/10/14 10:00 2021/10/14 11:00
Panel 2 - Data security/Deepfakes 2021/10/14 11:00 2021/10/14 12:00
Doctoral Consortium 2021/10/14 12:00 2021/10/14 17:00
Live Paper Session 1b 2021/10/14 17:00 2021/10/14 18:00
Live Paper Session 2b 2021/10/14 18:00 2021/10/14 19:00
Live Paper Session 3b 2021/10/14 19:00 2021/10/14 20:00
Social Events/Meetups 4 2021/10/14 20:00 2021/10/14 22:00
Social Events/Meetups 5 2021/10/15 8:00 2021/10/15 10:00
Live Paper Session 10b 2021/10/15 10:00 2021/10/15 11:00
Live Paper Session 11b 2021/10/15 11:00 2021/10/15 12:00
Live Paper Session 12b 2021/10/15 12:00 2021/10/15 13:00
Keynote 2 2021/10/15 13:00 2021/10/15 14:00
Panel 3 - Industry and CV 2021/10/15 14:00 2021/10/15 15:00
Live Paper Session 7b 2021/10/15 15:00 2021/10/15 16:00
Live Paper Session 8b 2021/10/15 16:00 2021/10/15 17:00
Live Paper Session 9b 2021/10/15 17:00 2021/10/15 18:00
Conference Closing 2021/10/15 18:00 2021/10/15 19:00
BEGIN:VCALENDAR
VERSION:2.0
PRODID:ics.py - http://git.io/lLljaA
BEGIN:VEVENT
DTEND:20211014T020000Z
DTSTART:20211014T000000Z
SUMMARY:Social Events/Meetups 3
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T220000Z
DTSTART:20211014T210000Z
SUMMARY:Live Paper Session 1b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T210000Z
DTSTART:20211013T200000Z
SUMMARY:Panel 1 - Old school/New school
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T020000Z
DTSTART:20211013T000000Z
SUMMARY:Social Events/Meetups 1
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T140000Z
DTSTART:20211015T120000Z
SUMMARY:Social Events/Meetups 5
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T210000Z
DTSTART:20211015T200000Z
SUMMARY:Live Paper Session 8b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T170000Z
DTSTART:20211012T160000Z
SUMMARY:Live Paper Session 3a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T020000Z
DTSTART:20211015T000000Z
SUMMARY:Social Events/Meetups 4
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T170000Z
DTSTART:20211015T160000Z
SUMMARY:Live Paper Session 12b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T220000Z
DTSTART:20211013T210000Z
SUMMARY:Live Paper Session 10a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T160000Z
DTSTART:20211015T150000Z
SUMMARY:Live Paper Session 11b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T210000Z
DTSTART:20211014T160000Z
SUMMARY:Doctoral Consortium
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T180000Z
DTSTART:20211015T170000Z
SUMMARY:Keynote 2
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T000000Z
DTSTART:20211013T230000Z
SUMMARY:Live Paper Session 12a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T130000Z
DTSTART:20211012T120000Z
SUMMARY:Conference Opening/Awards
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T230000Z
DTSTART:20211015T220000Z
SUMMARY:Conference Closing
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T230000Z
DTSTART:20211013T220000Z
SUMMARY:Live Paper Session 11a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T140000Z
DTSTART:20211012T130000Z
SUMMARY:Keynote 1
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T200000Z
DTSTART:20211015T190000Z
SUMMARY:Live Paper Session 7b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T200000Z
DTSTART:20211012T190000Z
SUMMARY:Live Paper Session 4a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T150000Z
DTSTART:20211015T140000Z
SUMMARY:Live Paper Session 10b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T180000Z
DTSTART:20211013T150000Z
SUMMARY:Exhibitor Sessions
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T150000Z
DTSTART:20211014T140000Z
SUMMARY:Live Paper Session 6b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T190000Z
DTSTART:20211015T180000Z
SUMMARY:Panel 3 - Industry and CV
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T220000Z
DTSTART:20211015T210000Z
SUMMARY:Live Paper Session 9b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T160000Z
DTSTART:20211014T150000Z
SUMMARY:Panel 2 - Data security/Deepfakes
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T160000Z
DTSTART:20211012T150000Z
SUMMARY:Live Paper Session 2a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T130000Z
DTSTART:20211014T120000Z
SUMMARY:Live Paper Session 4b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T210000Z
DTSTART:20211012T200000Z
SUMMARY:Live Paper Session 5a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T150000Z
DTSTART:20211012T140000Z
SUMMARY:Live Paper Session 1a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T190000Z
DTSTART:20211012T170000Z
SUMMARY:Exhibitor Sessions
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T150000Z
DTSTART:20211013T140000Z
SUMMARY:Live Paper Session 9a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T230000Z
DTSTART:20211014T220000Z
SUMMARY:Live Paper Session 2b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T000000Z
DTSTART:20211014T230000Z
SUMMARY:Live Paper Session 3b
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T000000Z
DTSTART:20211012T220000Z
SUMMARY:PAMI TC meeting
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T220000Z
DTSTART:20211012T210000Z
SUMMARY:Live Paper Session 6a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T130000Z
DTSTART:20211013T120000Z
SUMMARY:Live Paper Session 7a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T200000Z
DTSTART:20211013T180000Z
SUMMARY:Social Events/Meetups 2
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T140000Z
DTSTART:20211013T130000Z
SUMMARY:Live Paper Session 8a
UID:[email protected]
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T140000Z
DTSTART:20211014T130000Z
SUMMARY:Live Paper Session 5b
UID:[email protected]
END:VEVENT
END:VCALENDAR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment