Found 33676 Articles for Programming

How to check the execution time of Python script?

Niharika Aitam
Updated on 09-Aug-2023 14:45:08

13K+ Views

The python script is the file that can store the code which is used to execute a specific task or set of tasks. This file is saved with the file extension “.py”. The python script can be created and edited in any text editor and can be executed using the command line prompt or can be imported as a package or module into the integrated development environment(IDE). Each python script will take some time to execute the file; it can be calculated by using the following ways. Using the time Module In python, we have the time module which ... Read More

How to check multiple variables against a value in Python?

Niharika Aitam
Updated on 09-Aug-2023 14:42:47

4K+ Views

The variable is an entity that stores on different values. When we assign a new value, every time, the previous value will be replaced with the new one. In python, a variable can be alphabetic, underscore, numeric value starting with the alphabet etc. The multiple variables can be against a value; it can be checked by using the following ways in python. Using logical ‘or’ and ‘and’ One of the way to check multiple variables against a value in python is by logical or and and. The and operator will check if all the variables are equal to their ... Read More

How to Check Loading Time of Website using Python

Niharika Aitam
Updated on 09-Aug-2023 14:35:53

810 Views

We use different websites in our day to day life. Every particular website will take some time to load the content. Mathematically, we can get the loading time by subtracting the time obtained with the reading time of the whole website. In python we have few packages and modules to check loading time of the website. Steps/Approach The following are the steps that we need to follow to get the loading time of the website. Let’s see each step one by one. Firstly, we have to import the required libraries into our python environment. The following is the lines ... Read More

Exploring Categorical Data

Mithilesh Pradhan
Updated on 09-Aug-2023 11:24:02

897 Views

Introduction Categorical data is a type of data that takes a fixed number of values and there is no possible logical order in such variables. Categorical variables can be blood groups, yes-no situations, gender, ranking (ex. first, second, third), etc. Categorical variables most of the time undergo encodings such as one hot encoding, and nominal encoding to represent them in binary or integer format for the Machine Learning use case under consideration. Categorical Data and related terms Mode is the most common central tendency associated with categorical variables/observations. It is the value in the set of observations that has the ... Read More

How to check if Time Series Data is Stationary with Python?

Niharika Aitam
Updated on 09-Aug-2023 14:34:50

471 Views

Time series is a collection of data points, which are recorded at regular intervals of time. It is used to study the trend of patterns, relationship between the variable over the defined time. The common examples of time series are stock prices, weather patterns and economic indicators. It analyzes the time series data by the statistical and mathematical techniques. The main aim of the time series is to identify the patterns and trends of the previous data to forecast the future values. The data is said to be stationary, if it doesn’t change with the time. It is necessary ... Read More

How to Check if Tensorflow is Using GPU?

Niharika Aitam
Updated on 09-Aug-2023 14:32:59

710 Views

GPU is abbreviated as Graphics Processing Unit. It is a specialized processor designed to handle the complex and repetitive calculations required for video encoding or decoding, graphics rendering and other computational intensive tasks. It is mainly suited to perform the large scale parallel computations, which makes ideal for the machine learning and other data based applications. The GPU in machine learning has become more popular as it reduces the time required to train complex neural networks. Tensorflow, Pytorch, keras are the built-in frameworks of machine learning which supports the GPU acceleration. The following are the steps to check if Tensorflow ... Read More

5 Machine Learning Projects to Implement as a Beginner

Mithilesh Pradhan
Updated on 09-Aug-2023 11:17:59

135 Views

Introduction Machine Learning is a diverse area with a wide range of applications in many domains. As far as we have an abundance of usable data and a problem to solve in a particular area, Machine Learning can do wonders. Machine Learning Projects can vary in terms of complexity from simple Regression tasks for predicting sales, and wine quality to complex tasks like Object Recognition, Autonomous Vehicles, and Reinforcement Learning. However, for someone who is a beginner in Machine Learning, the discussed below 5 projects can be highly useful. Predicting the Quality of Wine For folks who are a beginner ... Read More

How to Check If Python Package Is Installed?

Niharika Aitam
Updated on 09-Aug-2023 10:57:54

3K+ Views

In Python we have a number of modules and packages which needs to be installed to work with. We have various ways to check if a python package is installed in python environment. Package is a directory which contains one or more python modules and also has the __init__.py file which is an initialization file. For using the package, we have to import it by its name. These can be inbuilt packages or allows developers to create the reusable code that can be imported into other programs by avoiding the duplicating of code. Using try and except When we ... Read More

How to check if Pandas column has value from list of string?

Niharika Aitam
Updated on 09-Aug-2023 10:52:40

2K+ Views

In pandas library, we create the data in the form of rows and columns. The columns can be of string data type. The list of strings means the list containing the string elements. Pandas is one of the libraries in python which is abbreviated as Python Data Analysis Library. It is used to perform data analysis, data cleaning, data manipulations and scientific calculations. The data in pandas library is represented in columns and rows. It has many functions and modules which are used to perform data analysis and manipulations. Python provides different ways to check if pandas column has ... Read More

How to check if an object is iterable in Python?

Niharika Aitam
Updated on 09-Aug-2023 10:36:47

1K+ Views

Iterable object is the object that can be iterated through all its elements using a loop or an iterable function. The lists, string, dictionary, tuples etc. are all known as iterable objects. There are different ways to check if an object is iterable or not in the Python language. Let’s see them one by one. Using a loop In python, we have two looping techniques, one is using the ‘for’ loop and the other is using the ‘while’ loop. Using any one of these two loops, we can check whether the given object is iterable or not. Example In ... Read More

Advertisements