Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test files added #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Day-01/test-01
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
a = "hello"
b = "world"

print (a,b)
print (a + b)
print (a == b)
3 changes: 2 additions & 1 deletion Day-02/examples/01-string-concat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
str1 = "Hello"
str2 = "World"
result = str1 + " " + str2
result = str1 + " This is " + str2
print(result)
print (str1 + result + str2)
4 changes: 4 additions & 0 deletions Day-02/examples/01-string-replace.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
text = "Python is awesome"
new_text = text.replace("awesome", "great")
print("Modified text:", new_text)

name = "The kind people always great"
modified_name = name.replace("kind","gentle")
print("text:",modified_name)
4 changes: 4 additions & 0 deletions Day-02/examples/01-string-split.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
text = "Python is awesome"
words = text.split()
print("Words:", words)

name = "he is kanchu"
new_name = text.split()
print(new_name)
1 change: 1 addition & 0 deletions Day-02/examples/03-regex-findall.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
print("Pattern found:", search.group())
else:
print("Pattern not found")

12 changes: 12 additions & 0 deletions Day-02/examples/03-regex-match.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@
print("Match found:", match.group())
else:
print("No match")


import re # i prefer coffee than tea

text = "The quick brown fox"
pattern = r"brown"

search = re.search(pattern, text)
if search:
print("searc found:", search.group())
else:
print("No no match")
32 changes: 32 additions & 0 deletions Day-02/examples/test-examples/all_string.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
str1 = "ram"
str2 = "vijay"
result = (str1 + str2) # string concatination

life = "always be happy"
length = len(life) #length of the charactors

my_name ="Aravind from Vizag"
lowercase = my_name.lower()
uppercase = my_name.upper() # uppercase or lowercase


a = " Iam a maharaj"
b = " that is sivaji "
change = a.replace("maharaj", "king") #replacing the character
modifying = b.split() # spliting the character


info = "I am here"
substring = "I"
if substring in info:
print(substring,"am available") # substring

print("changed",modifying)
print("modified", change)
print("Lowercase", lowercase)
print("uppercase", uppercase)
print("lenght of the character ", length)
print(result)



4 changes: 4 additions & 0 deletions Day-02/examples/test-examples/conc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
str1 = " raja"
str2 = "rani"
result = str1 + " " + str2
print (result)
16 changes: 16 additions & 0 deletions Day-02/examples/test-examples/float.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
number1 = 3.5
number2 = 1.5
result1 = (number1+number2)
print ("addition:",result1)

result2 = (number1-number2)
print("subtraction:",result2)

result3 = (number1*number2)
print("multiplicatio:",result3)

result4 = number1 / number2
print("division:",result4)

result5 = round(3.143623433, 4) # Rounds to 2 decimal places
print("Rounded:", result5)
11 changes: 11 additions & 0 deletions Day-02/examples/test-examples/int.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
a = 1
b = 2
result1 = a // b
print("integrer division:", result1)

result2 = a % b
print("Modulus (Remainder):", result2)

# Absolute Value
result3 = abs(-7)
print("Absolute Value:", result3)
6 changes: 6 additions & 0 deletions Day-02/examples/test-examples/len.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
text = "This is the test str len python"
length = len(text)
Name = "Aravind"
length = len(Name)
print ("length of the string is",length)
print ("length of the name of Arvind is",length)
10 changes: 10 additions & 0 deletions Day-02/examples/test-examples/regex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import re

text = " she is good"
pattern = r"good"

match = re.match(pattern, text)
if match:
print("match found:", match.group())
else:
print("no matched")
10 changes: 10 additions & 0 deletions Day-02/examples/test-examples/regex_match.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import re

text = "the climate is cool"
pattern = r"climate"

match = re.match(pattern, text)
if match:
print("match found:",match.group())
else:
print("no match")
9 changes: 9 additions & 0 deletions Day-02/examples/test-examples/regex_replace.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import re

text = "they have many cars in their garage"
pattern = r"garage"

replacement = "house"

