Skip to content

Instantly share code, notes, and snippets.

@yuvipanda
Last active December 29, 2020 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuvipanda/a74657571dd6a9c549b19d79c9be0656 to your computer and use it in GitHub Desktop.
Save yuvipanda/a74657571dd6a9c549b19d79c9be0656 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"\n",
"\n",
"HOURS_PER_WEEK = 35 # Assume 7 hour days 5 days a week (8 hr day minus 1 hour because nobody actually works 9-5)\n",
"WEEKS_OFF = 8 # 3 vacation, 3 holiday, 2 personal leave # FIXME: Is this right? That's 2 months off each year.\n",
"WEEKS_PER_YEAR = 52\n",
"HOURS_PER_PERSON = HOURS_PER_WEEK * (WEEKS_PER_YEAR - WEEKS_OFF)\n",
"\n",
"MEAN_ENGINEER_SALARY = 150_000\n",
"ENGINEER_OVERHEAD_MULTIPLIER = 0.2 # *not* ICSI overhead\n",
"ENGINEER_COST = MEAN_ENGINEER_SALARY * (1 + ENGINEER_OVERHEAD_MULTIPLIER)\n",
"ENGINEER_PER_HOUR = ENGINEER_COST / HOURS_PER_PERSON\n",
"\n",
"OPS_PER_HOUR = ENGINEER_PER_HOUR\n",
"DEV_PER_HOUR = ENGINEER_PER_HOUR"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"\n",
"# 1 week hackathon\n",
"\n",
"DEV_HOURS = 4\n",
"OPS_HOURS = 10\n",
"\n",
"# MULTIPLIERS - what are those?\n",
"DEV_MULTIPLIER = 8\n",
"OPS_MULTIPLIER = 8"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"TOTAL_COST = (DEV_HOURS * DEV_PER_HOUR * DEV_MULTIPLIER) + (OPS_HOURS * OPS_PER_HOUR * OPS_MULTIPLIER)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"13090.90909090909"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"TOTAL_COST"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"DISCOUNT = 0.50"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6545.454545454545"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"TOTAL_PRICE = TOTAL_COST * DISCOUNT\n",
"TOTAL_PRICE"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Cloud costs: https://cloud.google.com/products/calculator#id=144d4be7-6023-41ef-9b9c-ea357cd9b8d4\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"# High end\n",
"STORAGE = \"1TB\"\n",
"TOTAL_CORES = 80\n",
"TOTAL_RAM = 640 # GB\n",
"WEEKLY_COST = 794.89 "
]
},
{
"cell_type": "code",
"execution_count": null,
"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.9.0"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment