<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: hellocodeclub</title>
    <description>The latest articles on DEV Community by hellocodeclub (@hellocodeclub).</description>
    <link>https://dev.to/hellocodeclub</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F431648%2F7d626b97-4b2a-43d5-879a-dfc96ad18d39.png</url>
      <title>DEV Community: hellocodeclub</title>
      <link>https://dev.to/hellocodeclub</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hellocodeclub"/>
    <language>en</language>
    <item>
      <title>Install Hadoop on Mac – Ultimate Step by Step Guide</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Mon, 28 Mar 2022 21:20:21 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/install-hadoop-on-mac-ultimate-step-by-step-guide-17be</link>
      <guid>https://dev.to/hellocodeclub/install-hadoop-on-mac-ultimate-step-by-step-guide-17be</guid>
      <description>&lt;p&gt;In this tutorial you will learn how to install the hadoop system in your mac machine, including a brief reminder of what hadoop is and its architecture.&lt;/p&gt;

&lt;p&gt;When talking about hadoop, first idea that probably crosses your mind is big data. Hadoop emerged with big data as there was a need to store massive amount of data. Not only store it, but analyse it and access it in a reliable, scalable and affordable manner.&lt;/p&gt;

&lt;p&gt;The hadoop system solves two key big data problems. First problem, what if one of the computer fails? Traditionally if a machine fails, all information stored is lost, unless there is a backup. The hadoop system have mechanisms to avoid this problem.&lt;/p&gt;

&lt;p&gt;The second challenging problem was combining the information from different hard drives. When you are analysing large amount of data saved in many hard drives, accessing and combining this information can be a challenging. Fortunately, Hadoop also tackles this issue.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/_btD1nDY6hk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Hadoop?
&lt;/h2&gt;

&lt;p&gt;Hadoop is an open source software optimised for reliable and scalable distributed computing. What does that means? Distributed computing means that instead of a single computer carrying out a processing task, the task is performed by several machines. Multiple computers, all connected together to attempt one goal.&lt;/p&gt;

&lt;p&gt;The Hadoop software includes mechanisms that avoid data loss. And It is a scalable system, meaning more computers can be added to the system as the data grows.&lt;/p&gt;

&lt;p&gt;Hadoop is designed to handle large files. Once you store a file in Hadoop, the file will be split in smaller pieces and each piece stored in different a machine within the cluster. Plus each file block is replicated in several machines to avoid data loss.&lt;/p&gt;

&lt;p&gt;The whole system can be scaled up from one server to thousand of servers. As a result, the computation and storage power of each server is combined resulting in a really powerful system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/install-hadoop-on-mac-ultimate-step-by-step-guide/#Hadoop_architecture"&gt;Learn more about Hadoop's architecture&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/install-hadoop-on-mac-ultimate-step-by-step-guide/#Different_Installation_Modes"&gt;Learn about different installation modes&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Standalone installation
&lt;/h2&gt;

&lt;p&gt;As we have seen, you can install Hadoop on mac in three different mode. One of them is standalone. Standalone means that there are no separated daemons, all Hadoop processes are running on the same JVM. See below the steps to install Hadoop in standalone mode:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1) Check Java is installed
&lt;/h3&gt;

&lt;p&gt;Hadoop is a software written in Java, and behind the scenes is using Java. Therefore first thing to do is indicating to hadoop where Java is installed. To do so, you need to set up the JAVA_HOME enviroment variable on your machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-14.0.2.jdk/Contents/Home/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check that java is installed, by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;java --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2) Download Hadoop
&lt;/h3&gt;

&lt;p&gt;You can download hadoop from the following website: Download Hadoop&lt;/p&gt;

&lt;p&gt;Select any of the mirrors, then pick a version and download the file called hadoop-X.Y.Z.tar.gz.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3) Set up Hadoop environment variables
&lt;/h3&gt;

