Skip to content

Commit

Permalink
remove assets
Browse files Browse the repository at this point in the history
  • Loading branch information
syarifuddinahmads committed May 29, 2021
1 parent 080bddd commit a1d32f4
Show file tree
Hide file tree
Showing 1,678 changed files with 225 additions and 185,903 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"jupyter.jupyterServerType": "local"
}
117 changes: 31 additions & 86 deletions Distance Customer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -44,12 +44,12 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"name": "stdout",
"text": [
"[('Richa', 55), ('Calvin', 50), ('Yono', 50), ('Tutik', 55), ('Febri', 70), ('Zahwa', 45), ('Cipto', 60), ('Eko', 60), ('Khamimah', 40), ('Mamik', 35)]\n"
]
Expand All @@ -62,18 +62,18 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"('Richa', 55)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
"execution_count": 8
}
],
"source": [
Expand All @@ -82,18 +82,18 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"55"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
"execution_count": 9
}
],
"source": [
Expand All @@ -102,10 +102,11 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[[0, 8.3, 10.2, 6.5, 6.6, 7.1, 7.7, 5.8, 6.0, 5.7, 8.1],\n",
Expand All @@ -121,9 +122,8 @@
" [8.1, 5.5, 4.5, 9.9, 5.3, 6.4, 7.4, 8.5, 11.0, 7.6, 0]]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
"execution_count": 14
}
],
"source": [
Expand All @@ -132,7 +132,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -367,7 +367,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -417,7 +417,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -464,7 +464,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -487,20 +487,14 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"name": "stdout",
"text": [
"Total = 7.5\n",
"Total = 8.9\n",
"Total = 7.5\n",
"Total = 5.3\n",
"Total = 5.6\n",
"Total = 5.4\n",
"Total = 4.7\n"
"Total = 7.5\nTotal = 8.9\nTotal = 7.5\nTotal = 5.3\nTotal = 5.6\nTotal = 5.4\nTotal = 4.7\n"
]
}
],
Expand All @@ -510,7 +504,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -536,67 +530,14 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"name": "stdout",
"text": [
"==========================================================\n",
"Total = 11.7\n",
"Total = 7.6\n",
"Total = 9.0\n",
"Total = 6.6\n",
"Total = 7.0\n",
"Total = 9.7\n",
"Total = 6.4\n",
"Total = 4.9\n",
"Total = 10.9\n",
"==========================================================\n",
"Total = 8.9\n",
"Total = 10.7\n",
"Total = 14.1\n",
"Total = 9.9\n",
"Total = 10.9\n",
"Total = 6.2\n",
"Total = 8.6\n",
"Total = 13.8\n",
"==========================================================\n",
"Total = 7.5\n",
"Total = 8.9\n",
"Total = 7.5\n",
"Total = 5.3\n",
"Total = 5.6\n",
"Total = 5.4\n",
"Total = 4.7\n",
"==========================================================\n",
"Total = 4.8\n",
"Total = 8.1\n",
"Total = 2.1\n",
"Total = 4.4\n",
"Total = 8.5\n",
"Total = 9.4\n",
"==========================================================\n",
"Total = 7.3\n",
"Total = 8.1\n",
"Total = 9.2\n",
"Total = 8.7\n",
"Total = 8.8\n",
"==========================================================\n",
"Total = 8.1\n",
"Total = 7.2\n",
"Total = 3.9\n",
"Total = 8.4\n",
"==========================================================\n",
"Total = 5.5\n",
"Total = 6.9\n",
"Total = 5.4\n",
"==========================================================\n",
"Total = 3.3\n",
"Total = 3.1\n",
"==========================================================\n",
"Total = 6.2\n"
"==========================================================\nTotal = 11.7\nTotal = 7.6\nTotal = 9.0\nTotal = 6.6\nTotal = 7.0\nTotal = 9.7\nTotal = 6.4\nTotal = 4.9\nTotal = 10.9\n==========================================================\nTotal = 8.9\nTotal = 10.7\nTotal = 14.1\nTotal = 9.9\nTotal = 10.9\nTotal = 6.2\nTotal = 8.6\nTotal = 13.8\n==========================================================\nTotal = 7.5\nTotal = 8.9\nTotal = 7.5\nTotal = 5.3\nTotal = 5.6\nTotal = 5.4\nTotal = 4.7\n==========================================================\nTotal = 4.8\nTotal = 8.1\nTotal = 2.1\nTotal = 4.4\nTotal = 8.5\nTotal = 9.4\n==========================================================\nTotal = 7.3\nTotal = 8.1\nTotal = 9.2\nTotal = 8.7\nTotal = 8.8\n==========================================================\nTotal = 8.1\nTotal = 7.2\nTotal = 3.9\nTotal = 8.4\n==========================================================\nTotal = 5.5\nTotal = 6.9\nTotal = 5.4\n==========================================================\nTotal = 3.3\nTotal = 3.1\n==========================================================\nTotal = 6.2\n"
]
}
],
Expand Down Expand Up @@ -655,9 +596,8 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
"name": "python376jvsc74a57bd029ad3fd52bd0e729cc853b79b5e1a27e3888818c627184b54043b9d077c2447f",
"display_name": "Python 3.7.6 64-bit ('base': conda)"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -670,8 +610,13 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
},
"metadata": {
"interpreter": {
"hash": "29ad3fd52bd0e729cc853b79b5e1a27e3888818c627184b54043b9d077c2447f"
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}
}
12 changes: 0 additions & 12 deletions app.py

