Digital Modulation Techniques in Python: Pulse Shaping and QPSK

import numpy as np

T = 1 #time period

Fs = 100 #sampling frequency

t = np.
arange(-3*T, 3*T, 1/Fs)

g = lambda t: np.Sinc(t) * np.Cos(np.Pi*0.5*t) / (1-(2*0.5*t)**2) #Defining a lambda function g(t) that represents a raised cosine filter with a roll-off factor of 0.5.

plt.
Figure(figsize=(8,3))

plt.Plot(t, g(t))

binary_sequence = np.Array(np.Random.Randint(2,size=50))

d = 2 * np.Array(binary_sequence) – 1 #making the binary sequence NRZ

def get_signal(d): #to get transmitted signal

    t = np.Arange(-2*T,

Read More

Implementing Core Machine Learning Algorithms in Python

1. Perceptron Algorithm Implementation

The Perceptron is a foundational linear classification algorithm. This implementation uses NumPy for efficient vector operations.

Perceptron Class Definition

import numpy as np, random

class Perceptron:
    def __init__(self, eta=0.01, n_iter=50, random_state=1):
        self.eta, self.n_iter, self.random_state = eta, n_iter, random_state

    def fit(self, x, y):
        rgen = np.random.RandomState(self.random_state)
        self.w_ = rgen.normal(0, 0.01, 1 
Read More

Key Techniques in Web Scraping and Text Processing

Web Scraping and Data Extraction

Core Web Technologies

A web page is built using several core technologies:

  • HTML (HyperText Markup Language): Defines the content and structure of a web page. It is composed of tags organized in a tree-like structure.
  • CSS (Cascading Style Sheets): Controls the design and presentation of a web page.
  • JavaScript: Enables interactive actions and dynamic content on a web page.

Scraping Methods

Static Web Page Scraping

For static pages, you can use libraries like Beautiful Soup

Read More

Java Array Fundamentals: Syntax, Indexing, and Code Examples

Java Array Fundamentals: Core Concepts and Syntax

Array Properties and Declaration

Fixed Size Property

Once an array is created, its size is fixed.

Valid Array Declarations (int values)

Which of the following are correct ways to declare an array of int values?

  • int[] a;
  • int a[];

Valid Array Declarations (Mixed Types)

Which of the following statements are valid?

  • double d[] = new double[30];
  • int[] i = {3, 4, 3, 2};

Incorrect Array Declarations and Initializations

Which of the following declarations or initializations

Read More

Understanding Network Topologies, Protocols, and QoS

Understanding Network Topologies

Network topology refers to the arrangement of elements in a communication network, such as computers, routers, and switches. It plays a crucial role in determining a network’s performance, scalability, and reliability.

Significance of Topologies

  1. Efficient Communication: A well-structured topology ensures smooth data transfer.
  2. Scalability: A good topology helps in expanding the network easily.
  3. Fault Tolerance: Some topologies are resilient to failures, ensuring uninterrupted
Read More

Core Concepts in Database Management Systems (DBMS)

Data Abstraction and Its Three Levels in DBMS

Data abstraction is a logical function in a Database Management System (DBMS) that separates the raw data from the front end. It hides the complexities of how data is stored and managed, providing a simplified view of the data to users and applications. Since efficiency often requires complex data structures to represent data, developers hide this complexity from users through several levels of abstraction to simplify interactions with the system:

Physical

Read More