-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
39 lines (35 loc) · 1.18 KB
/
test.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
from Database import*
from Normaliser import*
def listreturn():
return [["one"],["two"]]
def main():
# x = ["once", "twice", "twice", "thrice"]
# y = set()
# for thing in x:
# print(thing)
# y.add(thing)
# print(y)
# #Experimenting with parsing the database output into something useful for calculating closure
# db = Database()
# fds = db.getFD("Person")
# lst = list()
# for fd in fds:
# temp = fd.replace("{","")
# temp = temp.replace("}","")
# temp = temp.replace(";","")
# lst.append(temp.split("=>"))
# for fd in lst:
# fd[0] = set(fd[0].split(","))
# fd[1] = set(fd[1].split(","))
# #lst is now a list of two element lists containing the sets of each side of the =>
# #making them lists of sets makes it easy to do subset checks for the closure calculation
# print(lst)
# attrList = db.getAttributes("Person").split(",")
# print(set(attrList))
# norm = Normaliser()
# norm.normalise(db,"Person")
# testSet = set(['a','b','c'])
# testSet2 = set(['b'])
# print(testSet2.difference(testSet.difference(testSet2)))
if __name__ == "__main__":
main()