This file was deleted.

Binary file modified data_distance_matrix.xlsx
Binary file not shown.
33 changes: 33 additions & 0 deletions data_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
class DataModel():

def customer_data_model():
customer = [
('Richa',55),
('Calvin',50),
('Yono',50),
('Tutik',55),
('Febri',70),
('Zahwa',45),
('Cipto',60),
('Eko',60),
('Khamimah',40),
('Mamik',35),
]
return customer

def create_distance_data_model():
distance_matrix = [
[0,8.3,10.2,6.5,6.6,7.1,7.7,5.8,6.0,5.7,8.1],
[8.3,0,6.8,7.2,5.9,8.8,9.0,4.4,7.9,9.1,5.5],
[10.2,6.8,0,7.8,6.1,3.2,8.0,5.1,10.0,7.3,4.5],
[6.5,7.2,7.8,0,5.6,4.7,6.7,7.0,6.9,6.8,9.9],
[6.6,5.9,6.1,5.6,0,8.9,6.2,0.3,8.2,3.8,5.3],
[7.1,8.8,3.2,4.7,8.9,0,7.5,4.8,3.9,4.1,6.4],
[7.7,9.0,8.0,6.7,6.2,7.5,0,5.4,6.5,9.5,7.4],
[5.8,4.4,5.1,7.0,10.3,4.8,5.4,0,6.3,4.6,8.5],
[6.0,7.9,10.0,6.9,8.2,3.9,6.5,6.3,0,8.4,11.0],
[5.7,9.1,7.3,6.8,3.8,4.1,9.5,4.6,8.4,0,7.6],
[8.1,5.5,4.5,9.9,5.3,6.4,7.4,8.5,11.0,7.6,0],
]
return distance_matrix

34 changes: 34 additions & 0 deletions distance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class Distance():

customer = []
distance = []

def __init__(self,Customer,Distance):
self.customer = Customer
self.distance = Distance

def count_distance_customer_dinamic(self,counter):
data_distance = self.distance
leng_matrix = len(data_distance)
counter_loop = counter+1
_data = []
while counter_loop < leng_matrix:
x = data_distance[counter_loop][0]
y = data_distance[0][counter]
xy = data_distance[counter_loop][counter]
total_xy = x+y-xy
print('Total = ',round(total_xy,2))
_data.append(round(total_xy,2))

counter_loop+=1
return _data

def execute_distance(self):
starting_point = 1
data_distance_matrix = []
while starting_point < len(self.distance)-1:
data_distance_matrix.append(self.count_distance_customer_dinamic(starting_point))
starting_point+=1
return data_distance_matrix


Loading

0 comments on commit a1d32f4

Please sign in to comment.