Commit 685967b3 by Prayush Kumar

Add notebook to allocated limited office spaces

parent 25b51de0
Showing with 113 additions and 0 deletions
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"import datetime\n",
"\n",
"# Set RNG seed using Sep 13, 2023 12 noon\n",
"random.seed(int(datetime.datetime(2023, 9, 13, 12, 0, 0, 0).timestamp()))"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"students = [\n",
" 'Aditya Laxmikant Thorat',\n",
" 'Priyadharshini V',\n",
" 'S Viswanathan',\n",
" 'Alorika Kar',\n",
" 'Chandranathan Anandavijayan',\n",
" 'Harsh Nigam',\n",
" 'Koustav Narayan Maity',\n",
" 'Priyangshu Goswami',\n",
" 'Ritwick Kumar Ghosh',\n",
" 'Rishabh Kaushik',\n",
" 'Santhiya P S',\n",
" 'Abhinav Yadav',\n",
" 'Aiswarya N S',\n",
" 'Anikat Kankaria',\n",
" 'Atharva Sanjay Naik',\n",
" 'Bibek Saha',\n",
" 'Devanshi Parashar',\n",
" 'Kunal Kumar',\n",
" 'Manish Jain',\n",
" 'Neha Sharma',\n",
" 'Priyanka Sinha',\n",
" 'Sunit Ranjan Banerjee',\n",
" 'Swapan Limbu'\n",
"]\n",
"students = sorted(students) # sort alphabetically\n",
"\n",
"offices = [\n",
" 'G101',\n",
" 'G104',\n",
" 'G104',\n",
" 'G105',\n",
" 'H106'\n",
"]\n",
"offices = sorted(offices)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"selected_students = random.sample(students, k=len(offices))\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Assign office G101 to Priyanka Sinha\n",
"Assign office G104 to S Viswanathan\n",
"Assign office G104 to Koustav Narayan Maity\n",
"Assign office G105 to Atharva Sanjay Naik\n",
"Assign office H106 to Neha Sharma\n"
]
}
],
"source": [
"for office, student in zip(offices, selected_students):\n",
" print(f\"Assign office {office} to {student}\")"
]
}
],
"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.8.16"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment