Skip to content

Commit

Permalink
executed pre-commit locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumedh Patil committed Apr 11, 2022
1 parent cd3c76b commit ad51a56
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions notebooks/experimental/cloud_price_analysis_azure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "2c9f7b05",
"metadata": {},
"source": [
"### Analysis of Azure Pricing details \n",
Expand All @@ -13,6 +14,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "2c2a399d",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:13.594615Z",
Expand All @@ -27,6 +29,7 @@
},
{
"cell_type": "markdown",
"id": "0dbffa43",
"metadata": {},
"source": [
"#### Access the API end point for Vitual Machine and store JSON file at location ../data/raw/"
Expand All @@ -35,6 +38,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "414964d3",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:14.454430Z",
Expand All @@ -43,15 +47,16 @@
},
"outputs": [],
"source": [
"params = {\"filter\" : \"serviceName eq Virtual Machines\"}\n",
"r = requests.get(\"https://prices.azure.com/api/retail/prices\", params = params)\n",
"params = {\"filter\": \"serviceName eq Virtual Machines\"}\n",
"r = requests.get(\"https://prices.azure.com/api/retail/prices\", params=params)\n",
"with open(\"../../data/raw/azure_vm.json\", \"w\") as fd:\n",
" fd.write(r.text)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "c5afe6ed",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:14.650696Z",
Expand Down Expand Up @@ -173,6 +178,7 @@
},
{
"cell_type": "markdown",
"id": "0a904b57",
"metadata": {},
"source": [
"#### Understand shape of data"
Expand All @@ -181,6 +187,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "dc78fb08",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:14.808222Z",
Expand Down Expand Up @@ -310,6 +317,7 @@
},
{
"cell_type": "markdown",
"id": "247a537d",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-22T05:57:27.176179Z",
Expand All @@ -323,6 +331,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "aa0c94f6",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:16.185057Z",
Expand Down Expand Up @@ -360,6 +369,7 @@
},
{
"cell_type": "markdown",
"id": "68801327",
"metadata": {},
"source": [
"#### Some times JSON file is missing reservationTerm or sometimes carry the values are 1 Year, 3 Years or onDemand\n",
Expand All @@ -369,6 +379,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "565627e5",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:18.103506Z",
Expand All @@ -392,6 +403,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "2c313b91",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:18.320177Z",
Expand Down Expand Up @@ -820,6 +832,7 @@
},
{
"cell_type": "markdown",
"id": "1394fe3d",
"metadata": {},
"source": [
"#### Understand unique type, Typical values are Consumption and Reservation"
Expand All @@ -828,6 +841,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "b77fef63",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:18.338384Z",
Expand All @@ -850,6 +864,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "85847f91",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:18.606000Z",
Expand All @@ -872,6 +887,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "59a84957",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:18.941626Z",
Expand Down Expand Up @@ -1288,6 +1304,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "b88a4d4a",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:19.111848Z",
Expand Down Expand Up @@ -1532,6 +1549,7 @@
},
{
"cell_type": "markdown",
"id": "ff60a690",
"metadata": {},
"source": [
"#### Group by few columns to get region wise Max Price and Min Price"
Expand All @@ -1540,6 +1558,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "3e8510f9",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:19.321020Z",
Expand Down Expand Up @@ -1768,6 +1787,7 @@
},
{
"cell_type": "markdown",
"id": "2a59fc3f",
"metadata": {},
"source": [
"#### Data analysis to understand service prices for type Reservation"
Expand All @@ -1776,6 +1796,7 @@
{
"cell_type": "code",
"execution_count": 13,
"id": "addfcc59",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:19.484511Z",
Expand Down Expand Up @@ -2102,6 +2123,7 @@
{
"cell_type": "code",
"execution_count": 14,
"id": "f0e7b612",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:19.602264Z",
Expand Down Expand Up @@ -2299,6 +2321,7 @@
{
"cell_type": "code",
"execution_count": 16,
"id": "c1811bff",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-30T14:21:24.227201Z",
Expand Down Expand Up @@ -2468,6 +2491,7 @@
},
{
"cell_type": "markdown",
"id": "058b5701",
"metadata": {
"ExecuteTime": {
"end_time": "2022-03-29T13:38:17.721934Z",
Expand All @@ -2483,7 +2507,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -2497,7 +2521,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.10.2"
},
"toc": {
"base_numbering": 1,
Expand Down

0 comments on commit ad51a56

Please sign in to comment.