Server Side Programming Articles - Page 2123 of 2650

Audio processing using Pydub and Google Speech Recognition API in Python

Hafeezul Kareem
Updated on 01-Nov-2019 08:19:42

883 Views

In this tutorial, we are going to work with the audio files. We will breakdown the audio into chunks to recognize the content in it. We will store the content of the audio files in text files as well. Install the following modules using the below commands.pip install pydubIf you run the above command, you will get the following successful messageCollecting pydub Downloading https://files.pythonhosted.org/packages/79/db/eaf620b73a1eec3c8c6f8f5 b0b236a50f9da88ad57802154b7ba7664d0b8/pydub-0.23.1-py2.py3-none-any.whl Installing collected packages: pydub Successfully installed pydub-0.23.1pip install audioreadIf you run the above command, you will get the following successful message.Collecting audioread Downloading https://files.pythonhosted.org/packages/2e/0b/940ea7861e0e9049f09dcfd 72a90c9ae55f697c17c299a323f0148f913d2/audioread-2.1.8.tar.gz Building wheels for collected packages: audioread Building wheel for audioread ... Read More

Barnsley Fern in Python

Hafeezul Kareem
Updated on 01-Nov-2019 08:11:37

448 Views

In this tutorial, we are going to learn about the Barnsley Fern, which is created by Michael Barnsley. The features of Barnsley Fern is similar to the fern shape. It is created by iterating over the four mathematical equations known as Iterated Function System(IFS). The transformation has the following formula.f(x, y)=$$\begin{bmatrix}a & b \c & d \end{bmatrix}\begin{bmatrix}x \y \end{bmatrix}+\begin{bmatrix}e \f \end{bmatrix}$$Source − WikipediaThe values of the variables are −Source − WikipediaThe four equation that Barnsley Fern proposed are −Source − WikipediaNow, we will see code to create the fern shape in Python.Example# importing matplotlib module for the plot import matplotlib.pyplot ... Read More

Basic Python Programming Challenges

Hafeezul Kareem
Updated on 01-Nov-2019 08:06:14

549 Views

In this tutorial, we are going to write a solution for a challenge.ChallengeWe have to generate a random set of basic arithmetic operations. The user will give the number of questions, and we have to generate questions. After every question, the user will answer it. At the end of the program, we have to give the score. Let's try it.Example# importing random and operator modules import random import operator # main function # taking number of questions that we have to generate def main(n):    print("Welcome to the quizYou should answer floats upto 2 decimals")    # initialising score to ... Read More

Beginner Tips for Learning Python

Vikram Chiluka
Updated on 12-Oct-2022 12:23:06

353 Views

Python is a computer programming language that is frequently used to create websites and software, automate tasks, and analyze data. Python is a general-purpose programming language, which means it can be used to create a wide range of programs and is not specialized for any particular problem. This versatility, combined with its ease of use for beginners, has made it one of the most widely used programming languages today It is regarded as the best language for beginners, to begin with. Nowadays, almost every company that has an application, a website, or any computer-driven hardware requires programming. Needless to say, ... Read More

Data analysis and Visualization with Python program

Hafeezul Kareem
Updated on 01-Nov-2019 07:58:30

379 Views

In this tutorial, we are going to learn about data analysis and visualization using modules like pandas and matplotlib in Python. Python is an excellent fit for the data analysis things. Install the modules pandas and matplotlib using the following commands.pip install pandaspip install matplotlibYou will get a success message after the completion of the installation process. We will first learn about the pandas and then will see matplotlib.pandasPandas is an open-source library of Python which provides data analysis tools. We are going to see some useful methods from the pandas for data analysis.Creating DataFramesWe need multiple rows to create ... Read More

type and isinstance in Python program

Hafeezul Kareem
Updated on 01-Nov-2019 07:49:32

213 Views

In this tutorial, we are going to learn about the type and isinstance built-in functions of Python. These functions are used to determine the type of an object in general. Let's see them one by one.type(object)type is used to know the type of an object. For example, if we have an object val with value 5. The type of that object is int. We can get that using the type function. Let's follow the general procedure to achieve the result.Initialize the object.Get the type of the object using type(object) function.Display the type.Below is one example which explains the type(object) function.Example# ... Read More

Automated software testing with Python

Hafeezul Kareem
Updated on 01-Nov-2019 07:51:47

696 Views

In this tutorial, we are going to learn about automating testing in Python. After writing code, we have to test them by giving different types of input and check whether the code is working correctly or not.We can do it manually or automatically. Doing manual testing is very hard. So, we are going to learn about automated testing in Python. Let's start.We have a module called unittest, which is used to test the code automatically. We are going to work with this module in this tutorial. It's straightforward for a beginner to get started with the unittest module for testing. ... Read More

Find frequency of smallest value in an array in C++

Arnab Chakraborty
Updated on 01-Nov-2019 07:23:53

367 Views

Here we will see how to find the frequency of smallest element in an array. Suppose the array elements are [5, 3, 6, 9, 3, 7, 5, 8, 3, 12, 3, 10], here smallest element is 3, and the frequency of this element is 4. So output is 4.To solve this we will find the smallest element of the list, then we count the occurrences of first numbers, and that will be the result.Example#include using namespace std;    int min_element(int arr[], int n){    int min = arr[0];    for(int i = 1; i

Find Excel column number from column title in C++

Arnab Chakraborty
Updated on 01-Nov-2019 07:21:57

273 Views

We know that the excel column numbers are alphabetic. It starts from A, and after Z, it will AA, AB, to ZZ, then again AAA, AAB, to ZZZ and so on. So column 1 is A, column 27 is Z. Here we will see how to get the column letter if number of column is given. So if the column number is 80, then it will be CB.Suppose we have a number n, and its value is 28, then we need to take reminder with 26. If the remainder is 0, then the number is 26, 52 and so on. ... Read More

Find elements which are present in first array and not in second in C++

Arnab Chakraborty
Updated on 01-Nov-2019 07:19:55

183 Views

Suppose we have two arrays A and B. There are few elements. We have to find those elements that are present in set A, but not in set B. If we think that situation, and consider A and B as set, then this is basically set division operation. The set difference between A and B will return those elements.Example#include #include #include #include using namespace std; void setDiffResults(int A[], int B[], int An, int Bn) {    sort(A, A + An);    sort(B, B + Bn);    vector res(An);    vector::iterator it;    vector::iterator it_res = set_difference(A, A + An, B ... Read More

Advertisements