Skip to content

Commit 2f0dd24

Browse files
committed
Setup initial code
1 parent 5865948 commit 2f0dd24

File tree

7 files changed

+0
-32
lines changed

7 files changed

+0
-32
lines changed

sensor/energy_info.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
# Module 7: Work with hex and binary data from light bulbs sensor to energy

sensor/house_info.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
# Module 3: Create an instance of sensor data

sensor/humidity_info.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
# Module 5: Work with floating point data from humidity sensor

sensor/load_data.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +0,0 @@
1-
# Module 1: Load data from files
2-
import os
3-
import glob
4-
import csv
5-
6-
def load_sensor_data():
7-
sensor_data = []
8-
9-
sensor_files = glob.glob(os.path.join(os.getcwd(), 'datasets', '*.csv'))
10-
11-
# Loop over list of files
12-
for sensor_file in sensor_files:
13-
with open(sensor_file ) as data_file:
14-
# Create a csv.DictReader
15-
data_reader = csv.DictReader(data_file, delimiter=',')
16-
# Loop over each row dictionary
17-
for row in data_reader:
18-
# Create a list of dictionaries
19-
sensor_data.append(row)
20-
21-
return sensor_data

sensor/particle_count_info.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
# Module 6: Work with scientific notation data from Particle counter sensor

sensor/sensor_app.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
# Runner script for all modules
2-
from load_data import load_sensor_data # module 2
3-
4-
data = load_sensor_data()
5-
# print(f"Loaded records {len(data)}")
6-
print("Loaded records: [{}]".format(len(data)))

sensor/temperature_info.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
# Module 4: Work with integer data from temperature sensor

0 commit comments

Comments
 (0)