Skip to main content

Posts

React Form Validation

Validation means to check that the data that is entered into the form is correct or not, react-js use bootstrap classes to implement validation practically. Step by Step React JS Validation Process Example1: import { useState } from "react" ; const isEmailValid = ( email ) => {     const emailPattern = / ^ [ a-zA-Z0-9._- ] + @ [ a-zA-Z0-9.- ] +\. [ a-zA-Z ] {2,10} $ / ;     return emailPattern . test ( email );   }; function Formvalidation () {     const [ inputValue , setInputValue ] = useState ( undefined );     const [ error , setError ] = useState ( undefined );     const [ email , setEmail ] = useState ( undefined );     const handleInputChange = ( e ) => {         const value = e . target . value ;       //  setInputValue(value);             // Validate if the input is not empty         if ( ! val...

Learn Programming Free By ShivaTutorials.

  Learn Programming and Interview Questions 2022, FREE, FREE, FREE By Shiva Tutorials #Codingclasses , https://youtu.be/RjzeBD4gVc8

Data Science Introduction

Data science is a way to try and discover hidden patterns in raw data. To achieve this goal, it makes use of several algorithms, machine learning(ML) principles, and scientific methods. The insights it retrieves from data lie in forms structured and unstructured. So in a way, this is like data mining. Data science encompasses all- data analysis, statistics, and machine learning. With more practices being labelled into data science. Text Analysis Statistical Analysis Diagnostic Analysis Predictive Analysis Prescriptive Analysis TEXT ANALYSIS:- Text Analysis is also referred to as Data Mining. It is a method to discover a pattern in large data sets using databases or data mining tools. It used to transform raw data into business information. Business Intelligence tools are present in the market which is used to take strategic business decisions. Overall it offers a way to extract and examine data and deriving patterns and finally interpretation of the data. Statistical Analysis It is use...

NumPy in DataScience

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, It is a predefined library of python which is used to perform a mathematical operation using predefined methods. NumPy uses array-type data to perform the operation. it contains array-type data to accept input data. Operation using NumPy:- Using NumPy, a developer can perform the following operations − ⦁    Mathematical and logical operations on arrays. ⦁    Fourier transforms and routines for shape manipulation. ⦁    Operations related to linear algebra. NumPy has in-built functions for linear algebra and random number generation. What is the Difference between NumPy Array and List? 1)  Numpy array has n-th dimensional means it can be one dimension to nth dimension but the list has only 1 or 2 dimension approach. 2) Numpy array is used to contain data of data science to implement multiple functionalities of scipy, NumPy, pandas, and matplotlib ...

SCIPY in Data Science

Scipy is the special library of python which is used to perform an advanced mathematical operation using the different predefined methods. It is the top layer of NumPy because NumPy is used to perform the basic mathematical operation , scipy mostly focus on l inear algebra and other a dvanced mathematical function . SCIPY was written as a SIGH PY word. How do we install scipy in the machine? if you want to install scipy with a core python or python shell then you can use the command python -m pip install scipy. pip install scipy Q)Create Script to write File in Matlab format and load it using scipy library? Matlab is a programming language that is a specialist in scientific programming. If we want to convert application data to Matlab format or Matlab format data to the application means we want to implement read and write operation then we can scipy library io module. 1) savemat():-  It is used to write application data to Matlab format 2) loadmat():-  It is used to read a...

Statistical function in SCIPY

All of the statistics functions are located in the sub-package  scipy.stats  and a fairly complete listing of these functions can be obtained using  info(stats)  function Normal Continuous Random Variable from scipy.stats import norm import numpy as np print(norm.cdf(np.array([1,-1., 0, 1, 3, 4, -2, 6]))) CDF means the Cumulative Distribution Function.   In probability theory and statistics, the cumulative distribution function of a real-valued random variable, or just distribution function of, evaluated at, is the probability that will take a value less than or equal to. To find the median of distribution, we can use the Percent Point Function (PPF), which is the inverse of the CDF. Let us understand by using the following example. from scipy.stats import norm import numpy as np print(norm.ppf(0.8)) To generate a sequence of random variates, we should use the size keyword argument, which is shown in the following example. from scipy.stats import n...

Constant package of SCIPY

It is used to provide a value of the constant in data science mathematical operation, Scipy provide the constant package to get the value of all standard constant. from scipy.constants import pi import scipy from scipy.constants import pi print("sciPy - pi = %.16f" % scipy.constants.pi) #print(scipy.constants.find()) print(scipy.constants.physical_constants["alpha particle mass"]) Another example:- import scipy from scipy.constants import pi print(pi) print(scipy.constants.golden) print(scipy.constants.c) print(scipy.constants.Avogadro) print(scipy.constants.find()) print(scipy.constants.physical_constants["alpha particle mass"]) Unit Categories The units are placed under these categories: Metric Binary Mass Angle Time Length Pressure Volume Speed Temperature Energy Power Force from scipy import constants print(constants.yotta)    #1e+24 print(constants.zetta)    #1e+21 print(constants.exa)      #1e+18 print(constants.peta)     #1000...