new_text = re.sub(pattern, replacement, text)
print ("modified text:", new_text)
5 changes: 5 additions & 0 deletions Day-02/examples/test-examples/str-lowercase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "Veera venakata siva sai reddy"
uppercase = name.upper()
lowercase = name.lower()
print ("Uppercase:", uppercase)
print ("Lowerrcase:", uppercase)
3 changes: 3 additions & 0 deletions Day-02/examples/test-examples/str-replace.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
good_quote = "Health is wealth"
new_quote = good_quote.replace("Health","Money")
print("modified quote:",new_quote)
3 changes: 3 additions & 0 deletions Day-02/examples/test-examples/str-split.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
birds = "Paraot is in green colour"
separation = birds.split()
print(separation)
9 changes: 9 additions & 0 deletions Day-02/examples/test-examples/substring.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
text = "Java is best programming language"
substring = "best"
if substring in text:
print(substring,"found in the text")

main = " Arjun is theif"
substring = " theif"
if substring in main:
print(substring,"found in the underground")
19 changes: 19 additions & 0 deletions Day-03/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


server_name = "my_server"
port = 443
is_https_enabled = False
max_connections = 1000
# Print the configuration
print(f"Server Name: {server_name}")
print(f"Port: {port}")
print(f"HTTPS Enabled: {is_https_enabled}")
print(f"Max Connections: {max_connections}")

# Update configuration values
port = 443
is_https_enabled = False

# Print the updated configuration
print(f"Updated Port: {port}")
print(f"Updated HTTPS Enabled: {is_https_enabled}")
10 changes: 10 additions & 0 deletions Day-04/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def sqaure(x):
return x ** 2

pi = 3.124344

import my_module

result = my_module.square(5)
print(result)
print(my_module.pi)
10 changes: 10 additions & 0 deletions Day-06/01-Notes/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
raju = 10
rani = 25
result = raju+rani
print(result)

num1 = 99
num2 = 99
result = num1+raju
result2 = rani-num2
print(result, result2)
29 changes: 29 additions & 0 deletions Day-06/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
a = 10
b = 20
sum_result1 = (a+b)
difference_result2 = (a-b)
product_result3 = (a*b)
quotient_result4 = (a//b)

print("sum:",sum_result1, "difference:", difference_result2, product_result3, quotient_result4)

a = 10
b = 20

less_than = (a <=b)
greater_than_or_equal = (a >= b)
greater_and_less_than = (a > b), (a < b)
equal_not_equal = (a == b), (a := b), (a != b)

print (less_than, greater_than_or_equal, greater_and_less_than, equal_not_equal)


# x = 5
# y = 6
# result9 = ( x and y), (x or y), (x > y)
# print(result9)

# total = 10
# result.total()
# print(total)

7 changes: 7 additions & 0 deletions Day-07/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
x = 10
if x > 15:
print("x is greater than 10")
elif x > 5:
print("x is greater than 5 but not greater than 10")
else:
print("x is not greater than 5")
14 changes: 14 additions & 0 deletions Day-08/02-Assigment/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#1
s3_buckets = ["bucket-01", "bucket-02","bucket-03"]

print(s3_buckets)
#2
servers = ("bucket-01", "bucket-02","bucket-03","bucket-03")
first_server = servers[1]

print(type(first_server),first_server[2])
#3

servers_list = ["web-server-01","web-server-02","web-server-03"]
servers_list.remove("web-server-02")
print(servers_list)
50 changes: 50 additions & 0 deletions Day-09/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# for loop example
fruits = ["apple","banana","cherry"]
for fru in fruits:
print(fru)

# while loop example
count = 0
while count < 3:
print(count)
count+=1

# loop control statements(break)
students_in_room = [1,2,3, 4,5]
for number in students_in_room:
if number ==3:
break
print(number)

# loop control statements(continue)
numbers = [1,2,3,4,5]
for number in numbers:
if number ==3:
continue
print(number)

# Automation log file analysis

log_file = [
"INFO: Operation successful",
"ERROR: File not found",
"DEBUG: Connection established",
"ERROR: Database Connection failed",
]
for line in log_file:
if "ERROR" in line:
print(line)

# for Loops
# servers=("server1" "server2" "server3")
# for server in "${servers[@]}":
# configure_monitoring_agent "$server"
# done

# servers=("server1" "server2" "server3")
# for server in "${servers[@]}":
# configure_monitoring_agent "$servers"
# done

# **Deploying Configurations to Multiple Environments:**