Failed to load https://paul-74128-14.000webhostapp.com/cabinet/users/getUserById: Redirect from 'https://paul-74128-14.000webhostapp.com/cabinet/users/getUserById' to 'https://paul-74128-14.000webhostapp.com/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://paul-74128-14.000webhostapp.com' is therefore not allowed access.
filename = "frequencies.txt"
myfile = open(filename, mode='w', encoding='utf-8')
myfrequencies = []
total, lo = sum(co.values()), 0
for k, v in co.most_common():
hi = lo + v
frequency = {'Letter': k,
'low' : lo / total,
'high' : hi / total}
myfrequencies.append(frequency)
lo = hi
json.dump(myfrequencies, myfile,ensure_ascii=False)
myfile.close()
Функция получения всех пользователей