I am going to automate you with Python | Reverse Python Lab
Tags: python, beginners, career, productivity
Published: 2019-08-29 08:39:28

<h3>Hey <b>DEV</b> Network!</h3>

In this lab, I am going to automate you with Python so you will start to fly end of this experiment.

Before we go on, check my previous post to boost your learning speed, it will help you to code fast and effectively.
{% link https://dev.to/coderasha/secrets-of-reverse-programming-learn-coding-faster-1dbm %}

Alright! Let's start with pre-lab procedures.

<h4>What concept is this lab about?</h4>
<p>You will see how Python is expressive, productive and useful in just about any career.</p>

<h4>What is the overall purpose of the lab?</h4>
<p>The main objective is to help you gain in-depth knowledge of Python programming and show how you can use it in your daily life.</p>

<h4>What is special with this lab?</h4>
<p>The lab will provide you with great resources to learn Python effectively and step by step. </p>

<p>Initially, let me quickly introduce you what Python is used for.</p>
<p>Python continues to climb the ranks of the world's most popular programming languages not just amongst software engineers but also amongst mathematicians, data analysts, scientists, accountants, network engineers and even kids! It is used across various fields from web and game development to machine learning, AI, scientific computing and academic research. Because it is a multi-purpose language, which means it can be used to build just about anything with the right tools/libraries.</p>

<p>If you constantly have to do boring, repetitive tasks, such as copying files, moving them, uploading them to the server, you can write a Python script to automate all that stuff and save your time.
These tasks are simple but time-consuming for humans, and they’re often so trivial or specific that there’s no ready-made software to perform them. Armed with a little bit of Python programming knowledge, you can have your computer do these tasks for you. So you don't have to be a software developer to use Python. You might be an accountant, a mathematician or a scientist and use Python to make your work easier.</p>

<p>I am highly recommending you to read "Automate the Boring Stuff with Python", this book shows you how to use Python to automate tasks
like Reading and Writing Files, Web Scraping, Debugging, Organizing Files, Working with Excel, PDF files and CSV files and much more.</p>

<blockquote>"Any sufficiently advanced technology is equivalent to magic.”–Sir Arthur C. Clarke</blockquote>

Now, let's go through our lab!

<h4>Python Basics</h4>
![Python](https://thepracticaldev.s3.amazonaws.com/i/iwx27e7d2inksf75i0mh.png)
<p>Python does have a lot going for it in terms of simplicity. In many ways, doing stuff in python is easier, but you still need to search the libraries, learn what's applicable, and work through writing code to achieve whatever issue you're attempting to fix.</p>
<p>Python provides great readability and easy-to-learn syntax that helps beginners use this language of programming. It is intended to be as easy as possible so that more programming time is spent. You will find Python code is so much more readable than any other languages because it is designed to be English like. For instance, The first code example below is written in C++:</p>
```c++
#include stdout

int main()
{
	std::cout << "Hello, world!\n";
}
```
And here’s code with the same output in Python 3:
```python
print("Hello, world!")
```
<p>Python is supported with excellent self data structures that are different and very useful. They are powerful, you will spend less time to figure out about the data structure and more time to figure out implementing the code. </p>

<p>Here are some great resources to help you learn the basics of Python:</p>
<ul>

<li><a href="https://www.codecademy.com/">Codeacademy</a> — does a good job of teaching basic syntax, and builds</li> 
<li><a href="https://learnpythonthehardway.org/">Learn Python the Hard Way</a> — a book that teaches Python concepts from the basics to more in-depth programs.</li>
<li><a href="https://teamtreehouse.com/library/topic:python">Treehouse</a> — My first Python teacher was Kenneth Love from Treehouse Python Boot Camp.</li>
<li><a href="https://realpython.com/learning-paths/python3-introduction/">Introduction to Python</a> — Learn fundamental concepts for Python beginners that will help you get started on your journey to learn Python. These tutorials focus on the absolutely essential things you need to know about Python.</li>
<li><a href="https://www.youtube.com/watch?v=rfscVS0vtbw">Learn Python - Full Course for Beginners [freeCodeCamp]</a> — This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!</li>
</ul>

<p>These is the best resources I have seen so far but if you have better suggestions write down on comment section. Usually paid tutorials are better than free one, because the materials are well organized and the instructors will also provide supports if you encounter problems. But according to the trend in the market, Codecademy is considered the best for beginning willing to learn the basics of coding. For the advanced stages, Treehouse is the best as they actually have the courses that prepare the programmers to code in real-life projects.</p>

<p>Once you learned basics of Python, it is time to build small projects to improve your knowledge. <a href="https://codeclubprojects.org/en-GB/python/">Code Club</a> provides best resources to practice basics of Python with small interesting projects.</p>
![Code Club](https://thepracticaldev.s3.amazonaws.com/i/ulaohkvd2qq3rcvarpfz.png)


<h4>Web Development with Python</h4>
<p>Thanks to all the incredible frameworks that make Python web development fast and simple. The framework is basically a package of packages and modules that provide certain features and can be selectively modified to produce application-specific software. </p>

<p>So how do you choose the right framework? Django and Pyramid are the way to go for full-fledged web applications. For better control and visualization or prototyping an app, Web2py or Flask might be the way to yo. CheeryPy is a must-have for easy, minimalist alternatives.
Tornado will handle 10,000 or more concurrent connections to your app
at the same time, while Dash is the perfect choice for analytics.</p>

<p>Let's take look powers of Python for web development. I mainly will focus on most popular framework Django.</p>

<h5>Used and trusted by many popular companies</h5>
<p>Companies like Bitbucket, Instagram, Dropbox, Pinterest, Disqus and others are using Python frameworks like Django and Pyramid in their app growth. These frameworks will manage almost everything you throw at them, and that's part of why Python's web development is so popular.</p>

<blockquote>Disqus, a popular blog comment hosting service, has more than eight billion page views and 45K request per second through Python framework Django.</blockquote>

<a href="https://www.netguru.com/blog/top-10-django-apps-and-why-companies-are-betting-on-this-framework">Top 10 Django Apps and Why Companies Are Betting on This Framework</a>

<a href="https://www.quora.com/Should-I-learn-Django-in-2019">Should I learn Django in 2019?</a>

<h5>Hides complex low-level information</h5>
<p>The above-mentioned frameworks are fully-equipped open-source toolkit with extremely customizable architecture, it promotes rapid growth and easy code structure and that is why I recommend Python web development for beginners as well as for the experienced developers.</p>


<h5>Time-Saver</h5>
<p>Time is money. You will save your gold time by using these frameworks.It is ideal for creating simple prototypes or projects on a budget with brief deadlines.</p>
<h5>Web Security</h5>
<p>By default, Django prevents most common security mistakes:</p>
<ul>
<li><b>XSS (cross-site scripting) protection</b> — Django template system by default escapes variables, unless they are explicitly marked as safe. </li>
<li><b>CSRF (cross site request forgery) protection </b>— easy to turn on globally, guarantees that forms (POST requests) are sent from your own site.</li>
<li><b>SQL injection protection</b> — Django uses built-in ORM, thus there is no risk of SQL injection (raw queries are possible, but by no means something that a beginner would need to use).</li>
</ul>
<p>For more information check <a href="https://docs.djangoproject.com/en/2.2/topics/security/">Django Security</a></p>
<p>With the good web framework, however, you don’t have to worry about that because there has been a lot of work put into preventing any misuse of the web application.</p>

<p>I am going to show you resources for learning Django because it is most popular framework of Python and I highly recommending you to start with Django. There is a lot of resources on internet but following tutorials are the best and beginner-friendly for become Full-Stack Python Developer<p>


<ul>
<li><a href="https://realpython.com/learning-paths/become-python-web-developer/">Real Python</a> — This learning path will provide you with the foundational skills you need to become a Python web developer. You will cover the most popular Python web development frameworks like Django and Flask, working with databases, as well as fundamental front-end coding skills like HTML.</li>
<li><a href="https://simpleisbetterthancomplex.com/">Simple is Better Than Complex</a> — Stories and Tutorials about Python, Django and Web Development</li>
<li><a href="https://www.udemy.com/python-and-django-full-stack-web-developer-bootcamp/">Python and Django Full Stack Web Developer Bootcamp (Udemy)</a> — Learn to build websites with HTML , CSS , Bootstrap , Javascript , jQuery , Python 3 and Django!  </li>
<li><a href="https://www.youtube.com/user/CodingEntrepreneurs">CodingEntrepreneurs</a> — Coding for Entrepreneurs is a Programming Series for Non-Technical Founders. Learn Django, Python, APIs, Accepting Payments, Stripe, JQuery, Twitter Bootstrap, and much more. </li>
<li><a href="https://www.youtube.com/watch?v=n-FTlQ7Djqc&list=PL4cUxeGkcC9ib4HsrXEYpQnTOTZE1x0uc">The Net Ninja Django Series</a> — Django tutorial by Net Ninja introduce you to what exactly Django is and why we would want to use it as web developers. </li>
</ul>

<h4>Data Science and ML with Python</h4>

<img src="https://thepracticaldev.s3.amazonaws.com/i/utjmv0msgsc7zoqwkpq2.png" alt="Data Science with Python" />
<p>Python is one of the most popular choices for Data Science because of its easier learning curve and useful libraries. Python makes it easier for the user to implement solutions while following the standards of required algorithms. </p>


<blockquote>
<h5>Python emerging as the leader</h5>
Take the case of the tech giant Google that has created the deep learning framework called tensorflow – Python is the primary language used for creating this framework. Its footprint has continued to increase in the environment promoted by Netflix. Production engineers at Facebook and Khan Academy have for long been using it as a prominent language in their environment — <a href="https://marutitech.com/python-data-science/">Is Python the most popular language for data science?</a>
</blockquote>

<img src="https://thepracticaldev.s3.amazonaws.com/i/mo6hz6pyc5fsjxhc1bri.jpeg" alt="AI and ML"/>
<p> Imagine a computer which can make decision and predictions based on the data you have given it before.</p>

<p>There are two main reasons why Python is the best for ML or in general AI: its simplicity, as well as the full range of available libraries and frameworks. In consideration of the drawbacks, Python is far from the only choice of languages that can be used in machine learning. Among many others, R, Java™, and C++ are other languages that are used for ML. In addition, if someone just wanted to learn ML concepts, they wouldn't have to write any code at all to get a nice knowledge. To apply the ideas, however, particularly as a start.</p>

<p>Python should be learned by a beginner programmer wishing to work on AI techniques. Even if they discover that they prefer to add another language to their programs later in the process, some knowledge of the language is essential to both understanding prior job and having a head start on constructing their own projects.</p>

<p>Solving a Data Science and ML problems involves data pre-processing, analysis, visualization, predictions, and data preservation. Here is the some powerful statistical and numerical packages of Python:</p>
<ul>
<li><b>NumPy</b> and <b>pandas</b> (Python Data Analysis Library) allow you to read/manipulate data efficiently and easily.</li>
<li><b>Matplotlib</b> allows you to create useful and powerful data visualizations.</li>
<li><b>Scikit-learn</b> allows you to train and apply machine learning algorithms to your data and make predictions. Also <b>PyBrain</b> and <b>Tensorflow</b> for some neural network</li>
<li><b>Cython</b> allows you to convert your code and run them in C environment to largely reduce the runtime and improve your model performance.</li>
<li><b>BeautifulSoup</b> package for parsing HTML and XML documents. It creates a parse tree for parsed pages that can be used to extract data from HTML, which is useful for web scraping.</li>
</ul>

<p>Check these gold sources to start your learning path to become great Data Scientist:</p>

<ul>
<li><a href="https://www.udemy.com/the-data-science-course-complete-data-science-bootcamp/">The Data Science Course 2019: Complete Data Science Bootcamp</a> — Complete Data Science Training: Mathematics, Statistics, Python, Advanced Statistics in Python, Machine & Deep Learning</li>
<li><a href="https://www.dataquest.io/">Dataquest</a> — Learn Python, R, SQL, data visualization, data analysis, and machine learning. Try any of 60 free missions now and start your data science journey.</li>
<li><a href="https://www.amazon.com/gp/product/1491957662/ref=as_li_tl?ie=UTF8&tag=buy05cb-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=1491957662&linkId=42a9a64770e07dcad65b36017f058970">Python for Data Analysis</a> — It will cover all the basics, like data aggregations and time series while at the same time take through basic python exercises that will help you learn how to apply Pandas to actual problems. </li>
<li><a href="https://www.youtube.com/watch?v=ua-CiDNNj30">Learn Data Science Tutorial - Full Course for Beginners</a> — Learn Data Science is this full tutorial course for absolute beginners.</li>
<li><a href="https://www.fast.ai/">Fast AI</a> — research lab bundled with courses, an easy-to-use Python library with a huge community. </li>
<li><a href="https://www.youtube.com/playlist?list=PLQVvvaa0QuDfKTOs3Keq_kaG2P55YRn5v&ref=hackr.io">Practical Machine Learning Tutorial with Python</a> — The objective of this course is to give you a holistic understanding of machine learning, covering theory, application, and inner workings of supervised, unsupervised, and deep learning algorithms.</li>
</ul>

<h4>Cybersecurity with Python</h4>
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/h1ob6xpqy4wibmp4qxmj.jpg)
<p>Learning a programming language gives you an edge in cybersecurity because it allows for a deeper understanding of how applications function. Having this capability increases your chances of recognizing vulnerabilities and figuring out how to fix them.</p>

<p>Python will allow you to automate tasks and conduct malware analysis. Cybersecurity experts can use Python to create attack simulations, build intrusion detection systems and scan wireless networks without depending on third-party tools. Python is one of the programming languages of choice for people working in the cybersecurity field. It's easy to learn, high-performance and versatile.</p>

<p>Here is the cool cyber resources that will help you to become a ethical hacker: </p>
<ul>
<li><a href="https://www.udemy.com/learn-python-and-ethical-hacking-from-scratch/">Learn Python & Ethical Hacking From Scratch</a> — Start from 0 & learn both topics simultaneously from scratch by writing 20+ hacking programs</li>
<li><a href="https://www.cybertraining365.com/cybertraining/LearningPaths/Ethical_Hacking_with_Python">Ethical Hacking with Python </a> — Though targeted towards complete beginners, this course also serves as a handy refresher for seasoned programmers for who want to sharpen their coding skills.</li>
<li><a href="https://www.youtube.com/watch?v=5sqye64-1-k&list=PLBf0hzazHTGO7wysZIzstZi1han97XY16">Python For Ethical Hacking</a> —  how to use Python to create network tools and Ethical Hacking scripts. This series will take you from beginner to intermediate/advanced in Python.</li>
<li><a href="https://www.amazon.com/Cracking-Codes-Python-Introduction-Building/dp/1593278225">Cracking Codes with Python</a> — After a crash course in Python programming basics, you’ll learn to make, test, and hack programs that encrypt text with classical ciphers like the transposition cipher and Vigenère cipher.</li>
<li><a href="https://www.amazon.com/Black-Hat-Python-Programming-Pentesters-ebook/dp/B00QL616DW">Black Hat Python: Python Programming for Hackers and Pentesters </a> — When it comes to creating powerful and effective hacking tools, Python is the language of choice for most security analysts. But just how does the magic happen?</li>
</ul>

<p>It is good know at least basics of hacking with Python.</p>
```terminal
python3 makeDevFly.py
```
![fly with python](https://thepracticaldev.s3.amazonaws.com/i/g5rkmjq3ai7cx09du7jx.png)
<p>I hope you learned something from this lab 😃 and if you found it useful, please share it with friends and family who you think may find it useful too! Join me on social media and as always <b>Stay Connected!</b>🚀</p>
<a href="https://www.instagram.com/coderasha/?hl=en">Instagram</a>
<a href="https://twitter.com/coderasha?lang=en">Twitter</a>
 support me by <a href="https://www.buymeacoffee.com/xT2K0N1PY">buying me a cup of coffee</a>😊☕