1A: English Dictionary App import json print("Welcome to Dictionary app")print("Please select your choice")print("1. Add a word")print("2. Find the meaning")print("3. Update the word")print("4. Exit") f = open('word.txt','w')coll_words = {}json.dump(coll_words,f)f.close() while True: n=int(input('Enter the choice:'))…
Ashfaq Ali
updated on 30 Apr 2022
Project Details
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Read more Projects by Ashfaq Ali (23)
Project 2
5. Import first 1500 rows of tables (College_A_HS, College_A_SE, College_A_SJ, College_B_HS, College_B_SE, College_B_SJ) into MS Excel.
09 Aug 2022 09:58 AM IST
Project 2 - EDA on Vehicle Insurance Customer Data
A company has customer data that contains 8 columns of customer details and another table having name customer_policy data contains the policy details of the customer. The company intends to offer some discount in premium for certain customers. To do that they ask their Data scientist team to get some information. Hence,…
20 Jul 2022 08:29 AM IST
Unsupervised Learning - Kmeans Week 11 Challenge
1. How does similarity is calculated if data is categorical in nature Categorical data are converted to numerical data using label encoding or one hot encoding then when comparing two records if the value for the categorical data is the same in both records then the similarity measure is zero if the values are…
17 Jul 2022 11:44 AM IST
Project 1
-- Data cleaning on Automobile 1985 dataset and perform descriptive analytics I have worked on the dataset for conversion of raw data into a form that will make it easy to understand & interpret, ie., rearranging, ordering, and manipulating data to provide insightful information about the provided data. The dataset…
15 Jul 2022 01:09 PM IST
Supervised Learning - Classification Week 9 Challenge
1. What is a Neural Network? Neural networks are a class of machine learning algorithms used to model complex patterns in datasets using multiple hidden layers and non-linear activation functions. Neural networks, also known as artificial neural networks (ANNs) or simulated neural networks (SNNs), are a subset…
09 Jul 2022 08:17 AM IST
Supervised Learning - Classification Week 8 Challenge
1. Apply knn to the “Surface defects in stainless steel plates” and identify the differences See the document below 2. What are the pros and cons of knn K- Nearest Neighbors or also known as K-NN belong to the family of supervised machine learning algorithms which means we use labeled (Target…
08 Jul 2022 02:20 PM IST
KNN (Breast Cancer) Prediction
import pandas as pdimport numpy as npimport seaborn as snsimport matplotlib.pyplot as pltget_ipython().run_line_magic('matplotlib','inline') # Get the data from sklearn.datasets import load_breast_cancer cancer=load_breast_cancer() # Data set presenting in dictionary formcancer.keys() dict_keys(['data', 'target',…
07 Jul 2022 08:47 PM IST
Supervised Learning - Classification Week 7 Challenge
Pros and cons of SVM “Support Vector Machine” (SVM) is a supervised machine learning algorithm that can be used for both classification or regression challenges. However, it is mostly used in classification problems. In the SVM algorithm, we plot each data item as a point in n-dimensional…
06 Jul 2022 12:13 PM IST
Titanic data analysis using logistic regression
import pandas as pdimport numpy as npimport seaborn as snsimport matplotlib.pyplot as pltimport math% matplotlib inline titanic_data1=pd.read_csv("train.csv")titanic_data1.head(12) print('No of passengers in original data:' + str(len(titanic_data1.index))) Analyzing the data : sns.countplot(x="Survived",data=titanic_data1)…
04 Jul 2022 12:31 PM IST
Random Forest Classification
import pandas as pdimport numpy as npimport seaborn as sns Loading the data set: df=sns.load_dataset("penguins")df.head() df.shape df.info() df.isnull().sum() Drop Null Values: df.dropna(inplace=True) df.isnull().sum() Feature Engineering: One hot encoding transforming categorical data into…
04 Jul 2022 12:31 PM IST
Supervised Learning - Prediction Week 3 Challenge
1. Perform Gradient Descent in Python with any loss function import numpy as np def gradient_descent(x,y): m_curr = b_curr = 0 iterations=1000 n=len(x) learning_rate=0.001 for i in range(iterations): y_p = m_curr * x + b_curr cost= (1/n) * sum([val**2 for val in (y - y_p)]) md = -(2/n) * sum(x * (y - y_p)) bd = -(2/n)…
22 Jun 2022 07:32 AM IST
Basics of ML & AL Week 2 Challenge
1)Calculate all 4 business moments using pen and paper for the below data set? sol: See the Document in pdf 2)What is the significance of expected value when simple mean (Sum of all observations/number of observations) is already in place It is true that a simple mean is sufficient enough for having…
19 Jun 2022 09:11 AM IST
Basics of Probability and Statistics Week 1 Challenge
1. Why there is a difference in the formula of variance for population and sample The main difference between population variance and sample variance relates to the calculation of variance. Variance is calculated in five steps. First mean is calculated, then we calculate deviations from the mean, and thirdly the deviations…
16 Jun 2022 11:34 AM IST
C2C E-Commerce User’s Behaviour Analysis (Project-1 )
Create new schema as ecommerce 2.Import .csv file users_data into MySQL -- 3.Run SQL command to see the structure of tableUSE ecommerce;DESC users_data; -- 4.Run SQL command to select first 100 rows of the databaseUSE ecommerce;SELECT * FROM users_data LIMIT 100; -- 5.How many distinct values exist in table…
24 May 2022 05:18 PM IST
Project 1 - English Dictionary App & Library Book Management System
1A: English Dictionary App import json print("Welcome to Dictionary app")print("Please select your choice")print("1. Add a word")print("2. Find the meaning")print("3. Update the word")print("4. Exit") f = open('word.txt','w')coll_words = {}json.dump(coll_words,f)f.close() while True: n=int(input('Enter the choice:'))…
30 Apr 2022 09:15 AM IST
Air standard Cycle
write code that can solve an otto cycle and make plots for it. """otto cycle simulator""" import mathimport matplotlib.pyplot as plt #input p1= 101325t1= 500gamma=1.4t3=2300#write code that can solve an otto cycle and make plots for it. #geometric parametresbore=0.1stroke=0.1con_rod=0.15cr=12 #volume coputation…
27 Apr 2022 08:39 PM IST
Solving second order ODEs
import numpy as npfrom scipy.integrate import odeintimport matplotlib.pyplot as pltimport math #function that return dz/dtdef model(theta,t,b,g,l,m): theta1=theta[0]theta2=theta[1]dtheta1_dt= theta2dtheta2_dt= -(b/m)*theta2-(g/l)*math.sin(theta1)dtheta_dt= [dtheta1_dt, dtheta2_dt]return dtheta_dt b=0.02g=9.81l=1m=0.1 #initial…
27 Apr 2022 08:38 PM IST
Solving second order ODEs
Code: clear allclose allclc b = 0.05;g = 9.81;l = 1;m = 0.1; % initial conditiontheta_0 =[0;5];% time pointst_span = linspace(0,10,250); % solve ODE[t, results] = ode45(@(t,theta) ode_func(t, theta, b, g, l, m), t_span, theta_0); plot(t, results(:,1))hold on plot(t, results(:,2))ylabel('plot')xlabel('time')title('for simple…
27 Apr 2022 08:38 PM IST
Genetic Algorithm
A genetic algorithm is a search-based optimization technique based on the principles of genetics and natural selection. It is frequently used to find optimal or near-optimal solutions. we can apply the genetic algorithm that is not well suited for the standard optimization algorithm. MATLAB ga calculates the minimum value…
27 Apr 2022 08:37 PM IST
QR code generator
import qrcodefrom tkinter import *from tkinter import messagebox #Creating the window wn = Tk()wn.title('DataFlair QR Code Generator')wn.geometry('700x700')wn.config(bg='black') #Function to generate the QR code and save it def generateCode():#Creating a QRCode object of the size specified by the userqr = qrcode.QRCode(version…
27 Apr 2022 04:25 PM IST
Set countdown Timer
import timefrom tkinter import *from tkinter import messagebox# creating Tk windowroot = Tk()# setting geometry of tk windowroot.geometry("300x250")# Using title() to display a message in# the dialogue box of the message in the# title bar.root.title("Time Counter")# Declaration of variableshour=StringVar()minute=StringVar()second=StringVar()#…
27 Apr 2022 12:06 PM IST
Restaurant Management system
from tkinter import*import randomimport time root = Tk()root.geometry("1600x700+0+0")root.title("Restaurant Management System") Tops = Frame(root,bg="white",width = 1600,height=50,relief=SUNKEN)Tops.pack(side=TOP) f1 = Frame(root,width = 900,height=700,relief=SUNKEN)f1.pack(side=LEFT) f2 = Frame(root…
27 Apr 2022 12:01 PM IST
Project 1 - Parsing NASA thermodynamic data
Specific heat: %cp=(a1+a2T+a3T^2+a4T^3+a5T^4)*R %function for specific heat function Cp = specificheat(a1,a2,a3,a4,a5,a8,a9,a10,a11,a12,T,local_mid_temp,R)%comparing with global Terature if T> local_mid_temp% for first a1 to a7 seven coeffCp = R*(a1 + a2*(T) + a3*((T).^2) + a4*((T).^3) + a5*((T).^4)); else% for last…
25 Oct 2021 04:48 PM IST