cover photo

COURSEWORK

Monika's AI-ML-001 course work. Lv 2

Monika DAUTHORACTIVE
This Report is yet to be approved by a Coordinator.

Generic Tasks Report

25 / 10 / 2024


TASK 2: API

API (Application Programming Interface) is just like a waiter in a restaurant, it is a set of rules or protocols that enables software applications to communicate with each other to exchange data, features, and functionality.

Steps:

  • Used JQuery plugin’s Github repository, downloaded contents, and opened the contents in VS code.
  • Created an account in ‘Open Weather’ and generated a new API key.
  • Added the new API key, created a new ‘getWeather’ function, and added forms in the index.html file (to take input of any city and provide output).

My output:

TASK 3: Working with GitHub

  • Read through GitHub documentation and learnt about contributing to a project by forking.
  • Tried forking the Spoon-Knife repository
  • Learnt about git commands like git clone, git branch, git add. , git commit -m, git push.

Steps:

  • Fork the Marvel git repository and correct the code in the main branch.
  • On the Marvel GitHub page >> under the contributors >> select pull request >> choose the forked repository >> submit a pull request. Link

TASK 4: Getting familiar with the command line on Ubuntu

Installed the Linux terminal on Windows 10 by:

  • Turning on ‘Linux for Windows subsystem’ under the ‘Windows features’ in the control panel
  • Restarted the PC
  • Downloaded Ubuntu from the Microsoft Store

Inside the terminal:

  • Initialized the username and password
  • The default location was: Home/username

Run the following commands:

  • ls-al: to list all files
  • pwd : to get the current directory
  • ls /mnt/ : to get c and d drives
  • cd /mnt/c : change directory to the C drive
  • cd /mnt/c/Users/Admin/Desktop : Change directory to desktop
  • touch newfile1.txt : creates a new blank file
  • mkdir M{1..2600} : Creates 2600 new folders named M1,M100,M599….M2600
  • echo “Text…..”>test.txt : Prints text into test.txt
  • Cat test1.txt test2.txt : Concatenates contents of 2 files and prints them.

TASK 6: Working with Pandas and Matplotllib

  • Installed Anaconda navigator for using its Jupyter Notebook
  • Used some datasets(.csv files) for data visualization from Kaggle and some YouTube videos.
  • Referred matplotlib documentation

Line graph: Petrol prices of different cities over time

plt.plot(pet.Delhi,pet.Date, label='Delhi')

Histogram: Distribution of skill level of FIFA players

plt.hist(fifa.Overall, bins=bins)

Pie chart: Foot preference of FIFA players

plt.pie([left, right], labels=labels, autopct='%.2f %%')

Scatter plot: Unemployment rate

%matplotlib inline
df.plot(x="Median", y="Unemployment_rate", kind="scatter")

Scatter plot: Gas prices in USD over time

plt.scatter(gas.Year,gas.Australia, alpha=0.5, label='Australia')

Link

TASK 9: Tinkercad

  • Created a Tinkercad account, got familiar with the application
  • Simulated a radar system using an ultrasonic sensor and servo motor in Tinkercad which detects the presence of an object and displays its distance.

Components:

  • Arduino Uno R3
  • Ultrasonic Distance Sensor (4 pin)
  • Micro servo motor
  • Jumper wires

Working:

  • The servomotor rotates 120 degrees if the object is less than 100 cm and if it is at more than 100 cm it rotates back to 0 degree.
  • The serial monitor displays the distance of the object from the ultrasonic sensor Tinkercad simulation: Link

TASK 5: Kaggle contest

  • The task is to use machine learning to create a model that predicts which passengers survived the Titanic shipwreck.
  • Training data is the subset of original data that is used to train the machine learning model, whereas testing data is used to check the accuracy of the model. The training dataset is generally larger in size compared to the testing dataset.

Steps:

  1. Create a Kaggle account and download the Titanic datasets.
  2. Remove irrelevant columns (Ticket No., Cabin, Name, PassengerId) from the dataset.
  3. Fill missing values in SibSp, Parch, Fare, and Age with their median values; replace missing 'Embarked' values with 'U'.
  4. Convert categorical data (Sex and Embarked) into numerical format.
  5. Use logistic regression to make predictions based on Sex and Embarked data.
  6. Save the predictions in a "submission.csv" file and upload it to Kaggle.
  7. Achieved a submission accuracy of 0.76315. Link

TASK 14: Karnaugh Map and deriving the logic circuit

What is a burglar alarm? A burglar alarm is a security system designed to detect unauthorized entry into a building or area. It typically includes sensors on doors and windows, and when triggered, it activates an audible alarm or notifies a monitoring center. The purpose of a burglar alarm is to deter intruders and alert property owners or authorities to a potential break-in. Designing a burglar alarm using logic gates:

Components:

  • 7408 (AND gate)
  • LED
  • LDR(Light dependant resistor) - Photoresistor
  • Slideswitch
  • Power supply (5V)
  • Breadboard

Working: In this burglar alarm design, a slide switch and an LDR (Light Dependent Resistor) are used as inputs to an AND gate. The slide switch is connected to the first input of the AND gate and is ‘ON’ by default, connected to Vcc, while the LDR is connected to the second input. The AND gate outputs 1 only when both inputs are 1, which means the slide switch is on and the LDR detects increased light (indicating a door opening). If the slide switch is moved to the off position (disconnecting from Vcc), the output remains 0 even if the light increases, preventing the LED and alarm from activating. This ensures that the alarm only triggers under the specific condition of the switch being on and increasing light intensity, mimicking unauthorized entry detection.

Tinkercad simulation: Link


TASK 10: Speed control of DC motor

Components:

  • Arduino Uno R3
  • H bridge motor driver (L2930)
  • 9 V battery
  • DC Motor
  • Jumper wires

Working: The L2930 motor driver is connected to an Arduino, with Output 1 and Output 2 connected to the negative and positive terminals of a DC motor, respectively. Input 1 and Input 2 of the L2930 are connected to the Arduino's digital pins 13 and 12. When pin 13 is set high and pin 12 is low, the motor rotates in one direction (anticlockwise). Reversing the pin states (pin 12 high and pin 13 low) makes the motor rotate in the opposite direction (clockwise).

Tinkercad simulation: Link

TASK 8: Writing resource article using Markdown

  • I went through the Markdown syntax from different websites
  • Added headings, lines, text styles, paragraphs, images, and links using Markdown
  • Became familiar with Markdown language
  • Topic of the article: Datafication - Transforming information into actionable insights

TASK 15: Active Participation

Participated in an International level hackathon - BitNBuild

Participated in Technical fest - KAGADA in poster presentation track

Participated in a national level hackathon - Codefury- 6.O

UVCE,
K. R Circle,
Bengaluru 01