&lt;p&gt;Next step to install hadoop on mac is creating the hadoop environment variables. You will need to create the HADOOP_HOME environment variable, which will point to the directory where you uncompressed the previous file. You should also add this path the your PATH variable. See below the command you should execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export HADOOP_HOME=~/sw/hadoop-x.y.z
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/install-hadoop-on-mac-ultimate-step-by-step-guide/#Pseudodistributed_installation"&gt;Run Hadoop on Pseudo Distributed Mode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>datascience</category>
      <category>hadoop</category>
    </item>
    <item>
      <title>Graph Implementation Example in Java</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Mon, 28 Mar 2022 20:34:59 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/graph-implementation-example-in-java-1mhh</link>
      <guid>https://dev.to/hellocodeclub/graph-implementation-example-in-java-1mhh</guid>
      <description>&lt;p&gt;In this article you will see a &lt;strong&gt;graph implementation example in Java from scratch&lt;/strong&gt;. You will learn how to create and use a graph data structure in Java, practicing with a real exercise that I have seen in &lt;strong&gt;many interview processes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The example is an exciting and challenging problem to solve. Firstly I will introduce the problem itself and a possible way to solve it in Java.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;delivery service company&lt;/strong&gt; creates a system that will plan a route for a delivery truck to deliver customer orders. The planner will create a delivery area for each order, which is abstracted as a grid. The challenge is to write an algorithm to find a path for the truck to deliver the order.&lt;/p&gt;

&lt;p&gt;The delivery area is represented as a &lt;strong&gt;two-dimensional grid&lt;/strong&gt; of integers where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 represents an accessible area&lt;/li&gt;
&lt;li&gt;0 represents a non-accessible area&lt;/li&gt;
&lt;li&gt;2 represents the order destination&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This exercise is an excellent example in Java of how using the correct data structure can turn a seemingly complex problem into something much more straightforward. The problem becomes simpler when you &lt;strong&gt;use a graph implementation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Some stuff you should consider before starting. The truck can’t leave the grid and should get to the order destination through the accessible areas. And the truck can move one cell up, down, left, or right at a time.&lt;/p&gt;

