The most popular programming languages in 2020 from the point of view of “StackOverflow”

The Stack Overflow website conducts an annual survey of developers to identify the most popular programming languages, and nearly 65,000 developers took part in its latest survey.

The poll was conducted earlier this year before the outbreak of the Coronavirus, and the results have now been made public. According to the survey, the “Rust” programming language is known as the most popular language among professional developers, although many developers are not very familiar with this language.

Rust promises performance, control, memory security and synchronization to developers, which is of great importance in systems programming. The language also provides some interesting features, such as the ability to add clean, uncluttered macros to the original code. These, together with the open-source development process, have led developers to refer to it as the most popular programming language.

Survey results from thousands of programmers: from the dominance of Java to the growing popularity of Python

Python continues to grow exponentially, but Java is still the most popular programming language. JavaScript is also the most widely used language.

JetBrains is one of the most well-known manufacturers of programming tools. The company’s IntelliJ IDEA Java development environment forms the basis of other IDEs, including Google Android Studio, and Apple, LinkedIn, and many reputable companies are their customers.

IEEE publishes list of best programming languages for 2020; Python topped

The Institute of Electrical and Electronics Engineers (IEEE) selected Python as the top programming language in 2020 for the third year in a row. In the organization’s ranking, Java and C are ranked second and third, respectively.

The Institute of Electrical and Electronics Engineers has published the popularity of 55 programming languages using 11 metrics and a list of the 2020 highlights. The organization draws on research from sources such as GitHub, StackOverflow, Google Search, Trends, Twitter, Reddit, and more.

Top 10 programming languages of 2020 according to IEEE

  • Python
  • Java
  • C
  • C++
  • JavaScript
  • R
  • Arduino
  • Go
  • Swift
  • MATLAB

Important Things to Know About Deep Learning (2021)

Important Things to Know About Deep Learning (Programming Languages for Deep Learning)

Deep-learning

Introduction:

In the past, computers simply performed tasks using a set of instructions given to them. Now, with significant advances in artificial intelligence (AI), computers are able to train with deep learning software without human intervention. Therefore, deep learning software has become very popular.
Deep learning is a promising and lucrative space that has achieved results that were thought impossible.
There are many resources for those who want to better understand Deep Learning. In this article, we will discuss the programming languages ​​that all programmers are familiar with, as well as the programming languages ​​for DeepLearning, the tools and the best DeepLearning software.

The best way to learn Python ( 2021)

Introduction

Python is a very popular language. It is also one of the languages ​​that are suitable for beginners. The best way to learn Python is to get an overview of everything you need to know about Python.
In this article, we will divide the Python learning process into 4 levels. Each level contains a set of tips that are needed at the next level.

Python learning steps

Everything you need to know about site design with Python!

Python is a high-level, object-oriented, open-source programming language that has helped many programmers accomplish their projects; Python is very popular with programmers because of its special features, which we will mention below, as well as its unparalleled simplicity. Right from the early ’90s, Python opened its way to site design to show its capabilities in this area as well!

Python has significantly reduced the speed of work for programmers and designers due to its simplicity and the availability of very powerful tools, libraries and platforms in the field of programming and web design.

In this article, I want to introduce you to site design with Python, the advantages of using it and Python’s approach to website design, so that we can go to the relevant tutorials in the following articles with a good introduction and background.

Comparison of PHP and Python

In recent years, Python has become one of the most popular programming languages. According to Google, since 2012, Python fans have even surpassed the popular PHP language, and predictions indicate that this language will be used before others in the future.

In this article, we are going to compare two popular languages, Python and PHP, and examine the capabilities of each.

FileNotFoundError: [Errno 2] No such file or directory

One of the error in Anaconda and Spyder and python is that:

FileNotFoundError: [Errno 2] No such file or directory: './data/test/body_acc_x_test.txt'

Solutions:

There are many solutions for it, but the best solution if that check the path and your filename, some times there is an unallowable character in your path or in the name of your file such as blank space or \.

two dimensional DtatFrame indexing in panda

One of the important libraries in data science and data engineering is that Panda. Data in panada is defined as DataFrame class.

In this post, I want to speak about indexing in DataFrame.

If you define a DataFrame as follow:

import pandas as pd

K = pd.DataFrame(np.random.rand(5,6))

0 0.457355 0.695109 0.960173 0.895233 0.913107 0.997462
1 0.159627 0.006112 0.751829 0.641470 0.430603 0.005721
2 0.167967 0.232892 0.000698 0.646807 0.359331 0.859992
3 0.114184 0.332704 0.224112 0.058897 0.547509 0.734783
4 0.623049 0.403003 0.384613 0.663572 0.866130 0.084359

You can not index, the value of K similar to array in python.

K[0,0]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “”, line 1, in
K[0,0]

File “/home/kazem/anaconda3/lib/python3.6/site-packages/pandas/core/frame.py”, line 2800, in getitem
indexer = self.columns.get_loc(key)

File “/home/kazem/anaconda3/lib/python3.6/site-packages/pandas/core/indexes/range.py”, line 353, in get_loc
return super().get_loc(key, method=method, tolerance=tolerance)

File “/home/kazem/anaconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py”, line 2648, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))

File “pandas/_libs/index.pyx”, line 111, in pandas._libs.index.IndexEngine.get_loc

File “pandas/_libs/index.pyx”, line 135, in pandas._libs.index.IndexEngine.get_loc

File “pandas/_libs/index_class_helper.pxi”, line 109, in pandas._libs.index.Int64Engine._check_type

KeyError: (0, 0)

Row selection :

Suppose, you want to extract first row, you must use iloc command.

K.iloc[0]

or

K.iloc[0,:]

Out[ ]:
0 0.457355
1 0.695109
2 0.960173
3 0.895233
4 0.913107
5 0.997462
Name: 0, dtype: float64

For selecting the first row, it is just enough to enter zero number in row indexing.

Multiple row selection :

If you want to extract the first and third row, you can use :

K.iloc[[0,2],:]


Out[14]:
0 1 2 3 4 5
0 0.457355 0.695109 0.960173 0.895233 0.913107 0.997462
2 0.167967 0.232892 0.000698 0.646807 0.359331 0.859992

As you see, the first and third row is extracted.

Now, if you want to extract the rows from first to third :

In [19]: K.iloc[range(0,3),:]


Out[19]:
0 1 2 3 4 5
0 0.457355 0.695109 0.960173 0.895233 0.913107 0.997462
1 0.159627 0.006112 0.751829 0.641470 0.430603 0.005721
2 0.167967 0.232892 0.000698 0.646807 0.359331 0.859992

This way is true for column too.

K.iloc[:,range(0,3)]


Out[20]:
0 1 2
0 0.457355 0.695109 0.960173
1 0.159627 0.006112 0.751829
2 0.167967 0.232892 0.000698
3 0.114184 0.332704 0.224112
4 0.623049 0.403003 0.384613

In the top code, we extract the first to third column.

Binary Indexing:

In some applications, it is necessary to index a DataFrame with a binary variable. The variable that is used for binary indexing must have the following conditions:

  • The size of the input vector must be the same with the number of rows or columns of DataFrame
  • The class of input vector must be bool.

Example :

import pandas as pd

K = pd.DataFrame(np.random.rand(5,6))

idx = [1,0,1,1,0]

We want to extract the first and third and fourth row of input DataFrame (K). Every place in idx that is one, shows the selected row. K has five rows, then idx has five cells too.

x = [bool(d) for d in idx]

Idx is a list and we must convert it to bool.

Now, we can simply apply the indexing as :

K.iloc[x,:]


Out[26]:
0 1 2 3 4 5
0 0.457355 0.695109 0.960173 0.895233 0.913107 0.997462
2 0.167967 0.232892 0.000698 0.646807 0.359331 0.859992
3 0.114184 0.332704 0.224112 0.058897 0.547509 0.734783

Binary Indexing in NumPy array :

import numpy as np

G = np.round(10*np.random.rand(6,3))

out :

array([[8., 7., 1.],
[9., 9., 6.],
[4., 9., 9.],
[3., 5., 5.],
[4., 2., 6.],
[2., 0., 9.]])

rb = G <= 5

out :

array([[False, False, True],
[False, False, False],
[ True, False, False],
[ True, True, True],
[ True, True, False],
[ True, True, False]])

G=0

out :

array([[8., 7., 0.],
[9., 9., 6.],
[0., 9., 9.],
[0., 0., 0.],
[0., 0., 6.],
[0., 0., 9.]])

array.shape[1] , IndexError: tuple index out of range

One of the problem in python, when you are working with array is that you want to find the number of column of an array, but it just give you the number of row.

For example :

I start with a list, suppose that you have a list :

A =[5,9,3,15]

This is a simple vector that you will use in most python code. It is a 4 in 1 matrix. If you want to find the number of row, it is enough to write :

num_row = np.shape(A)

The result is a tuple :

num_row
Out[ ]: (4,)

As you see, it just contain the number of row and the number of column is not claculated.

The number of rows can be extracted as

num_row[0]

But, if you want to extract the number of columns,

num_row[1]
Traceback (most recent call last):

File "", line 1, in
num_row[1]

IndexError: tuple index out of range

In Stachoverflow, there are some solution, but these ways can not help

https://stackoverflow.com/questions/7670226/python-numpy-how-to-get-2d-array-column-length

Some python programmer, suggest using Numpy and numpy.array

If you use this way,

z3 = np.array([0,2,0])

and then the number of row works well :

z3.shape[0]

But the number of columns get error agian:

z3.shape[1]
Traceback (most recent call last):

File "", line 1, in
z3.shape[1]

IndexError: tuple index out of range

Solution :

You just need to add a simple option when you create an array the the problem is solved.

z3 = np.array([0,2,0],ndmin = 2)

In this way, you can calculate the number of rows and columns well.

z3.shape[0]
Out[]: 1

z3.shape[1]
Out[]: 3

It is recommended to use this way to define an array then you have full control over your variable in your code.

You can use the size method too.

np.size(z3,0)
Out[ ]: 1

np.size(z3,1)
Out[ ]: 3