-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_read.py
31 lines (24 loc) · 963 Bytes
/
data_read.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
import csv
def activity(a):
with open("static/data/stream.csv",mode='r') as csvfile : #feeding each values to csv
data=list(csv.reader(csvfile))
return((int(data[0][a])/int(data[0][1]))*360)
def activitytype():
with open("static/data/stream.csv",mode='r') as csvfile : #feeding each values to csv
data=list(csv.reader(csvfile))
print(data)
if int(data[0][0])==0:
return ('normal')
if int(data[0][0])==1:
return ('suspicious')
else:
return('processing')
def criminalname():
with open("static/data/facecount.csv",mode='r') as csvfile : #feeding each values to csv
data=list(csv.reader(csvfile))
print(data)
return(data[0][1])
def criminalcount():
with open("static/data/facecount.csv",mode='r') as csvfile : #feeding each values to csv
data=list(csv.reader(csvfile))
return(data[0][0])