&lt;p&gt;Here are some examples of different cases with the inputs and the corresponding outputs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Example 1
  grid = [[1,1,0],[0,1,2][0,1,1]]
  Output: [0,0][0,1][1,1][2,1][2,2][1,2]

  Example 2
  grid = [[1,1,1,1],[0,1,0,1],[0,1,0,1],[0,1,1,0],[0,1,2,1]]
  Output: [0,0][0,1][1,1][2,1][3,1][3,2]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;The best solution to this problem is using a java graph implementation. In general, a &lt;strong&gt;graph&lt;/strong&gt; is the right solution for &lt;strong&gt;any situation where you need to navigate a grid&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This solution will have two classes: &lt;code&gt;Cell&lt;/code&gt; class representing each matrix cell, and &lt;code&gt;DeliveryArea&lt;/code&gt; representing the area the truck should navigate. See the skeleton below, just the class and the method signatures. We will complete the implementation in the next section.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Z0qdLDwO2ns"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Cell {
    public int row;
    public int col;

    public Cell(int row, int col){
        this.row = row;
        this.col = col;
    }

    public String hashKey(){
        return String.valueOf(this.row)+String.valueOf(this.col);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.List;
import java.util.Map;

public class DeliveryArea {

    private final static int ACCESSIBLE_CELL = 1;
    private final static int NON_ACCESSIBLE_CELL = 0;
    private final static int DESTINATION = 2;

    public int[][] matrix;

    public DeliveryArea(int[][] matrix){
        this.matrix = matrix;
    }
    private Map&amp;lt;String, List&amp;lt;Cell&amp;gt;&amp;gt; buildGraph(){
        return null;
    }
    public List&amp;lt;Cell&amp;gt; findRoute(){
        return null;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/graph-implementation-example-in-java/#Write_Graph_Implementation_in_Java"&gt;Check out the full solution&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>datastructures</category>
      <category>tutorial</category>
      <category>career</category>
    </item>
    <item>
      <title>How To write a Rock Paper Scissors Game in Java - Step by Step</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Thu, 07 Oct 2021 07:58:16 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/how-to-write-a-rock-paper-scissors-game-in-java-step-by-step-dok</link>
      <guid>https://dev.to/hellocodeclub/how-to-write-a-rock-paper-scissors-game-in-java-step-by-step-dok</guid>
      <description>&lt;p&gt;In this article, I want to help you to design a &lt;strong&gt;Rock Paper Scissors Game in Java&lt;/strong&gt; step by step. And first step is overcoming your self-doubt and concentrate. &lt;/p&gt;

&lt;p&gt;You will put together everything you know about programming to build a rock paper scissors game that makes you feel proud of yourself. Let's see how you will achieve this step by step.&lt;/p&gt;

&lt;p&gt;We will start by analysing the game and defining the key entities in our problem. We will use the object oriented programming approach, meaning we will turn the entities into classes. &lt;/p&gt;

&lt;p&gt;Next we will define a skeleton implementation, in other words creating the classes but no code. And last we will fill up the classes with code and have a working rock paper scissors game.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/zwu7vz_VyQ4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Define How your Rock Paper Scissors Game works
&lt;/h2&gt;

&lt;p&gt;Let’s start by defining how the game should work. You will be creating a rock paper scissors text-based java game.&lt;/p&gt;

&lt;p&gt;The first step is &lt;strong&gt;writing down the steps of what the game should.&lt;/strong&gt; By doing so, it can help us identify the classes and actions that we will need our game. The steps are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;strong&gt;Game&lt;/strong&gt; welcomes the user.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;game&lt;/strong&gt; requests the user to enter &lt;strong&gt;his choice&lt;/strong&gt;(rock, paper or scissors)&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;user&lt;/strong&gt; types the selected option.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;game&lt;/strong&gt; picks randomly among rock, paper or scissors.&lt;/li&gt;
&lt;li&gt;Calculates the results.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;game&lt;/strong&gt; updates the &lt;strong&gt;total score&lt;/strong&gt;( how many games you play in total and won games)&lt;/li&gt;
&lt;li&gt;Display the &lt;strong&gt;score.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Ask the &lt;strong&gt;user&lt;/strong&gt; if he wants to continue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Writing down how the game will work is a great start. It helps you identify some of the main entities of the problem, so later you can turn them into class. In this case, we will create the following classes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RockPaperScissorsGame:&lt;/strong&gt; the entry point of the application&lt;br&gt;
&lt;strong&gt;Game Controller:&lt;/strong&gt; this class will represent the game itself, containing the scores, the player choices, and operations related to the game mechanism like calculate who won, etc.&lt;br&gt;
&lt;strong&gt;GameOption:&lt;/strong&gt; This class represents different options the player can select: rock, paper, or scissors.&lt;br&gt;
&lt;strong&gt;Player:&lt;/strong&gt; It helps indicate you won, the user, the machine, or the tie.&lt;br&gt;
&lt;strong&gt;Score:&lt;/strong&gt; It contains the total number of games player, and the number of games played by the user.&lt;/p&gt;
&lt;h2&gt;
  
  
  Create a Skeleton Implementation
&lt;/h2&gt;

&lt;p&gt;Now that we have an overall view of how the rock paper scissors java game will work and the main classes in our program, we can &lt;strong&gt;start creating them and give shape to our game.&lt;/strong&gt;&lt;br&gt;
At this option, I will advise you not to add implementation. The skeleton should contain the classes and the empty operations of these classes. These operations define how the classes interact with each other. For now the implementation is not necessary.&lt;/p&gt;
&lt;h3&gt;
  
  
  RockPaperScissorsGame class
&lt;/h3&gt;

&lt;p&gt;This class needs a main method since it is the entry point of our java program. Since we are going to interact with the game, we will create an instance of the class to access its operations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RockPaperScissorsGame&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;){&lt;/span&gt;

        &lt;span class="nc"&gt;GameController&lt;/span&gt; &lt;span class="n"&gt;gameController&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RockPaperScissorsGameController&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/rock-paper-scissors-game-in-java/#Create_a_Skeleton_Implementation"&gt;SEE HOW TO CREATE ALL OTHER CLASSES HERE&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Complete the Implementation
&lt;/h2&gt;

&lt;p&gt;Now we have created our application’s skeleton, and we have a better overall understanding of how the game will work. So it is an excellent time to start filling the gaps and &lt;strong&gt;get the game working.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s go &lt;strong&gt;back to our game’s entry point.&lt;/strong&gt; The entry point which is the main method. Every statement executed by the game will be inside the main method.&lt;/p&gt;

&lt;p&gt;Since you need to receive inputs from the user, we will need a Scanner class. Additionally, the game will run until the user indicates he wants to exit, so we will need a do-while loop to keep repeating.&lt;/p&gt;

&lt;p&gt;Inside the loop, the game will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Request the user selection and save it.&lt;/li&gt;
&lt;li&gt;Pick a random option&lt;/li&gt;
&lt;li&gt;Calculate the result&lt;/li&gt;
&lt;li&gt;And finally, display the game results and ask the user if he wants to continue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/rock-paper-scissors-game-in-java/#Complete_the_Implementation"&gt;SEE ALL JAVA CODE TO COMPLETE THE GAME HERE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoy this article, and thank you so much for reading and supporting this blog! Happy Coding! 🙂&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Apache Spark Java Tutorial: Simplest Guide to Get Started</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Mon, 09 Nov 2020 07:58:41 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/apache-spark-java-tutorial-simplest-guide-to-get-started-7hm</link>
      <guid>https://dev.to/hellocodeclub/apache-spark-java-tutorial-simplest-guide-to-get-started-7hm</guid>
      <description>&lt;p&gt;This article is an Apache Spark Java Complete Tutorial, where you will learn how to write a simple Spark application. No previous knowledge of Apache Spark is required to follow this guide. Our Spark application will find out the most popular words in US Youtube Video Titles.&lt;/p&gt;

&lt;p&gt;Firstly, I have introduced Apache Spark, its history, what it is, and how it works. And to continue, you will see how to write a simple Spark application.&lt;/p&gt;

&lt;h2&gt;
  
  
  History of Apache Spark
&lt;/h2&gt;

&lt;p&gt;The history of Apache Spark emerged at UC Berkeley, where a group of researchers acknowledges the lack of interactivity of the MapReduce jobs. Depending on the dataset’s size, a large MapReduce job could take hours or even days to complete. Additionally, the whole Hadoop and MapReduce ecosystem was complicated and challenging to learn.&lt;/p&gt;

&lt;p&gt;Apache Hadoop framework was an excellent solution for distributed systems introducing parallelism programming paradigm on distributed datasets. The worker nodes of a cluster will execute computations and aggregates results, producing an outcome. However, Hadoop has a few shortcomings: the system involves an elaborate set-up and not quite interactive. Fortunately, Apache Spark brought simplicity and speed to the picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Apache Spark?
&lt;/h2&gt;

&lt;p&gt;Apache Spark is a computational engine that can schedule and distribute an application computation consisting of many tasks. Meaning your computation tasks or application won’t execute sequentially on a single machine. Instead, Apache Spark will split the computation into separate smaller tasks and run them in different servers within the cluster. Therefore, maximizing the power of parallelism.&lt;/p&gt;

&lt;p&gt;Another critical improvement over Hadoop is speed. Using in-memory storage for intermediate computation results makes Apache Spark much faster than Hadoop MapReduce.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture with examples
&lt;/h2&gt;

&lt;p&gt;Apache Spark uses a master-slave architecture, meaning one node coordinates the computations that will execute in the other nodes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuidrw81hrdzgyj1h1byw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuidrw81hrdzgyj1h1byw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The master node is the central coordinator which executor will run the driver program. The driver program will split a Spark job is smaller tasks and execute them across many distributed workers. The driver program will communicate with the distributed worker nodes through a SparkSession.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/apache-spark-java-tutorial-simplest-guide-to-get-started/#Set_Up_Spark_Java_Program" rel="noopener noreferrer"&gt;Set Up Spark Java Program&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Write an Apache Spark Java Program
&lt;/h2&gt;

&lt;p&gt;And finally, we arrive at the last step of the Apache Spark Java Tutorial, writing the code of the Apache Spark Java program. So far, we create the project and download a dataset, so you are ready to write a spark program that analyses this data. Specifically, we will find out the most frequently used words in trending youtube titles.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/apache-spark-java-tutorial-simplest-guide-to-get-started/#Write_an_Apache_Spark_Java_Program" rel="noopener noreferrer"&gt;More Detailed Explanations of the below code&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;YoutubeTitleWordCount&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="no"&gt;COMMA_DELIMITER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;","&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;IOException&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

        &lt;span class="nc"&gt;Logger&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getLogger&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"org"&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;setLevel&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Level&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ERROR&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="c1"&gt;// CREATE SPARK CONTEXT&lt;/span&gt;
        &lt;span class="nc"&gt;SparkConf&lt;/span&gt; &lt;span class="n"&gt;conf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SparkConf&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;setAppName&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"wordCounts"&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;setMaster&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"local[3]"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nc"&gt;JavaSparkContext&lt;/span&gt; &lt;span class="n"&gt;sparkContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;JavaSparkContext&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// LOAD DATASETS&lt;/span&gt;
        &lt;span class="nc"&gt;JavaRDD&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;videos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sparkContext&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;textFile&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"data/youtube/USvideos.csv"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// TRANSFORMATIONS&lt;/span&gt;
        &lt;span class="nc"&gt;JavaRDD&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;titles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;videos&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;map&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;YoutubeTitleWordCount:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;extractTitle&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;StringUtils:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;isNotBlank&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="nc"&gt;JavaRDD&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;words&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;titles&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;flatMap&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toLowerCase&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;trim&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;replaceAll&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"\\p{Punct}"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;split&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;" "&lt;/span&gt;&lt;span class="o"&gt;)).&lt;/span&gt;&lt;span class="na"&gt;iterator&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;

        &lt;span class="c1"&gt;// COUNTING&lt;/span&gt;
        &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Long&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;wordCounts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;countByValue&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
        &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Entry&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;sorted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;wordCounts&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;entrySet&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;sorted&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Entry&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;comparingByValue&lt;/span&gt;&lt;span class="o"&gt;()).&lt;/span&gt;&lt;span class="na"&gt;collect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Collectors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toList&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;

        &lt;span class="c1"&gt;// DISPLAY&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Entry&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Long&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sorted&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getKey&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;" : "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getValue&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="o"&gt;}&lt;/span&gt;


    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;extractTitle&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;videoLine&lt;/span&gt;&lt;span class="o"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;videoLine&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;split&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="no"&gt;COMMA_DELIMITER&lt;/span&gt;&lt;span class="o"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ArrayIndexOutOfBoundsException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you enjoy this article, and thank you so much for reading and supporting this blog!&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>spark</category>
      <category>java</category>
      <category>bigdata</category>
    </item>
    <item>
      <title>Creating a Speech Recognition Program with Python &amp; Google API</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Tue, 03 Nov 2020 09:59:56 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/creating-a-speech-recognition-program-with-python-google-api-4kcd</link>
      <guid>https://dev.to/hellocodeclub/creating-a-speech-recognition-program-with-python-google-api-4kcd</guid>
      <description>&lt;p&gt;Speech Recognition means that the program will capture the words produced by a person and converts them into written words. It can be handy to generate subtitles, transcript a meeting discussion, and many other use cases.&lt;/p&gt;

