import numpy as np import os,sys import cv2 import csv import firebase_admin from firebase_admin import credentials from firebase_admin import db from firebase_admin import messaging import time import threading import os from numba import jit, cuda cred = credentials.Certificate('servicekey.json') try: firebase_admin.initialize_app(cred, {'databaseURL': 'https://farmbase-b2f7e-31c0c.firebaseio.com/','storageBucket': 'farmbase-b2f7e.appspot.com'}) except: print('fire running') uids ['u5ZgAskSltX7dQdNFUlHsgVhAlf2','b2j92LjidjeGt2b60QHhSj4GeS63','0AC0f8JWjUdg9fCm7f8QbXZTOp23'] area = 0 num = 0 for uid in uids: uid_obj = db.reference('PaidMonitoredFields').child('PMF').child(uid).get() for (fieldid, fieldobj) in uid_obj.items(): area = area + int(fieldobj["FieldArea"]) num = num + 1