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 = ['WtwICmHo7ng6ruOowpIFikLEFf43','8oaj2rMnDKVNQUhONaVZMwMcPOH3','WUOg8Wb062VBMdKhY2qFm4B1yyD3','70Tku6XuyVcTC5PHlOyiXc3L4CZ2'] uids = ['RtZ0TMMllFP0j2R4UKGpI2VL8bs2','a3epL8ht88ScWy6mbc0iWna9fvu2','Masezd0LzTYLLG3TJaFy4yq7xPf2','LrFhx0lIAigadxMskhTTj3H8ZIf2','rP7D41ZHjkRXX5WMTXokZebiXh73','h16PzuMnv7dYZy6Mjul7Rhbo50n1','WMlTpK3fXqeiqmzVtH58OBxPOrn2','00Fe2YPXgaSeebRSN1YBZem5cZ93','OxzZtHEiBYY0VobD0bnzZpgi2G23','FZLit3U1kcgER1vdccQ7U28q6dq2','FHu7mY4XajNo1X5kFLcQvUc4h003'] area = 0 num = 0 all_points_arr = [] for uid in uids: uid_obj = db.reference('PaidMonitoredFields').child('PMF').child(uid).get() try: for (fieldid, fieldobj) in uid_obj.items(): db.reference('PaidMonitoredFields').child('PMF').child(uid).child(fieldid).child('Language').set('en,hi') time.sleep(0.2) except Exception as e: print(e)