&lt;p&gt;Converting speech to text is quite a complex machine learning problem where an algorithm needs to receive every sound produced by a person and identify the corresponding written letters. Plus, depending on the language used, different sounds might correspond to other characters. As a result, speech recognition is too complex to be solved using a traditional programming approach.&lt;/p&gt;

&lt;p&gt;Fortunately, big companies like Google, Amazon, IBM, and others have already solved this problem. They collected many audios, fed this data to algorithms using machine learning techniques, and produced trained algorithms to convert speech to text with really high accuracy. Plus, these algorithms are available through API's to easily integrate them into your programs.&lt;/p&gt;

&lt;p&gt;This article will show you how using Python, and the Google API can transcribe audio with a few code lines. Let's get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  Python Speech Recognition using Google Api
&lt;/h2&gt;

&lt;p&gt;Google offers a Speech-To-Text service through an API, meaning that you can send a request with an audio file, and you will receive the transcription of the audio file. This service makes simple, including python speech recognition functionality in your programs. &lt;br&gt;
&lt;a href="https://www.hellocodeclub.com/creating-a-speech-recognition-program-with-python-google-api/#Python_Speech_Recognition_using_Google_Api"&gt;See how to set-up a google account and configure it to access Google Speech-To-Text API&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Write the python program
&lt;/h2&gt;

