-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtp.py
86 lines (78 loc) · 2.1 KB
/
tp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# import json
# import matplotlib.pyplot as plt
# import numpy as np
# y = np.array([35, 25, 25, 15])
# mylabels = ["App Development", "Game Development", "Web Development", "Graphic Designer"]
# plt.pie(y, labels = mylabels)
# plt.show()
# f = open('user.json','r')
# x = json.load(f)
# dict = {
# 1:2,
# 2:3,
# 3:4
# }
# print(dict.__contains__(1))
# print(x.__contains__('Userinfo'))
# print(x)
# update Csv file
# import numpy as np
# import pandas as pd
# import csv
# import matplotlib.pyplot as plt
# df = pd.read_csv('./Data/UserData/user0.csv',usecols=["Skill","Score"])
# print(df["Skill"])
# l = len(df["Skill"])
# print(l)
# sum = 0
# skill = []
# score = []
# for i in range(0,l):
# if skill.__contains__(df.iloc[i]["Skill"]):
# continue
# else:
# print(skill)
# skill.append(df.iloc[i]["Skill"])
# print(skill)
# for i in skill:
# for j in range(0,l):
# if i == df.iloc[j]["Skill"]:
# sum += df.iloc[j]["Score"]
# score.append(sum)
# sum = 0
# print(score)
# df1 = pd.DataFrame({"Skill":skill,"Score":score})
# print(df1)
# x = np.array(df1["Skill"])
# y = np.array(df1["Score"])
# plt.pie(y, labels = x)
# plt.show()
# print(df)
# print(len(df))
# plt.plot(df.Skill, df.Score)
# plt.show()
# print(type(df))
# x = str(df)
# print(x)
# print(type(x))
# df = pd.read_csv('./Data/Questions/quiz1.csv')
# print(df)
# print(df.iloc[5])
# x = len(df)
# for i in range(0,x):
# print(df.iloc[i]["question"])
# print(df.iloc[i]["option1"])
# print(df.iloc[i]["option2"])
# print(df.iloc[i]["option3"])
# print(df.iloc[i]["option4"])
# print(df.iloc[i]["answer"])
# skill = ["Python","C++","Java"]
# score = [20,13,45]
# res = dict(zip(skill, score))
# print(res)
# print(max(res.values()))
# x = "Hello\nWorld"
# print(x)
# from kivy.storage.jsonstore import JsonStore
# x = JsonStore('id.json')
# print(x["skill"]["skill"])