« first day (1332 days earlier)      last day (2246 days later) » 

10:23
hi guys, little help here

"I don't want to put unknown encodings of group image in to a classifier"

what i did was find Matches for each of the encoding and trying to remove encodings with matches=0

for encoding in encodings:
d={}
matches =np.count_nonzero(face_recognition.compare_faces(data["encodings"],
encoding))
d["encods"]=[matches,encoding]
for k,v in list(d.items()):
if v[0]==0:
del d[k]

print("dict",d)

I am not getting what i want
 
2 hours later…
11:59
hi guys, little help here

"I don't want to put unknown encodings of group image in to a classifier"

what i did was find Matches for each of the encoding and trying to remove encodings with matches=0
for encoding in encodings:
matches =np.count_nonzero(face_recognition.compare_faces(data["encodings"],
encoding))
d["encods"]=[matches,encoding]
for k,v in list(d.items()):
if v[0]==0:
del d[k]

print("dict",d)
2 messages moved from Python
 
6 hours later…
18:24
import json
import csv
import sys
input = []
for line in open('test.txt', 'r'):
input.append(json.loads(line))

#print(input[1]['authors'][0]['name'])
print(input[1].keys())

data_list=open("data.csv","w")
output = csv.writer(data_list)


output.writerow(input[1].keys()) # header row


with open("data.csv", "w") as file:
for row in input:
output.writerow(row['title'])
output.writerow(row['lang'])
print(row['title'],row['lang'])
1 message moved from Python

« first day (1332 days earlier)      last day (2246 days later) »