&lt;p&gt;Once you have done all configuration needed to use the google speech-to-text API, you can move on to the last step, write the python program. &lt;/p&gt;

&lt;p&gt;Our program will need the third-party library google-cloud-speech, which will send requests to Google. You can install this library running the following command from your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; pip install --upgrade google-cloud-speech
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, you can copy the code below and save it as a python script. Please note the audio file should be in the same folder as the script. Also, you will need to replace the file name test.wav with your file name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;google.cloud&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io&lt;/span&gt;

&lt;span class="c1"&gt;# Creates google client
&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SpeechClient&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Full path of the audio file, Replace with your file name
&lt;/span&gt;&lt;span class="n"&gt;file_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__file__&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="s"&gt;"test.wav"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;#Loads the audio file into memory
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"rb"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;audio_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;audio_file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;audio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RecognitionAudio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RecognitionConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RecognitionConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AudioEncoding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LINEAR16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;audio_channel_count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"en-US"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Sends the request to google to transcribe the audio
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"config"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"audio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="c1"&gt;# Reads the response
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Transcript: {}"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;alternatives&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;transcript&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case your file has a different extension, you can convert it using an online file converter. &lt;a href="https://audio.online-convert.com/convert-to-wav"&gt;Go to m4a to wav converter.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If your program is working correctly, this is the output you will see after executing your script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; python speech_to_text.py # Replace with your program file name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Transcript: hey there in this area you will learn how you can set your django version there are a few ways
Transcript:  there are a few ways to check your django version and in this video I will show you a few of them I will also show you how you can upgrade and downgrade your django version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any errors?&lt;a href="https://www.hellocodeclub.com/creating-a-speech-recognition-program-with-python-google-api/#Troubleshooting"&gt;See some possible errors and how to fix them.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you enjoy his tutorial and thank you so much for reading! Happy coding!&lt;/p&gt;

