This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
df = pd.read_csv('data_table_exact_count.csv') | |
df_needed = df.iloc[:,1:] | |
df_class = df.iloc[:,0] | |
total_count_per_species= df_needed.sum(axis=1) # row wise | |
total_predicted_per_species = df_needed.sum(axis=1) # column wise | |
cumulative_f1 = [] | |
total_correct = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Import required libraries, including python-requests and hcsr04.py | |
import sys, time, requests, json, hcsr04 | |
import RPi.GPIO as GPIO | |
# Set a default interval of 5 seconds. If the script was run with an argument, | |
# such as "python ultrasonic_harvest.py 2", use that value instead. | |
interval=3 if len(sys.argv)==1 else int(sys.argv[1]) |