Skip to content

Instantly share code, notes, and snippets.

View Arunprakash-A's full-sized avatar

Arun Prakash A Arunprakash-A

View GitHub Profile
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Bringing Python to Broswer!</title>
<link rel="stylesheet" href="/css/main.css">
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
# import required packages
import numpy as np
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.linear_model import Perceptron
from sklearn.metrics import hinge_loss
# create a linearly separable datapoints
x,y = make_classification(n_redundant=0,n_features=2,n_clusters_per_class=1)
%--------------------Instructions----------------------------%
% 1.This file is to help you to code only the core part and act as just a template.
% 2.You can modify any line of the code as you wish
% 3.It is must to Comment on the dimenstion of all variables in the
% code where and when necessary.
% 4. Give the proper names for the variables
% 5.Dont take screenshot of the screen for the record submission
%---------------------End----------------------------------------%
% % Coder: Your name goes here
% Matlab 2015 Code Template
clc;
clear all;
close all;
%load noisy speech
[noisy,Fs] = audioread('path to noisy.wav file');
% plot the noisy speech in time domain. xlabel: Time in seconds
@Arunprakash-A
Arunprakash-A / IIR_analog_Butter.m
Last active May 26, 2021 17:10
IIR Butterworth filter design in Matlab
% ************IIR Analog Butterworth Filter Design ******************%
%************* Author : Arun Prakash A ******************************%
clc;
clear all;
close all;
% Specifications
Wp=2*pi*100; % Passband cutoff in rad/s
Ws=2*pi*200; % stopband cutoff in rad/s
Fs=8000; % Sampling Frequency
%**********************Designing of LP FIR Filter*************************%
%************Author : Arun Prakash A *******************************%
clc;
close all;
clear all;
n=7; % Order of the filter : change it to 71 and see what happens
w=0.5;
h_n=fir1(n,w);
[H,W]=freqz(h_n,1);
% window(:,1)=H;
% ************* Study the Effect of Windowing on FIlter Response************** %
% ************ Author : Arun Prakash A *************************************** %
clc;
clear all;
close all;
step = 0.001;
%Frequency Domain Spec
W=-pi:step:pi; % range of digital frequncy
Wc = -pi/2 : step : pi/2; % cutoff freq
%% Computing FFT for Basic Signals and plot the spectra %%
%% Author: A Arun Prakash Mail:a.arun283@gmail.com %%
clc
close all;
%Generae sin signal of 10 Hz
Fs=1000; % Sampling Frequency > 2 * fmax , here fmax = 10
t=0:(1/Fs):1;
x=sin(2*pi*10*t);