change key path
This commit is contained in:
@@ -16,7 +16,7 @@ if __name__ == "__main__":
|
|||||||
else:
|
else:
|
||||||
path_delim = '/'
|
path_delim = '/'
|
||||||
|
|
||||||
key_file_path = os.getcwd() + path_delim + "keys" + path_delim + "hpos-prod-firebase-adminsdk-bionp-3c041b2300.json"
|
key_file_path = os.getcwd() + path_delim + "keys" + path_delim + "hpos-preprod-firebase-adminsdk.json"
|
||||||
cred = credentials.Certificate(key_file_path) # Replace with your own service account key path
|
cred = credentials.Certificate(key_file_path) # Replace with your own service account key path
|
||||||
firebase_admin.initialize_app(cred)
|
firebase_admin.initialize_app(cred)
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# Convert the data to a DataFrame
|
# Convert the data to a DataFrame
|
||||||
df = pd.DataFrame(data)
|
df = pd.DataFrame(data)
|
||||||
# print(df)
|
print(df)
|
||||||
print(df.size)
|
print(df.size)
|
||||||
|
|
||||||
# Save the DataFrame to a CSV file
|
# Save the DataFrame to a CSV file
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from google.cloud.firestore_v1.base_query import FieldFilter
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
file_path = os.getcwd() + '/keys' + '/hpos-prod-firebase-adminsdk-bionp-3c041b2300.json'
|
file_path = os.getcwd() + '/keys' + '/hpos-prod-firebase-adminsdk.json'
|
||||||
cred = firebase_admin.credentials.Certificate(fr'{file_path}')
|
cred = firebase_admin.credentials.Certificate(fr'{file_path}')
|
||||||
|
|
||||||
firebase_admin.initialize_app(cred)
|
firebase_admin.initialize_app(cred)
|
||||||
|
|||||||
@@ -6,10 +6,9 @@ from google.cloud.firestore_v1.base_query import FieldFilter
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
|
|
||||||
# Initialize Firebase Admin SDK
|
# Initialize Firebase Admin SDK
|
||||||
cred = credentials.Certificate(os.getcwd() + '/' + 'keys/hpos-prod-firebase-adminsdk-bionp-3c041b2300.json') # Replace with your own service account key path
|
cred = credentials.Certificate(os.getcwd() + '/' + 'keys/hpos-prod-firebase-adminsdk.json') # Replace with your own service account key path
|
||||||
firebase_admin.initialize_app(cred)
|
firebase_admin.initialize_app(cred)
|
||||||
|
|
||||||
# Get a reference to the Firestore database
|
# Get a reference to the Firestore database
|
||||||
@@ -53,7 +52,7 @@ df = pd.DataFrame(data)
|
|||||||
print(df)
|
print(df)
|
||||||
print(df.size)
|
print(df.size)
|
||||||
|
|
||||||
df = df[["_id", "classificationResult", "calculatedRatio", "deviceId", "deviceRatio", "deviceType", "kitSerial", "led1Average", "led1Buffer", "led1Sample", "led2Average", "led2Buffer", "led2Sample", "location", "deviceSerialNumber", "name", "testTime"]]
|
df = df[["_id", "classificationResult", "calculatedRatio", "deviceId", "deviceRatio", "deviceType", "kitSerial", "led1Average", "led1Buffer", "led1Sample", "led2Average", "led2Buffer", "led2Sample", "location", "deviceSerialNumber", "name", "testTime", "resultData"]]
|
||||||
|
|
||||||
# Save the DataFrame to a CSV file
|
# Save the DataFrame to a CSV file
|
||||||
output_filename = f'tests_{datetime.today().strftime("%d_%m_%Y_%H_%M")}.xlsx'
|
output_filename = f'tests_{datetime.today().strftime("%d_%m_%Y_%H_%M")}.xlsx'
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from google.cloud.firestore_v1.base_query import FieldFilter
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
file_path = os.getcwd() + '/keys' + '/hpos-prod-firebase-adminsdk-bionp-3c041b2300.json'
|
file_path = os.getcwd() + '/keys' + '/hpos-prod-firebase-adminsdk.json'
|
||||||
cred = firebase_admin.credentials.Certificate(fr'{file_path}')
|
cred = firebase_admin.credentials.Certificate(fr'{file_path}')
|
||||||
|
|
||||||
firebase_admin.initialize_app(cred)
|
firebase_admin.initialize_app(cred)
|
||||||
|
|||||||
Reference in New Issue
Block a user