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

Main #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Main #61

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
2 changes: 1 addition & 1 deletion Day-11/04-demo-github-integration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Program to demonstrate integration with GitHub to fetch the
# details of Users who created Pull requests(Active) on Kubernetes Github repo.
# details of Users who created Pull requests(Active) on Kubernetes Github repo

import requests

Expand Down
10 changes: 10 additions & 0 deletions Day-11/04-practicals.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ def get_server_status(server_name):
return server_config.get(server_name, {}).get('status', 'Server not found')

# Example usage

server_name = 'server2'
status = get_server_status(server_name)
print(f"{server_name} status: {status}")


server_name = 'server4'
status = get_server_status(server_name)
print(f"{server_name} status: {status}")

server_name = 'server1'
status = get_server_status(server_name)
print(f"{server_name} status: {status}")
24 changes: 24 additions & 0 deletions Day-11/dict.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

my_dict = {'name': 'John', 'age': 25, 'city': 'New York'}


print(my_dict['name']) # Output: John



my_dict['age'] = 26 # Modifying a value
my_dict['occupation'] = 'Engineer' # Adding a new key-value pair



del my_dict['city'] # Removing a key-value pair



if 'age' in my_dict:
print('Age is present in the dictionary')



for key, value in my_dict.items():
print(key, value)
2 changes: 1 addition & 1 deletion Day-12/server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Network Settings
PORT = 8080
MAX_CONNECTIONS=600
MAX_CONNECTIONS=1000
TIMEOUT = 30

# Security Settings
Expand Down
2 changes: 1 addition & 1 deletion Day-12/update_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def update_server_config(file_path, key, value):

# Key and new value for updating the server configuration
key_to_update = 'MAX_CONNECTIONS'
new_value = '600' # New maximum connections allowed
new_value = '1000' # New maximum connections allowed

# Update the server configuration file
update_server_config(server_config_file, key_to_update, new_value)