0% found this document useful (0 votes)
3 views1 page

Lab Activity-1 Python Rutul

The document outlines a laboratory activity for a short-term training program on Edge AI and Vision at Nirma University's School of Technology. It includes tasks such as identifying outliers in website analytics data, filtering high-earning employees, comparing execution times for square root calculations, and binarizing a grayscale image. Each task provides specific Python coding challenges and encourages both traditional and concise coding approaches.

Uploaded by

Dr. Vijay Savani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Lab Activity-1 Python Rutul

The document outlines a laboratory activity for a short-term training program on Edge AI and Vision at Nirma University's School of Technology. It includes tasks such as identifying outliers in website analytics data, filtering high-earning employees, comparing execution times for square root calculations, and binarizing a grayscale image. Each task provides specific Python coding challenges and encourages both traditional and concise coding approaches.

Uploaded by

Dr. Vijay Savani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

School of Technology, Nirma University

Department of Electronics and Communication Engineering


STTP on Edge AI and Vision

Laboratory Activity-1 Python

1. A website analytics data shows day-wise visited users, bounce rate, and duration.
Identify the outlier data sample if all three parameter values exceed standard
deviation using a single line logic.
## Website analytics data:
## (row = day), (col = users, bounce, duration)
a = [Link]([[815, 70, 115],
[767, 80, 50],
[912, 74, 77],
[554, 88, 70],
[1008, 65, 128]])

2. The human resources department of a large company and need to find all staff
members who earn at least $100,000 per year. Your desired output is a list of
tuples, each consisting of two values: the employee name and the employee’s yearly
salary. Generate the desired output using (i) for loop (ii) using single line logic.
employees = {'Alice' : 100000,
'Bob' : 99817,
'Carol' : 122908,
'Frank' : 88123,
'Eve' : 9312}
top_earners = []

3. Compare the timing execution of operator-based square root with [Link]()


using timeit().

4. Simulate a small 300x300 grayscale image frame using:


frame = [Link](0, 255, (300, 300), dtype=np.uint8)
Write a Python code using a for loop to binarize the image: assign 1 if pixel value
exceeds 128, otherwise 0. Shorten the code (single line) using [Link]() function.

You might also like