What is exactly can do with Python? Here is Python's 3 main applications._ what can you do with Python? The following are the 3 main applications of Python.

Source: Internet
Author: User

Original link

First, statement 1, what can I do with python?

I observed that Python has three main popular applications:

    • Website development;
    • Data science – including machine learning, data analysis and data visualization;
    • Make a scripting language.

Second, the website development

The site framework will help you create Python-based server-side code (back-end code) that will run on your server, in contrast to the user's device and browser (front-end code). Python-based web frameworks such as Django and Flask have recently become popular in web development.

1, why do I need a website framework?

Because the site framework will make it easier to build back-end common logic. This includes mapping different URLs to Python code blocks, working with databases, and generating HTML files that users see on the browser.

2, which Python web framework should I use?

The Django and flask frameworks are most popular for web development using Python, and if you're just starting out, I recommend using one of these.

What is the difference between 3,django and flask?

Gareth Dwyer wrote a good article on this topic, I quote here:

The main difference:

  • Flask provides simple, flexible, and granular control, which is not arbitrary (it allows you to decide how to implement things).
  • Dijango provides an exhaustive experience: you will get a management panel, database interface, ORM (Object Relational mapping), and a directory structure for applications and projects.

You should probably choose:

  • Flask, if you focus on experience and learning opportunities, or if you want to manage the use of components more (for example, what databases you want to use and how to interact with them).
  • Django, if you focus on the final product, especially if you're developing a simple application, such as a news site, an e-store, or a blog, what you want is always a simple, obvious way to do things.

In other words, if you are a beginner, flask may be a better choice because it requires fewer components to handle. In addition, if you want more customization, flask is a better choice.

Also, according to my data engineer friend Jonathan T Ho, flask is better than Django to create something called the rest API.

On the other hand, if you want to build something directly, Django might get you to implement it faster.

Third, Data Science 1, first of all, let's review what is machine learning

I think the best way to explain what is machine learning is to give you a simple example.

Suppose you want to develop a program to automatically detect the contents of a picture.

So, according to the picture below (Figure 1), you want your program to recognize that it is a dog.

Figure 1

Look at the other one below (Figure 2), and you want your program to recognize it as a table.

Figure 2

You might say that I can write some code. For example, if there is a lot of light brown pixels in the picture, then we can say that it is a dog.

Or, you can find out how to detect the edges in an image. then, you might say, if there's a lot of straight edges, then it's a table.

However, this approach quickly becomes tricky. What if there's a white dog in the photo with no brown hair? What if the picture only shows the circular part of the table?

This is where machine learning comes in.

Machine learning typically implements an algorithm that automatically detects patterns in a given input.

You can give machine learning algorithms for 1000 dog pictures and 1000 table pictures. then, it will learn the difference between a dog and a table. when you give it a new picture of a dog or table, it can identify which one it is.

I think it's kind of like a baby learning something new. How does a baby know that one thing looks like a dog and the other looks like a table? may come from some examples.

You may not explicitly tell a baby, "If a thing is furry and has light brown hair, then it is probably a dog." ”

You might say, "That's a dog." " It's also a dog." this is a table. that one is also a table. "

Machine learning algorithms work roughly the same way.

You can apply the same idea to the following:

    • Referral System (think YouTube, Amazon, and Netflix);
    • Human face recognition;
    • Speech recognition.

in other applications, Popular machine learning algorithms you may have heard of include:

    • Neural networks;
    • Deep learning;
    • Support Vector machine;
    • Random forest.

You can use any of these algorithms to solve the image tagging problem I explained earlier.

2, using Python for machine learning

There are a number of popular machine learning libraries and frameworks for Python

Two of the most popular are Scikit-learn and TensorFlow.

    • Scikit-learn comes with some of the more popular machine learning algorithms. I mentioned some of the above.
    • TensorFlow is a low-level library that allows you to build custom machine learning algorithms.

If you have just started a machine learning project, I suggest you start with Scikit-learn first. If you start to experience efficiency issues, then I'll start researching TensorFlow.

3, how do I learn machine learning

To learn the basics of machine learning, I recommend a machine learning program at Stanford or Caltech.

Note that you need the basics of calculus and linear algebra to understand some of the materials in these courses.

Then I'll practice what you've learned from these lessons with Kaggle. It is a site where people compete to build the best machine learning algorithms for a given problem. They also have a good tutorial for beginners.

4, using Python for data analysis and data visualization

One of the most popular data visualization libraries is matplotlib.

This is a good start because:

    • It's easy to start.
    • Some other libraries, such as Seaborn, are based on this. Therefore, learning matplotlib will help you learn about other libraries later.

5, how do I learn to use Python for data analysis and data visualization?

You should first learn the basics of data analysis and visualization.

After learning the basics of data analysis and visualization, it is also helpful to learn the basics of statistics from websites such as Coursera and Khan Academy.

Iv. scripting language 1, what is a scripting language?

Scripting often refers to writing small programs that are designed to automate simple tasks.

Let me give you an example of my personal experience.

I worked in a small company in Japan with an email support system. This is a system where we can answer questions that customers send us via e-mail.

When I work there, my task is to calculate the number of messages that contain specific keywords so that we can analyze the messages we receive.

We could have done it manually, but I wrote a simple program/simple script to automate the task.

In fact, we used Ruby to do this, but Python is also a good language to do this kind of task. Python is suitable for this type of task primarily because its syntax is relatively simple and easy to write. It can also be used to quickly write small things and test them.

2, what is an embedded application?

I'm not an expert on embedded applications, but I know Python works with Rasberry Pi (Raspberry Pi). in hardware enthusiasts, it seems to be a popular app.

3, what is the relevance of the game?

You can use a library called Pygame to develop the game, but it's not the most popular game engine. you can use it to build a hobby project, but if you are serious about game development, I personally will not choose to use it to develop.

Instead, I recommend that you start with C # in Unity and C # is one of the most popular game engines. It allows you to build a game for many platforms, including Mac, Windows, iOS, and Android.

4, what is the relevance of the embedded program?

You can use Tkinter to make one with Python, but it doesn't seem to be the most popular choice either.

In contrast, languages such as Java, C #, and C + + seem to be more popular.

Recently, some companies have also started using JavaScript to create desktop applications.

For example, slack desktop applications are built with something called electronics. It allows you to build desktop applications using JavaScript.

Personally, if I'm building a desktop application, I'll choose a javascript option. It allows you to reuse some of the code in the Web version.

However, I am not an expert on desktop applications, so if you disagree or agree with me, please let me know in the comments.

5, using Python3 or Python2?

I recommend Python3 because it is more modern, and at this point it is more popular.

Five, comments and summaries

Affected by the left ear mouse predecessor, from this week began to adhere to a weekly arts, so this week began with this technical article.

This article mainly from the python most commonly used three application fields, introduced what is the website development, the development frame choice, what is the machine learning, the machine learning Library choice, the recommended machine learning course, as well as the data visualization learning process; scripting language application in games and embedded programs Finally, the selection of the Python repository.

This article is intended for beginners of beginner Python, who are struggling with Python's choice of application direction and library, and who are not sure where to start learning web development, machine learning, and scripting languages.

(The first attempt to translate and collate foreign technical articles, if there are shortcomings can be proposed, I hope that their translation skills can progress a little bit every day)

What is exactly can do with Python? Here is Python's 3 main applications._ what can you do with Python? The following are the 3 main applications of Python.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.