Git Product home page Git Product logo

it-cert-automation-practice's Introduction

Google IT Automation with Python Professional Certificate - Practice files

This repository contains the practice files used throughout the courses that are part of the Google IT Automation with Python Professional Certificate

There's a separate folder for each course.

it-cert-automation-practice's People

Contributors

marga-google avatar marga-personal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

it-cert-automation-practice's Issues

Validation.py (mordenize)

Expected Behavior

Code should be more fast and short and mordenize.

Actual Behavior

Code is not that fast.
in

Steps to Reproduce the Problem

Making code more modernized and efficient by using nested if-else statements.

Specifications

  • Version:
  • Platform:

improve-username-behavior

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Issue with validating username initials

Expected Behavior

Return false if usernames starts with "." or "_".

Actual Behavior

The script is returning True in those situations.

Steps to Reproduce the Problem

  1. Call the script with a username that starts with a "." or "_".

Specifications

  • Version:
  • Platform:

Username should start with a letter in lowercase

Expected Behavior

Returns False if the first letter of the username is not a letter in lowercase

Actual Behavior

Returns True when the first letter of the username is not a letter

Steps to Reproduce the Problem

  1. Fix the validations.py
  • Platform: Linux

fix the username behavior

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

update validation file

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Validations.py (Class3/Lab4) validates invalid usernames

Expected Behavior

Return False when invalid username is passed

Actual Behavior

Returns True for username that starts with a number, dot, or underscore

Steps to Reproduce the Problem

  1. Test the function with input that starts with a number, dot, or underscore
  2. The return value is True instead of False

Specifications

The username must consist of letters, numbers, dots and underscores.
It must start with only a letter and be at least 1 character long.

  • Version: 1?
  • Platform: all

Update validate_user function

Expected Behavior

print(validate_user("blue.kale", 3)) # True
print(validate_user(".blue.kale", 3)) # True
print(validate_user("red_quinoa", 4)) # True
print(validate_user("_red_quinoa", 4)) # True

Actual Behavior

print(validate_user("blue.kale", 3)) # True
print(validate_user(".blue.kale", 3)) # False
print(validate_user("red_quinoa", 4)) # True
print(validate_user("_red_quinoa", 4)) # False

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

update the code

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

  1. fixed code
    1.add if condiation

Specifications

  • Version:
  • Platform:

Updated

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Lab 4 Fixes 1

Expected Behavior

Return False when username begins with non-alphabetical characters.

Actual Behavior

Return True when username begins with non-alphabetical characters.

Steps to Reproduce the Problem

1.print(validate_user(".blue.kale", 3))
2.print(validate_user("_red_quinoa", 4))

Specifications

  • Version: Python
  • Platform: Linux

validations.py with unexpected behaviour

Expected Behavior

True
False
True
False

Actual Behavior

True
True
True
True

Steps to Reproduce the Problem

  1. clone the repo
  2. move to Course3/Lab4 # cd it-cert-automation-practice/Course3/Lab4/
  3. execute the validations.py # python3 validations.py

Specifications

  • Version: Python 3.5.3
  • Platform: qwilklabs Debian 9

Nothing to change

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Course3/Lab4: Usernames should always start with letters

The validations.py file in Course3/Lab4 includes a validate_user function. This function was recently modified to allow usernames to contain dots and underscores as well as letters and numbers.

The code currently validates that the first character of the username is not a number, and that was fine when only letters and numbers were allowed. Back when only letters and numbers were allowed, this meant that the username had to start with a letter. Now that we allow dots and underscores as well, we need to change the check of the first character as only letters are allowed in the first character of the username.

Examples:

  • validate_user("blue.kale", 3) -> True
  • validate_user(".blue.kale", 3) -> Currently True, should be False
  • validate_user("red_quinoa", 4) -> True
  • validate_user("_red_quinoa", 4) -> Currently True, should be False

@googlebot I signed it!

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

๐Ÿ“ Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

โ„น๏ธ Googlers: Go here for more info.

Originally posted by @google-cla in #7988 (comment)

Lab 4 Fixes 1

Expected Behavior

Return False when username begins with non-alphabetical characters.

Actual Behavior

Return True when username begins with non-alphabetical characters.

Steps to Reproduce the Problem

  1. print(validate_user(".blue.kale", 3))
  2. print(validate_user("_red_quinoa", 4))

Specifications

  • Version: Python
  • Platform: Linux

No Testcases

Expected Behavior

There should be a testcases.py in the Course3

Actual Behavior

No test cases added

Steps to Reproduce the Problem

  1. Add testcases.py
  2. Call validate_user function by using following line:-
    from validations import validate_user
  3. Add test cases
  4. Print the test cases

Specifications

  • Version:
  • Platform:

actual behavior

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Actualizacion

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Usernames should be all lower case and contain no spaces

The validations.py file in Course3/Lab4 includes a validate_user function.

The code currently validates that the first character of the username is not a number. We need to check if usernames are all lower case and that they don't contain any spaces. Return False if they contain capital letters or spaces.

Examples:
validate_user("John.Haha", 3) -> False
validate_user(".green. kale", 3) -> False
validate_user("mark_smith", 4) -> True
validate_user("_Dr Who", 4) - > False

Course5/Lab3: Missing Setup_Puppet.sh

Expected Behavior

Expect to run a script setup_puppet.sh from the cloned repo mentioned in (Course5/Week3 > Video: Customizing VMs in GCP > time: 5:39)

Actual Behavior

~/it-cert-automation-practice/Course5/Lab3$ ./setup_puppet.sh
-bash: ./setup_puppet.sh: No such file or directory
~/it-cert-automation-practice/Course5/Lab3$ 

Steps to Reproduce the Problem

  1. File seems to be missing from repo

Specifications

  • Version: na
  • Platform: na

Fix Lab 4

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

updated validations.py script

updated the validations.py

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Change validation.py

Expected Behavior

True
False
True
False

Actual Behavior

True
True
True
True

Steps to Reproduce the Problem

  1. Add a if statement to filter out the forbidden characters.

Specifications

  • Version:
  • Platform:

Best fix of branch

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

DOnt want it

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Lab 4

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Corrections in Validations.py

  • Written a proper message if the minimum length is less to let the user understand and debug it.
  • The username must not start with fullstop or any other symbol or number, that validation has been putten at it's place.

Lab 4 Course 3

Expected Behavior

return False when forbidden characters in front of the text

Actual Behavior

return True whenever forbidden characters in front of the text or not

Steps to Reproduce the Problem

Specifications

  • Version: 1.1
  • Platform: Linux

Fails to apply for all testcases used here

Expected Behavior

validate_user(".blue.kale", 3) -> should be False
validate_user("_red_quinoa", 4) -> should be False

Actual Behavior

validate_user(".blue.kale", 3) -> previously returning True
validate_user("_red_quinoa", 4) -> previously returning True

Steps to Reproduce the Problem

  1. username[0]=='.' or username[0]==''
    above portion if removed from code should produce the same result for any string passed to validate_user( ) - function and string passed to this func. as parameter should start with "." or "
    "

Specifications

  • Version: python interpreter 3.8.4
  • Platform: linux/ window

1

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

All previous usernames are able to be seen when submitting the pull request for the "Pushing Local Commits to Github" exercise

Expected Behavior - Usernames are purged 24 hours after completion of the exercise

Actual Behavior - Usernames are not purged and still fully view-able by anyone who has joined or will join the exercise

Steps to Reproduce the Problem

  1. Under the google/it-cert-automation-practice Github page select Pull Requests
  2. Select "New Pull Request"
  3. Select "Compare across forks"
  4. Under head repository, all previous users have their username fully visible which can result in a targets list for malicious actors
    Github Training Usernames

Specifications

  • Version:
  • Platform:

Issue to be solved

Expected Behavior

Blablla

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

review

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Updated validations.py python script

Expected Behavior

fixed the behavior of validate_user function in validations.py
Closes #1258

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Haha 123 testing

Expected Behavior

True
False
True
False

Actual Behavior

True
True
True
True

Steps to Reproduce the Problem

  1. Add condition 1
  2. Add condition 2
  3. Sum them up

Specifications

  • Version: version 8964
  • Platform: Linux 123

Hey

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Come over

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Just wanted take a look

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.