rajeshsaxena18 / Using-Python-to-Interact-with-the-Operating-System-by-Google

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Python to Interact with the Operating System by Google on Coursera

google_logo-preview

Instructor(s) :

About this Course

By the end of this course, you’ll be able to manipulate files and processes on your computer’s operating system. You’ll also have learned about regular expressions -- a very powerful tool for processing text files -- and you’ll get practice using the Linux command line on a virtual machine. And, this might feel like a stretch right now, but you’ll also write a program that processes a bunch of errors in an actual log file and then generates a summary file. That’s a super useful skill for IT Specialists to know.

We’ll kick off by exploring how to execute Python locally, and organize and use code across different Python files. We'll then learn how to read and write different types of files, and use subprocesses and input streams. We'll also dive into Bash scripting and regular expressions -- both very powerful tools for anyone working with systems. We'll even touch on automatic testing, which allow us to automate how we check if our code is correct. To finish, we’ll put all this together by using the tools that we’ve acquired to process data and generate automatic reports.

We’ll also explain how to set up your own developer environment in your machine. This is a key step in being able to write and deploy powerful automation tools.

Syllabus

WEEK 1

  • Key Concepts
    • Have an understanding of the different operating systems
    • Utilize their Python environment and install additional Python modules, if needed
    • Run Python locally on their machines
    • Understand the benefits of automation but be aware of the pitfalls
    • Complete all assessments through Qwiklabs

Module 1: Getting Your Python On

In this module, you’ll learn about the different types of operating systems, and how you can get your python code ready to interact with the operating system. We’ll learn about getting your environment set up and installing additional Python modules that will help you along the way. We’ll rundown interpreted versus compiled language, and how they differ from each other. We’ll dive into the benefits of automation, and point out common pitfalls so you can avoid them. Finally, we’ll learn about Qwiklabs, which will be used for graded assessments.

Graded: Qwiklabs Assessment: Working with Python Scripts : Weightage 14%

WEEK 2

  • Key Concepts
    • Understand how to read, write, and iterate through files
    • Utilize the concept of managing files by moving, deleting, and renaming files
    • Understand how to create directories and navigate through directories
    • Define what CSV files are and be able to read from them
    • Understand how to write and make edits to CSV files within directories

Module 2: Managing Files with Python

In this module, you’ll learn about reading and writing to files and the commands that will enable you to do this. We’ll learn the importance of managing files and how we can navigate through different directories. We’ll understand how to work with files and how there is a layer of abstraction between Python and the operating system. Finally, we’ll dive into learning about CSV files and how to best utilize them.

Graded: Qwiklabs Assessment: Handling Files : Weightage 14%

WEEK 3

  • Key Concepts
    • Define what a regular expression is and why they’re useful
    • Utilize basic regular expression examples like simple matching or wildcard and character classes
    • Understand repetition qualifiers in detail
    • Utilize advanced regular expressions and understand how the exercises can be used in real-life scenarios

Module 3: Regular Expressions

In this module, you’ll learn about what a regular expression is and why you would use one. We’ll dive into the basics of regular expressions and give examples of wildcards, repetition qualifiers, escapare characters, and more. Next up, we’ll explore advanced regular expressions and deep dive on repetition qualifiers. You’ll tackle new exercises like capturing groups and extracting PIDs using regexes. Finally, we’ll provide a cheat sheet to serve as your go-to guide for regular expressions.

Graded: Qwiklabs Assessment: Working with Regular Expressions : Weightage 14%

WEEK 4

  • Key Concepts
    • Utilize Python to interact with a user to attain certain values
    • Use the input() module to interact with the user
    • Understand how subprocess.run works and interacts with system commands like ping
    • Understand what a log file is and be able to interact with log files using regular expressions
    • Use the get command to pull certain data out of log files

Module 4: Managing Data and Processes

In this module, we’ll learn about reading and writing to data files based on an interaction with the user. Along the way, we’ll dive into standard streams, environment variables, and command line arguments. Next, we’ll jump into Python subprocesses, including system commands and how they can be used. We’ll review how to obtain output from a system command, and dive into subprocess management, including how to check exit values and manipulate the normal versus error exit values. Finally, we’ll rundown processing log files, and will cover what a log file is, how to filter log files using regular expressions, and how to understand the output captured from log files.

Graded: Qwiklabs Assessment: Working with Log Files : Weightage 14%

WEEK 5

  • Key Concepts
    • Understand what testing is and the different types of testing available
    • Grasp the difference between black box and white box testing
    • Understand the concept of test-driven development
    • Apply a try-except construct to catch errors and exceptions

Module 5: Testing in Python

In this module, you’ll learn how to create tests in Python. We’ll cover what testing is all about and dive into the differences between manual versus automated testing. Next, we’ll explore what unit tests are intended to do and how to write them. Then, we’ll learn about other test concepts like black box versus white box tests and how test-driven development can frame how you design and write your code. Finally, you’ll learn about errors and exceptions, and how to combat them.

Graded: Qwiklabs Assessment: Qwiklabs Assessment: Implementing Unit Testing : Weightage 14%

WEEK 6

  • Key Concepts
    • Understand and use basic Linux commands by navigating through and making new directories, reading and creating files, and moving files between directories
    • Create bash scripts and execute them
    • Execute scripts using variables and globs to influence the output of these scripts
    • Utilize while and for loops in bash scripts
    • Understand when it’s necessary to use Bash scripts over Python scripts

Module 6: Bash Scripting

In this module, you’ll be exposed to what the Linux OS has to offer and you'll learn about Bash scripting. We’ll go over basic Linux commands and explore the many processes Linux has to offer, including a key concept called redirection. We’ll then deep dive into creating bash scripts using variables and globs. Finally, we’ll learn about advanced bash concepts and develop an understanding of when to use bash versus Python.

Graded: Qwiklabs Assessment: Editing Files Using Substrings : Weightage 14%

WEEK 7

  • Key Concepts
    • Approach the problem using the frameworks and best practices we’ve learned
    • Formulate a problem statement to understand the inputs and outputs of a script
    • Create a planned approach to solve the problem
    • Write a complex script which includes some of the skills we’ve learned in this course to solve this problem

Module 7: Final Project

In this module, you’ll put everything you’ve learned so far into action! You’ll apply your scripting knowledge to tackle a challenging final project: writing a script that scans for a specific error in the log files.

You'll create a problem statement to understand the challenge, conduct some research to see what options are available, then begin planning how you intend to solve the problem. Lastly, you'll write the code to implement your solution!

Graded: Qwiklabs Assessment: Log Analysis Using Regular Expressions : Weightage 16%

Kudos!!!

Warm Regards,
Piyush Sambhi
Email: piyush.sambhi07@icloud.com
Git URL: https://github.com/sambhipiyush

About


Languages

Language:HTML 85.9%Language:Python 5.4%Language:Jupyter Notebook 4.9%Language:TeX 3.6%Language:Shell 0.2%