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:bf393899-9ccf-4a42-9195-087e3d5cc6f2@bf39.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T220000Z
DTSTART:20211014T210000Z
SUMMARY:Live Paper Session 1b
UID:3699da2d-c755-4417-92f1-676b6ba01868@3699.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T210000Z
DTSTART:20211013T200000Z
SUMMARY:Panel 1 - Old school/New school
UID:139ed8de-c2c4-446e-b2c5-70d1b5408abd@139e.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T020000Z
DTSTART:20211013T000000Z
SUMMARY:Social Events/Meetups 1
UID:a2cc2880-a003-4b67-8c15-119547046620@a2cc.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T140000Z
DTSTART:20211015T120000Z
SUMMARY:Social Events/Meetups 5
UID:1e852ccf-0f7b-4321-8187-9b7d04dec5fa@1e85.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T210000Z
DTSTART:20211015T200000Z
SUMMARY:Live Paper Session 8b
UID:e680e18e-f9d6-4b33-bf7d-f8bd645590d9@e680.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T170000Z
DTSTART:20211012T160000Z
SUMMARY:Live Paper Session 3a
UID:64620799-1b6f-40c6-8ced-743654f757f9@6462.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T020000Z
DTSTART:20211015T000000Z
SUMMARY:Social Events/Meetups 4
UID:3ea9da6a-9d87-419e-88d9-927bf8d3e622@3ea9.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T170000Z
DTSTART:20211015T160000Z
SUMMARY:Live Paper Session 12b
UID:f8ddf3ba-3cfe-412b-85d7-9f17f08cb714@f8dd.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T220000Z
DTSTART:20211013T210000Z
SUMMARY:Live Paper Session 10a
UID:b0ec9f9b-655e-4ffe-87e0-eedd81276573@b0ec.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T160000Z
DTSTART:20211015T150000Z
SUMMARY:Live Paper Session 11b
UID:26cd5aa8-95ca-493f-a13e-d8f469b856ae@26cd.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T210000Z
DTSTART:20211014T160000Z
SUMMARY:Doctoral Consortium
UID:b0b0f152-3728-4f31-8ea1-92c3b5174df6@b0b0.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T180000Z
DTSTART:20211015T170000Z
SUMMARY:Keynote 2
UID:5e1c2fe7-ac05-49ea-8410-bfbb70edf1d8@5e1c.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T000000Z
DTSTART:20211013T230000Z
SUMMARY:Live Paper Session 12a
UID:0b0a371a-4d7d-443e-9542-b3f38ce4af9e@0b0a.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T130000Z
DTSTART:20211012T120000Z
SUMMARY:Conference Opening/Awards
UID:039d6eb3-63b5-4016-83ce-03c980662174@039d.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T230000Z
DTSTART:20211015T220000Z
SUMMARY:Conference Closing
UID:26e2f3ae-071a-488b-a465-d26233b93e42@26e2.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T230000Z
DTSTART:20211013T220000Z
SUMMARY:Live Paper Session 11a
UID:53a8edd4-5f78-49cb-a275-ebb92bd9bf03@53a8.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T140000Z
DTSTART:20211012T130000Z
SUMMARY:Keynote 1
UID:351b1595-7a51-45f6-ba1a-cbad776c0b12@351b.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T200000Z
DTSTART:20211015T190000Z
SUMMARY:Live Paper Session 7b
UID:5f312fa5-e21c-4b6e-b309-56448d9ca1aa@5f31.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T200000Z
DTSTART:20211012T190000Z
SUMMARY:Live Paper Session 4a
UID:e8b9f1da-fee7-4dbb-be21-aa0158d0d6a5@e8b9.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T150000Z
DTSTART:20211015T140000Z
SUMMARY:Live Paper Session 10b
UID:8046093c-16c2-4404-bf13-c223e7858ab0@8046.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T180000Z
DTSTART:20211013T150000Z
SUMMARY:Exhibitor Sessions
UID:dc3581c9-4fcb-42ea-b1f2-663754f29185@dc35.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T150000Z
DTSTART:20211014T140000Z
SUMMARY:Live Paper Session 6b
UID:3fd3adef-93db-493d-afbc-601522b689c9@3fd3.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T190000Z
DTSTART:20211015T180000Z
SUMMARY:Panel 3 - Industry and CV
UID:f5f9af14-187c-450a-b46d-9bae468014cb@f5f9.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T220000Z
DTSTART:20211015T210000Z
SUMMARY:Live Paper Session 9b
UID:01f676a7-9dc0-4210-a9c6-16a1135c5ffc@01f6.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T160000Z
DTSTART:20211014T150000Z
SUMMARY:Panel 2 - Data security/Deepfakes
UID:ac995751-4e21-4aa8-ada9-24820d3092da@ac99.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T160000Z
DTSTART:20211012T150000Z
SUMMARY:Live Paper Session 2a
UID:361f6947-e0c4-4bfc-8c4d-a4c764fa6f97@361f.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T130000Z
DTSTART:20211014T120000Z
SUMMARY:Live Paper Session 4b
UID:d9c68e47-a87a-4b38-a00f-a01580564a1d@d9c6.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T210000Z
DTSTART:20211012T200000Z
SUMMARY:Live Paper Session 5a
UID:511f50b7-4d82-4fee-8307-471a52439bb2@511f.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T150000Z
DTSTART:20211012T140000Z
SUMMARY:Live Paper Session 1a
UID:b2b9da42-330e-4789-bf84-67ef2c307958@b2b9.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T190000Z
DTSTART:20211012T170000Z
SUMMARY:Exhibitor Sessions
UID:1f6603ff-51a5-4c08-8e3b-ea242855b4fc@1f66.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T150000Z
DTSTART:20211013T140000Z
SUMMARY:Live Paper Session 9a
UID:1193fff2-e332-4f38-be81-259fe087ae39@1193.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T230000Z
DTSTART:20211014T220000Z
SUMMARY:Live Paper Session 2b
UID:7a348772-7dd2-448f-a15f-340b99fa3e10@7a34.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211015T000000Z
DTSTART:20211014T230000Z
SUMMARY:Live Paper Session 3b
UID:19a67967-2def-44ed-adf0-7677a4a7adb8@19a6.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T000000Z
DTSTART:20211012T220000Z
SUMMARY:PAMI TC meeting
UID:2677d21e-dd5e-4d07-9aa7-d643a68b50ff@2677.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211012T220000Z
DTSTART:20211012T210000Z
SUMMARY:Live Paper Session 6a
UID:117d5e4d-1bcc-4494-a952-e57ef9eba4ec@117d.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T130000Z
DTSTART:20211013T120000Z
SUMMARY:Live Paper Session 7a
UID:1a679351-b33d-4991-ab2e-3d366338c8d3@1a67.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T200000Z
DTSTART:20211013T180000Z
SUMMARY:Social Events/Meetups 2
UID:f13a261f-f85b-4159-a6f7-f86c339af0ce@f13a.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211013T140000Z
DTSTART:20211013T130000Z
SUMMARY:Live Paper Session 8a
UID:569b6c89-c0e0-4b78-8f3b-a3a1916f4f04@569b.org
END:VEVENT
BEGIN:VEVENT
DTEND:20211014T140000Z
DTSTART:20211014T130000Z
SUMMARY:Live Paper Session 5b
UID:3d3e2a74-2cd2-46fe-a124-4252f1a684f6@3d3e.org
END:VEVENT
END:VCALENDAR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment