Incubator Speech

Incubator Presentation Summary

Good morning, everyone.

I’m Aditya Rawat and he is Jensilin. We are here to present the summary of our incubator and share what we’ve learned from it.


Name of Project

So the name of our project is Wheeled and arm Robotic simulation.


Project Overview

But before giving you the project overview let’s understand the problem statement for understanding the project better

Let’s assume we have to send a robot rover to the moon surface to get some samples, without knowing about the terrain how can we train our rover for sample collection?

Read more →

Machine Learning

📦 Import Libraries

import numpy as np
import pandas as pd
import sklearn as skl
import matplotlib.pyplot as plt
  • numpy, pandas: Data manipulation

  • sklearn: ML tools like vectorizers and train/test split

  • matplotlib: Visualization (optional)


📚 NLP Preprocessing Setup

import re
import nltk
nltk.download('stopwords')
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
  • re: Regex for text cleaning

  • nltk: Tokenization, stopwords, and stemming


🚫 Custom Stopwords

negatives = ['no', 'nor', 'not', "don't", ...]
all_stopwords = [w for w in stopwords.words('english') if w not in negatives]

Retains negative words like “not”, which are important for sentiment.

Read more →

PL SQL Questions HandsOn

📘 PL/SQL Practice Guide: Functions, Procedures, Triggers

📌 Functions in PL/SQL

🔹 Syntax

CREATE OR REPLACE FUNCTION function_name (
    param1 IN data_type,
    param2 IN data_type
) RETURN return_data_type IS
BEGIN
    -- logic
    RETURN some_value;
END;
/

✅ Practice Questions with Solutions

1. Check Even or Odd

CREATE OR REPLACE FUNCTION check_even_odd(n IN NUMBER) RETURN VARCHAR2 IS
BEGIN
    IF MOD(n, 2) = 0 THEN
        RETURN 'EVEN';
    ELSE
        RETURN 'ODD';
    END IF;
END;
/

2. Get Maximum of Two Numbers

CREATE OR REPLACE FUNCTION get_max(a IN NUMBER, b IN NUMBER) RETURN NUMBER IS
BEGIN
    IF a > b THEN
        RETURN a;
    ELSE
        RETURN b;
    END IF;
END;
/

3. Count Vowels in a String

CREATE OR REPLACE FUNCTION count_vowels(str IN VARCHAR2) RETURN NUMBER IS
    count NUMBER := 0;
    ch CHAR;
BEGIN
    FOR i IN 1..LENGTH(str) LOOP
        ch := LOWER(SUBSTR(str, i, 1));
        IF ch IN ('a', 'e', 'i', 'o', 'u') THEN
            count := count + 1;
        END IF;
    END LOOP;
    RETURN count;
END;
/

4. Check Palindrome

CREATE OR REPLACE FUNCTION is_palindrome(str IN VARCHAR2) RETURN VARCHAR2 IS
    reversed_str VARCHAR2(1000) := '';
BEGIN
    FOR i IN REVERSE 1..LENGTH(str) LOOP
        reversed_str := reversed_str || SUBSTR(str, i, 1);
    END LOOP;

    IF LOWER(str) = LOWER(reversed_str) THEN
        RETURN 'YES';
    ELSE
        RETURN 'NO';
    END IF;
END;
/

5. Sum of Digits

CREATE OR REPLACE FUNCTION sum_of_digits(n IN NUMBER) RETURN NUMBER IS
    sum NUMBER := 0;
    digit NUMBER;
    num NUMBER := n;
BEGIN
    WHILE num > 0 LOOP
        digit := MOD(num, 10);
        sum := sum + digit;
        num := FLOOR(num / 10);
    END LOOP;
    RETURN sum;
END;
/

🔧 Procedures in PL/SQL

🔹 Syntax

CREATE OR REPLACE PROCEDURE procedure_name (param1 IN/OUT data_type) IS
BEGIN
    -- logic
END;
/

✅ Practice Questions with Solutions

1. Procedure to Print Square

CREATE OR REPLACE PROCEDURE print_square(n IN NUMBER) IS
BEGIN
    DBMS_OUTPUT.PUT_LINE('Square: ' || (n * n));
END;
/

2. Procedure to Update Employee Salary

CREATE OR REPLACE PROCEDURE increase_salary(empId IN NUMBER) IS
BEGIN
    UPDATE employees
    SET salary = salary * 1.10
    WHERE emp_id = empId;
    COMMIT;
END;
/

3. Procedure with OUT Parameter for Factorial

CREATE OR REPLACE PROCEDURE find_factorial(n IN NUMBER, result OUT NUMBER) IS
    fact NUMBER := 1;
BEGIN
    FOR i IN 1..n LOOP
        fact := fact * i;
    END LOOP;
    result := fact;
END;
/

🔥 Triggers in PL/SQL

🔹 Syntax

CREATE OR REPLACE TRIGGER trigger_name
BEFORE/AFTER INSERT/UPDATE/DELETE ON table_name
FOR EACH ROW
BEGIN
    -- logic
END;
/

✅ Practice Questions with Solutions

1. BEFORE INSERT Trigger

CREATE OR REPLACE TRIGGER trg_set_created_at
BEFORE INSERT ON students
FOR EACH ROW
BEGIN
    :NEW.created_at := SYSDATE;
END;
/

2. AFTER UPDATE Trigger for Salary Audit

CREATE OR REPLACE TRIGGER trg_salary_audit
AFTER UPDATE OF salary ON employees
FOR EACH ROW
BEGIN
    INSERT INTO salary_audit(emp_id, old_salary, new_salary, change_date)
    VALUES(:OLD.emp_id, :OLD.salary, :NEW.salary, SYSDATE);
END;
/

3. BEFORE DELETE Trigger to Prevent Deletion

CREATE OR REPLACE TRIGGER trg_prevent_delete
BEFORE DELETE ON departments
FOR EACH ROW
BEGIN
    RAISE_APPLICATION_ERROR(-20001, 'Deletion is not allowed on departments table.');
END;
/

📚 Additional Practice Questions

🔧 Functions

🔹 6. Reverse a String

Question: Write a function to reverse a given string.

Read more →

PL/SQL Full Notes

What is PL/SQL?

  1. PL/SQL stands for Procedural Language Extension to SQL
  2. It is a Extension of SQL developed by Oracle.
  3. It adds SQL capabilities of procedural programming like variables, loops and conditional statements in SQL.

PL/SQL Architecture

Physical Architecture

Image Description

  • PL/SQL engine processes the entire PL/SQL block of code.
  • It Separate SQL statements and Procedural statements.

Simple Architecture Flow

Image Description

PL/SQL Logical Architecture

  • Corporates with SQL Engine.
  • Enables Subprograms -> Allows re-usability of code/script like variables and functions.
  • Dynamic Queries-> We can modify or create new Queries.
  • Case Insensitivity
  • Optimizer-> It optimizes our code for better performance.
  • Enables Object-Oriented Programming
  • Web Development #Extras Context Switching: When you write SQL Query in PL/SQL the PL/SQL send the query to SQL Engine and the result will be returned this operation is called Context Switching.

Pluggable Database

Image Description

Read more →

React Notes

Introduction to React

React is a JavaScript library for building user interfaces, particularly single-page applications where you need a fast, interactive UI.

Installation

To create a new React app, use:

npx create-react-app my-app cd my-app npm start

JSX (JavaScript XML)

JSX allows writing HTML elements inside JavaScript and placing them in the DOM without using methods like createElement.

Example:

const element = <h1>Hello, React!</h1>;

React Components

React components are reusable pieces of UI. There are two types:

Read more →

Sastra DSA Full Notes

What is DSA?

Image Description

Types of Data Structure

Sequential Data Structure

Image Description

Non-Linear Data Structure

Image Description


Categories of Data Structure

Primitive and Non-Primitive

Image Description


Need of Data Structure

Image Description

Efficiency of an Algorithm

  1. Time Complexity Image Description

  2. Space Complexity Image Description

Abstract Data Type

Image Description

Abstract Data Types Implementation

  1. Arrays ADT
  2. Linked List ADT Image Description
  3. Stack ADT Image Description

Stack Operations

Image Description Image Description

Stack ADT Operations using Arrays

Image Description

Read more →

Selenium Notes

Important Libraries

from selenium import webdriver 
from selenium.webdriver.chrome.service import Service 
from selenium.webdriver.support.ui import Select 
from selenium.webdriver.common.by lmport By 
from selenium.webdriver.support import expected_conditions as EC 
from selenium.webdriver.support.ui import WebDriverWait 
import time 
from selenium.webdriver.common.action_chains import ActionChains 
from selenium.webdriver.chrome.options import Options 
from selenium webdriver.remote.webelement import WebElement
  1. webdriver

imports the webdriver module from the Selenium library, which allows you to automate browser actions like clicking, typing and navigating.

  1. Service

Service is used to manage the lifecycle of the chromedriver.exe process (starting, stopping, and communication).

Read more →