</description>
      <category>python</category>
      <category>googlecloud</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How to Create Tkinter Progress Bar and DropDown</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Sun, 18 Oct 2020 08:38:28 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/how-to-create-tkinter-progress-bar-and-dropdown-344p</link>
      <guid>https://dev.to/hellocodeclub/how-to-create-tkinter-progress-bar-and-dropdown-344p</guid>
      <description>&lt;p&gt;In this article I will show you step by step how you can add a progress bar and a dropdown widget to you user interface developed using Tkinter. This article has two parts. First I will explain you how to create a window and add the dropdown. And how to add a callback, so the interface reacts if the user changes the dropdown. In the second part, I will demonstrate how to add a progress bar using Tkinter. Let’s get started.&lt;/p&gt;

&lt;p&gt;Check out the youtube video tutorial for this article&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/W8iw_Bajrl8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  Install Tkinter
&lt;/h1&gt;

&lt;p&gt;The Tkinter module is a built-in module, therefore you don’t need to install it. You can just import the module in your python file and use it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Create a Tkinter Window
&lt;/h1&gt;

&lt;p&gt;First I will create an empty window. Here is the code to create a window of size 200 by 200:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from tkinter import Tk

class App(Tk):
    def __init__(self):
        super().__init__()  # Create the window
        self.geometry('200x200') #Resize

app = App()
app.mainloop()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What is this code exactly doing? I have created a class that inherit from Tk. The Tk class contains all the graphical functionality to create a window. In the constructor method, &lt;code&gt;__init__&lt;/code&gt; I will call the constructor of the super class. That will create the window.&lt;/p&gt;

&lt;p&gt;Then I have resized the window to 200 by 200 using the .geometry() method.&lt;/p&gt;

&lt;p&gt;You can paste this code into IDLE or PyCharm, run it, and you will get your window created. Let’s move on to the next step, adding a dropdown.&lt;/p&gt;

&lt;h1&gt;
  
  
  Add Tkinter DropDown
&lt;/h1&gt;

&lt;p&gt;Now I m gonna show you how to add a dropdown like the one below. The dropdown allows you to select the gender, Male or Female. You can change these options to anything, and add as many options as you like.&lt;/p&gt;

&lt;p&gt;Here is the code to add the dropdown widget. I have placed the new piece of code between ##, just to mark the new piece of code added.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from tkinter import Tk, OptionMenu,StringVar

class App(Tk):
    def __init__(self):
        super().__init__()
        self.geometry('200x200')

        #NEW: Adding the dropdown ##
        self.gender_selected = StringVar()
        self.gender_selected.set("Select Gender")
        self.dropdown = OptionMenu(self, self.gender_selected, *["Male", "Female"])
        self.dropdown.grid(row=0,column=1)
        ###########################

app = App()
app.mainloop()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is this code doing? First I have created a variable that will hold the value selected in the dropdown, called gender_selected, see lines 9 and 10. If you select a different dropdown value, it will be saved in this variable.&lt;/p&gt;

&lt;p&gt;Next, I have created the dropdown widget using the OptionMenu class. Lines 11 and 12. Please note that you need to import this class to use it, otherwise you will get a syntax error when trying to run the program. The OptionMenu class takes three parameters: the window that will contain the widget, the variable that holds the widget value, and a list with the dropdown option.&lt;/p&gt;

&lt;p&gt;Next I have specified where in the window I want to place the dropdown, using the .grid() method. This is an important step, if I forget to add this, the widget won’t be displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/how-to-create-tkinter-progress-bar-and-dropdown/#Update_when_Tkinter_dropdown_changes"&gt;Find out how to trigger an action when the dropdown selected value changes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/how-to-create-tkinter-progress-bar-and-dropdown/#Add_Tkinter_Progress_Bar"&gt;Add tkinter progess bar to your app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoy the tutorial and thank you so much for reading! Happy Coding! :)&lt;/p&gt;

</description>
      <category>python</category>
      <category>tkinter</category>
      <category>gui</category>
    </item>
    <item>
      <title>Python Errors: Nameerror name is not defined and more</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Sun, 18 Oct 2020 08:07:23 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/python-errors-nameerror-name-is-not-defined-and-more-1o2d</link>
      <guid>https://dev.to/hellocodeclub/python-errors-nameerror-name-is-not-defined-and-more-1o2d</guid>
      <description>&lt;p&gt;Errors are inevitable when you are programming. As you write code, errors will start raising. The better you understand these errors, the easier it will be to avoid them. In this article you will learn the main python errors, how to interpret them and how they arise. For example, python nameerror name is not defined, what does this mean? You will find out by the end of this tutorial.&lt;/p&gt;

