Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Prayush Kumar
/
icts-housing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
685967b3
authored
Sep 13, 2023
by
Prayush Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add notebook to allocated limited office spaces
parent
25b51de0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
113 additions
and
0 deletions
2023__office_space_allocation.ipynb
2023__office_space_allocation.ipynb
0 → 100644
View file @
685967b3
{
"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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment