-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathReference.py
180 lines (158 loc) · 5.27 KB
/
Reference.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#trying to create new project
#create qr code for database
#if we scan it will connect to databse and store our details with time.
#for exit it will scan another qr code and it will store it in the database with close time.
import math
#
# a = "20btrca23"
# b = a.split('20')
# c = b[1]
# print(c)
# i = 0
# d = ''
# for x in a:
# print(x)
# i += 1
# d +=x
# print(i)
# if(i == 2):
# print("reached if")
# print(d)
# break
'''if(stud_usn != None):
print("Reached if condition")
stud_usn_split = stud_usn.split()'''
#to scan the qr code
import time
'''
import cv2
a = cv2.QRCodeDetector()
a.detectAndDecode(cv2.imread("nsme.jpg"))
'''
'''
to get a dat from database
user=db.child('usn').get()
print(user.val())
for users in user.each():
print(user.val())
'''
# a = ['aerwe','sdfs']
# print(a[0])
#
# c = 'sdfs'
# a.append(c)
# print(a)
#
# entry_log_qrcode("random.png")
# import os
#
# for root,dirs,files in os.walk(r'C:\Users\HOME\PycharmProjects\TryingNew Project\Student_profiles'):
# for file in files:
# if file.endswith('.txt'):
# print(os.path.join(file))
# transfer_file = os.path.join(file)
# print(transfer_file)
# from pathlib import Path
# import shutil
#
# file_source = r'C:\Users\HOME\PycharmProjects\TryingNew Project'
# file_destination = r'C:\Users\HOME\PycharmProjects\TryingNew Project\Student_profiles'
#
# get_files = '20btrca099.txt'
#
# for file in Path(file_source).glob(get_files):
# shutil.move(os.path.join(file_source,file),file_destination)
# shutil.move(file_source+get_files,file_destination)
# print("Transfered succesfully")
# from datetime import datetime
# print(datetime.today().strftime("%H:%M:%S %p"))
# print(time.strftime("%x"))
#
# now = datetime.now()
# print(now.strftime("%y-%m-%d"))
'''a=input("Want to view the profile and save the file? y or n :")
if(a == 'y' or 'Y'):
for x,y in stud_usn.items():
print(stud_usn[x])
stud_usn_filename = str(stud_usn_temp)
f = open(stud_usn_filename+".txt",'a')
#f.write(x)
#f.write('\t')
f.write(y)
f.write('\n')
f.close()
else:
print(';}')'''
# if (stud_db_acc.key() == "Name"):
# stud_name_db = stud_db_acc.val()
# stud_db_acc_dict["Name"] = stud_name_db
# active = 0
# elif (stud_db_acc.key() == "USN"):
# stud_USN_db = stud_db_acc.val()
# stud_db_acc_dict["USN"] = stud_USN_db
# active = 0
# elif (stud_db_acc.key() == "sem"):
# stud_sem_db = stud_db_acc.val()
# stud_db_acc_dict["sem"] = stud_sem_db
# active = 0
# elif (stud_db_acc.key() == "Branch"):
# stud_branch_db = stud_db_acc.val()
# stud_db_acc_dict["Branch"] = stud_branch_db
# active = 0
# elif (stud_db_acc.key() == "Mobileno"):
# stud_mobilno_db = stud_db_acc.val()
# stud_db_acc_dict["Mobileno"] = stud_mobilno_db
# active = 0
# elif (stud_db_acc.key() == "Out*Time"):
# stud_Time_db = stud_db_acc.val()
# stud_db_acc_dict["Out*Time"] = stud_Time_db
# active = 0
# elif (stud_db_acc.key() == "reason"):
# stud_reason_db = stud_db_acc.val()
# stud_db_acc_dict["reason"] = stud_reason_db
# active = 0
# elif (stud_db_acc.key() == "time*day"):
# stud_td_db = stud_db_acc.val()
# stud_db_acc_dict["time*day"] = stud_td_db
# active = 0
# elif (stud_db_acc.key() == "Out*Date"):
# stud_date_db = stud_db_acc.val()
# stud_db_acc_dict["Out*Date"] = stud_date_db
# active = 0
# elif (stud_db_acc.key() == "Key"):
# stud_key_db = stud_db_acc.val()
# stud_db_acc_dict["Key"] = stud_key_db
# active = 0
# elif (stud_db_acc.key() == "In*Time"):
# stud_Intime_db = stud_db_acc.val()
# stud_db_acc_dict["In*Time"] = stud_Intime_db
# active = 1
# elif (stud_db_acc.key() == "In*Date"):
# stud_InDate_db = stud_db_acc.val()
# stud_db_acc_dict["In*Date"] = stud_InDate_db
# active = 1
#
# #need to satart code from here
# print("active:"+str(active))
# a = {
# 'name':'adfsdf',
# 'in*time':'2432wr',
# 'usn':'sfgdsdfe'
# }
#
# b = 'in*time'
# if b in a.keys():
# print("present")
# else:
# print("Not present")
# x,y = input("Enter a Red Gem and Blue Gem:").split()
# print(x,y)
#
# if(int(x) >100 or int(y) > 100 ):
# exit()
# else:
# if (x == y):
# print("YES")
# else:
# print("NO")
print(floor(10))