&lt;p&gt;he goal of an error, or exception, is flagging something unexpected happened while running the code. Some of these situation arise frequently. Therefore python contains some built-in exceptions that capture the more frequent unexpected situation. Below we will go through each of those exception types and see what’s the meaning behind.&lt;/p&gt;

&lt;h1&gt;
  
  
  SyntaxError: invalid syntax
&lt;/h1&gt;

&lt;p&gt;This error occurs when the code you write doesn’t follow the python syntax rule. For example, not closing a parenthesis will lead to a syntax error. The python parser won’t be able to parse the code if it doesn’t follow the syntax rule, therefore it can’t process it any further. Let’s see some examples:&lt;/p&gt;

&lt;h2&gt;
  
  
  Example #1
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list = [1, 23, 45, 0, 9]
for item in list
    print(item)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  File line 2
    for item in list
                   ^
SyntaxError: invalid syntax
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code raised an unexpected situation, because line 2 is missing the colon at the end, which breaks the python syntax rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example #2
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list = [1, 23, 45, 0, 9]
for item in list:
    print(item
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  File line 4

                 ^
SyntaxError: unexpected EOF while parsing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above raised an error because line 3 is missing the closing parenthesis.&lt;/p&gt;

&lt;h1&gt;
  
  
  Python Nameerror name is not defined
&lt;/h1&gt;

&lt;p&gt;You will encounter a nameerror ( name is not defined) when a variable is not defined in the local or global scope. Or you used a function that wasn’t defined anywhere in your program. For example, you will see this error if you try to print a variable that wasn’t defined. You might also see this error when you use a built-in library, but forget to import the library first. Let’s see a few code examples:&lt;/p&gt;

&lt;h1&gt;
  
  
  Example #1
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;number = 1
print(num)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traceback (most recent call last):
  File line 4, in &amp;lt;module&amp;gt;
    print(num)
NameError: name 'num' is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usually this error is highlighting that there is a typo in one of the variable names.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example #2
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def print_age(age):
    print('My age is: '+str(age))

print__age(14)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traceback (most recent call last):
  File line 4, in &amp;lt;module&amp;gt;
    print__age(14)
NameError: name 'print__age' is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This issue is similar to the previous example, but applied to function. Although there is a “print age” function, the function name is print, underscore and age, however when I called the function I used double underscore __. That’s why the code can’t find the function&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/python-errors-nameerror-name-is-not-defined-and-more/"&gt;Read more about KeyError, ModuleNotFoundError, AttributeError and IndexError&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/how-to-fix-no-module-named-tkinter-error/"&gt;Find out How to Fix – no module named tkinter error&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/how-to-fix-valueerror-too-many-values-to-unpack/"&gt;How to Fix Valueerror: too many values to unpack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/how-to-fix-typeerror-a-bytes-like-object-is-required-not-str/"&gt;Fix Typeerror a bytes-like object is required not ‘str’&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoyed the article and thanks for reading! Happy Coding! 😃&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Runnable vs Callable</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Sat, 03 Oct 2020 08:37:48 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/runnable-vs-callable-35f5</link>
      <guid>https://dev.to/hellocodeclub/runnable-vs-callable-35f5</guid>
      <description>&lt;p&gt;In this article you will learn what is a runnable , what is a callable and the difference between the two in java, runnable vs callable. These concepts are important when you are dealing with concurrency.&lt;/p&gt;

&lt;p&gt;Concurrency basically means there is not just one execution thread in your program, but several executions or threads, potentially happening simultaneously. Therefore different pieces of the code might be executed at the same time.&lt;br&gt;
Let's get started! &lt;/p&gt;
&lt;h1&gt;
  
  
  Runnable
&lt;/h1&gt;

&lt;p&gt;The Runnable interface in java enables you to define a block of code that can be executed within its own thread. Therefore if you create several runnable classes and execute them, and you will have several threads running at the same time within the same process or program. This is known as concurrency. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/runnable-vs-callable-find-out-the-differences/#Runnable"&gt;See examples of how to use a runnable interface&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Callable
&lt;/h1&gt;

&lt;p&gt;Next is callable. Callable is also a java interface and as Runnable, you can use it to run tasks in parallel. However there is a key difference. The callable can return the result of the task or throw an exception. The Callable interface is included in Java to address some of runnable limitations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/runnable-vs-callable-find-out-the-differences/#Callable"&gt;See examples of how to use a runnable interface&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Runnable vs Callable - The difference
&lt;/h1&gt;

&lt;p&gt;The main difference between Runnable and Callable is that Callable will return the result of executing the task to the caller. If you use Runnable you can't return anything, any result will need to be saved in separated shared structure or database. To understand this difference runnable vs callable, you can compare the two interfaces.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public interface Runnable {
    public abstract void run();
}

