-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplit.py
More file actions
47 lines (43 loc) · 955 Bytes
/
split.py
File metadata and controls
47 lines (43 loc) · 955 Bytes
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
import numpy as np
a = 0
b = 0
c = 0
d = 0
other = []
crater = []
dark_dune = []
streak = []
bright_dune = []
impact = []
edge = []
file = open('labels-map-proj.txt', 'r')
for line in file:
b = b + 1
words = line.split()
for word in words:
c = c + 1
#print(len(word))
if (len(word) == 1):
d = d + 1
if (word[0] == 0):
other.append(float(word))
a = a + 1
if (word[0] == 1):
crater.append(float(word))
a = a + 1
if (word[0] == 2):
dark_dune.append(float(word))
a = a + 1
if (word[0] == 3):
streak.append(float(word))
a = a + 1
if (word[0] == 4):
bright_dune.append(float(word))
a = a + 1
if (word[0] == 5):
impact.append(float(word))
a = a + 1
if (word[0] == 6):
edge.append(float(word))
a = a + 1
print (b, c, d, a)