Skip to content

Instantly share code, notes, and snippets.

View zekkelar's full-sized avatar

Zekkel AR zekkelar

View GitHub Profile
result_keys = []
rules_res = []
def parse_rules(result_rules,rules):
for res in result_rules:
#print(rules[res])
rules_res.append(rules[res])
def pisah(key_win):
for key_winn in key_win:
get_key = key_winn.split(':')
Predikat Biasa Kurang Ramah
Standar 0.5 0.2
Cepat 0.5 0.2
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 4 in line 1.
Predikat, Biasa, Kurang Ramah
Standar, 0.5, 0,2
Cepat, 0.5, 0,2
Rules Value Rules
Sangat Sedikit 300
Sedikit 450
Normal 600
Banyak 800
Sangat Banyak 1000
Sikap/Kecepatan Pelayanan Kurang Ramah Biasa Sangat Ramah
Lambat Sangat Sedikit Sedikit Normal
Standart Sedikit Normal Banyak
Cepat Normal Banyak Sangat Banyak
titik_temu_2 = []
out = 0
for y in range(0, len(nana)):
for a in nana[out]:
if str(value_2_nilai) in str(round(a, 2)):
if len(str(value_2_nilai)) == len(str(round(a, 2))):
#print(Panel.fit(' Found {} '.format(str(round(a,2)))))
titik_temu_2.append(f"{out}")
add_titiktemu_two = out+1
nana = dict()
for i in range(0,len(pandas_properties_2)):
rng = np.arange(float(pandas_properties_2[i][0]), float(pandas_properties_2[i][1]), 0.1)
nana[i] = rng
palue_1 = dict()
palue_2 = dict()
rules = dict()
key_rules = []
def open_file():
get_user= (os.environ.get('USERNAME'))
df = pd.read_excel('C:/Users/{}/Documents/parameter.xls' .format(get_user), sheet_name='Sheet1')
a=(df.to_dict())
import time
import pandas as pd
import numpy as np
import itertools
from rich import print
from rich.panel import Panel
from matplotlib.pyplot import *
from fuzzylab import *
from simpful import *