public interface Callable&amp;lt;V&amp;gt; {
    V call() throws Exception;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.hellocodeclub.com/runnable-vs-callable-find-out-the-differences/#How_to_execute_a_runnable"&gt;How to execute a runnable&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hellocodeclub.com/runnable-vs-callable-find-out-the-differences/#How_to_execute_a_callable"&gt;How to execute a callable&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoy the article and thank you so much for reading and supporting this blog! 🙂&lt;/p&gt;

</description>
      <category>java</category>
      <category>concurrency</category>
      <category>runnable</category>
      <category>callable</category>
    </item>
    <item>
      <title>How to Check Django Version – Ultimate Guide 2020</title>
      <dc:creator>hellocodeclub</dc:creator>
      <pubDate>Fri, 21 Aug 2020 08:27:26 +0000</pubDate>
      <link>https://dev.to/hellocodeclub/how-to-check-django-version-ultimate-guide-2020-31d5</link>
      <guid>https://dev.to/hellocodeclub/how-to-check-django-version-ultimate-guide-2020-31d5</guid>
      <description>&lt;p&gt;There are different ways you can check your django version. In this article I will share a couple of them. I will also share how you can upgrade and downgrade the django version. How you can uninstall django, something that you might do if you are running into problems and decide to uninstall it and install Django again.&lt;/p&gt;

&lt;p&gt;Finding the django version can be useful if you want to make sure your python and django versions are compatible. I have also included a section to show how to find the python version that you are using.&lt;/p&gt;

&lt;p&gt;Find your django version can also be useful to make sure a feature you are using, is supported that the django version installed&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/kuEppJuqFIU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  How can I check Django version?
&lt;/h1&gt;

&lt;p&gt;The way you check your Django version depends on if you installed Django on you base python installation or you installed the module in a virtual environment. Let’s see first how to check your version on the base python installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking Django version with Idle
&lt;/h2&gt;

&lt;p&gt;To achieve this, open the idle terminal and type the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;django&lt;/span&gt;
&lt;span class="n"&gt;django&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_version&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output(you should get something similar):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'3.0.8'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You could also use the following code, that will return the same results, but slightly different format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;django&lt;/span&gt;
&lt;span class="n"&gt;django&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;VERSION&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(3, 0, 8, 'final', 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Checking Django version with pip
&lt;/h2&gt;

&lt;p&gt;You can also check the version through pip using. Run the following command on your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip3 freeze
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Django==3.0.8  # Django version
docutils==0.14
dominate==2.5.1
Flask==1.1.1
Flask-Bootstrap==3.3.7.1
importlib-metadata==1.6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If django is in your python installation, it will be listed along with any other module installed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hicodeclub.com/how-to-check-django-version-ultimate-guide-2020/"&gt;Check out your django version in a virtualenv or using the django scripts&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Upgrade Django version
&lt;/h1&gt;

&lt;p&gt;You can upgrade django and any module installed using the pip command. You can run the following command from your terminal, or the Pycharm terminal. As before, if you are working on a virtual environment, make sure you activate the environment before running the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install --upgrade django
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will upgrade to the latest available version&lt;/p&gt;

&lt;h1&gt;
  
  
  Downgrade Django version
&lt;/h1&gt;

&lt;p&gt;In case you would like to downgrade, you can do this via pip as well, using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install -v Django==3.0.5 #Replace with your version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find a list with all the available django version here&lt;/p&gt;

&lt;p&gt;As before in case you are working on a virtualenv, make sure it is activated. Or if you have several python version installed in your computer, make sure your pip command you are using belongs to the python installation you are using to run your python program. You can check this by running the linux which command from your terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;which pip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output should be same folder or subfolder as where your python version is installed.&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://www.hellocodeclub.com/how-to-check-django-version-ultimate-guide-2020/"&gt;the following article&lt;/a&gt; to see how to install and uninstall python, and see your local python version&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
    </item>
  </channel>
</rss>
