diff --git a/Code/01_python_hello_world/Dockerfile b/Code/01_python_hello_world/Dockerfile
new file mode 100644
index 0000000..f266005
--- /dev/null
+++ b/Code/01_python_hello_world/Dockerfile
@@ -0,0 +1,5 @@
+FROM python:3.8-slim-buster
+
+COPY helloworld.py /
+
+CMD ["python","./helloworld.py"]
diff --git a/Code/01_python_hello_world/helloworld.py b/Code/01_python_hello_world/helloworld.py
new file mode 100644
index 0000000..748383d
--- /dev/null
+++ b/Code/01_python_hello_world/helloworld.py
@@ -0,0 +1,8 @@
+def main():
+ print("Hello world")
+ print("Ramkumar K")
+ print("7376222IT231")
+ print("Department of Information Techology.")
+
+if __name__ == "__main__":
+ main()
diff --git a/Code/02_flask_hello_world/Dockerfile b/Code/02_flask_hello_world/Dockerfile
new file mode 100644
index 0000000..c8a1d8c
--- /dev/null
+++ b/Code/02_flask_hello_world/Dockerfile
@@ -0,0 +1,13 @@
+FROM python:3.9-slim
+
+WORKDIR /app
+
+COPY . /app
+
+RUN pip install --no-cache-dir Flask
+
+EXPOSE 5000
+
+ENV FLASK_APP=app.py
+
+CMD ["flask","run","--host=0.0.0.0"]
\ No newline at end of file
diff --git a/Code/02_flask_hello_world/app.py b/Code/02_flask_hello_world/app.py
new file mode 100644
index 0000000..5ede870
--- /dev/null
+++ b/Code/02_flask_hello_world/app.py
@@ -0,0 +1,10 @@
+from flask import Flask
+
+app = Flask(__name__)
+
+@app.route('/')
+def hello_world():
+ return "Hello, world " + "I'm Ramkumar (7376222IT231) " + "from Department of Information Technology."
+
+if __name__ == "__main__":
+ app.run(debug=True)
\ No newline at end of file
diff --git a/Code/03_docker_compose/compose.yml b/Code/03_docker_compose/compose.yml
new file mode 100644
index 0000000..5b73c81
--- /dev/null
+++ b/Code/03_docker_compose/compose.yml
@@ -0,0 +1,14 @@
+version: '3'
+services:
+ ramkumar:
+ image: "kramkumar27/flask-helloworld"
+ container_name: ramkumar_container
+ restart: always
+ ports:
+ - "7777:5000"
+ pawan:
+ image: "pawang08/app"
+ container_name: pawan_container
+ restart: always
+ ports:
+ - "8888:5000"
\ No newline at end of file
diff --git a/Code/04_ml_example/01_email.py b/Code/04_ml_example/01_email.py
new file mode 100644
index 0000000..09ec1ed
--- /dev/null
+++ b/Code/04_ml_example/01_email.py
@@ -0,0 +1,49 @@
+# Import necessary libraries
+from sklearn.feature_extraction.text import CountVectorizer
+from sklearn.naive_bayes import MultinomialNB
+from sklearn.pipeline import make_pipeline
+from sklearn.model_selection import train_test_split
+from sklearn.metrics import accuracy_score
+
+# Step 1: Sample email data (you should have more data for better results)
+emails = [
+ "Congratulations! You've won a $1000 gift card, click here to claim now",
+ "Dear customer, your invoice for the month of August is attached. Please pay it by the end of the month.",
+ "Exclusive offer! Get 50% off on your next purchase, hurry up before the offer ends!",
+ "Your bank statement is available for viewing online. Please log in to your account to review.",
+ "Act now! You have a chance to win a free trip to Paris. Click the link to participate.",
+ "Your meeting has been scheduled for 2 PM tomorrow. Please confirm your attendance.",
+ "Urgent! Your account has been suspended due to suspicious activity. Verify your account to restore access.",
+ "Reminder: The project report is due tomorrow. Please submit it by the end of the day.",
+ "Your order has been shipped and is expected to arrive within 3 business days.",
+ "You have a new voicemail from your phone service provider."
+]
+labels = [1, 0, 1, 0, 1, 0, 1, 0, 0, 0] # 1: Spam, 0: Not Spam
+
+# Step 2: Vectorization and classification
+# Create a pipeline with a CountVectorizer and a Naive Bayes model
+model = make_pipeline(CountVectorizer(lowercase=True, stop_words='english'), MultinomialNB())
+
+# Step 3: Train the model
+model.fit(emails, labels)
+
+# Step 4: Test with new emails
+new_emails = [
+ "Claim your free iPhone now by clicking this link!",
+ "Your Amazon package has been delivered, thank you for your purchase.",
+ "Win a free car! Enter our giveaway contest.",
+ "Your work report is due by the end of the week. Please submit it on time."
+]
+
+# Predict the labels for new emails
+predictions = model.predict(new_emails)
+
+# Step 5: Display results
+for email, label in zip(new_emails, predictions):
+ print(f"Email: '{email}' is classified as: {'Spam' if label == 1 else 'Not Spam'}")
+
+# Optional: Evaluate the accuracy with a train/test split
+X_train, X_test, y_train, y_test = train_test_split(emails, labels, test_size=0.2, random_state=42)
+model.fit(X_train, y_train)
+y_pred = model.predict(X_test)
+print(f"Accuracy: {accuracy_score(y_test, y_pred) * 100:.2f}%")
\ No newline at end of file
diff --git a/Code/04_ml_example/Dockerfile b/Code/04_ml_example/Dockerfile
new file mode 100644
index 0000000..c4128bb
--- /dev/null
+++ b/Code/04_ml_example/Dockerfile
@@ -0,0 +1,7 @@
+FROM python:3.8-slim-buster
+
+COPY 01_email.py /
+
+RUN pip install --no-cache-dir scikit-learn
+
+CMD [ "python", "./01_email.py" ]
\ No newline at end of file
diff --git a/Code/05_ml_example/01_movie.py b/Code/05_ml_example/01_movie.py
new file mode 100644
index 0000000..b301567
--- /dev/null
+++ b/Code/05_ml_example/01_movie.py
@@ -0,0 +1,38 @@
+# Import necessary libraries
+from sklearn.feature_extraction.text import CountVectorizer
+from sklearn.naive_bayes import MultinomialNB
+from sklearn.pipeline import make_pipeline
+
+# Step 1: Data - Movie reviews and labels (0: Negative, 1: Positive)
+reviews = [
+ "This movie was fantastic, I loved it!",
+ "The plot was boring and predictable",
+ "Amazing performance by the cast",
+ "I wasted two hours of my life",
+ "Brilliant direction and storytelling",
+ "The movie was a disaster",
+ "What a great film!",
+ "It was an awful experience",
+ "The cinematography was beautiful",
+ "Terrible acting and poor script"
+]
+labels = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0] # 1: Positive, 0: Negative
+
+# Step 2: Create a pipeline to combine vectorization and model
+# Vectorizer with stop words removal and other pre-processing features
+vectorizer = CountVectorizer(lowercase=True, stop_words='english')
+classifier = MultinomialNB()
+
+# Pipeline to process and classify
+model = make_pipeline(vectorizer, classifier)
+
+# Step 3: Train the model
+model.fit(reviews, labels)
+
+# Step 4: Test the model with new reviews
+new_reviews = ["The movie was a masterpiece", "Worst film I've ever seen", "The plot was very engaging", "Terrible acting"]
+predicted = model.predict(new_reviews)
+
+# Step 5: Output the predictions
+for review, label in zip(new_reviews, predicted):
+ print(f"Review: '{review}' is classified as: {'Positive' if label == 1 else 'Negative'}")
\ No newline at end of file
diff --git a/Code/05_ml_example/Dockerfile b/Code/05_ml_example/Dockerfile
new file mode 100644
index 0000000..27b8526
--- /dev/null
+++ b/Code/05_ml_example/Dockerfile
@@ -0,0 +1,7 @@
+FROM python:3.8-slim-buster
+
+COPY 01_movie.py /
+
+RUN pip install --no-cache-dir scikit-learn
+
+CMD [ "python", "./01_movie.py" ]
\ No newline at end of file
diff --git a/Code/05_ml_example/compose.yml b/Code/05_ml_example/compose.yml
new file mode 100644
index 0000000..83bf648
--- /dev/null
+++ b/Code/05_ml_example/compose.yml
@@ -0,0 +1,12 @@
+version: '3'
+services:
+ email:
+ image: "kramkumar27/email"
+ container_name: email_container
+ restart: always
+
+ movie:
+ image: "kramkumar27/movie"
+ container_name: movie_container
+ restart: always
+
\ No newline at end of file
diff --git a/Day#1/Day-1-Assignments.md b/Day#1/Day-1-Assignments.md
index 32709d9..68ef4d8 100644
--- a/Day#1/Day-1-Assignments.md
+++ b/Day#1/Day-1-Assignments.md
@@ -5,61 +5,217 @@
| Status | Questions |
|----------------|---------------|
-|
| Execute 25 Docker CLI commands, capture the output screenshots, and document each command's usage on a GitHub Wiki page. |
-| | Install VSCode and Python. Check the version of Python. Document these steps in GitHub Wiki. |
-| | [Python] Create a sample flask app and edit the same to showcase your college information(Name, Register_number,etc) |
-| | [Docker] Create the docker image for the above-mentioned flask app and run the same view of the page in a browser |
-| | [Docker] Create a docker compose file for the 2 images: nginx/httpd and run the same view of the page in a browser |
-| | [Docker] Pull one of the participant’s docker images and verify whether the app is running or not |
-| | Create a GitHub account with a personal mail ID & fork this repo and rename this in the format 22AM0XG-Assignments-Register-Number |
-| | Create a LinkedIn account with personal mail ID |
+| | Execute 25 Docker CLI commands, capture the output screenshots, and document each command's usage on a GitHub Wiki page. |
+| | Install VSCode and Python. Check the version of Python. Document these steps in GitHub Wiki. |
+| | [Python] Create a sample flask app and edit the same to showcase your college information(Name, Register_number,etc) |
+| | [Docker] Create the docker image for the above-mentioned flask app and run the same view of the page in a browser |
+| | [Docker] Create a docker compose file for the 2 images: nginx/httpd and run the same view of the page in a browser |
+| | [Docker] Pull one of the participant’s docker images and verify whether the app is running or not |
+| | Create a GitHub account with a personal mail ID & fork this repo and rename this in the format 22AM0XG-Assignments-Register-Number |
+| | Create a LinkedIn account with personal mail ID |
***
### Day 1 Assignments - Answers and Screenshots
> [!WARNING]
-> Pls submit the correct screenshots
-
+> provide correct screenshots
> [!CAUTION]
> Pls don't copy from others. Marks will be reduced for both students
#### #1 Execute 25 Docker CLI commands, capture the output screenshots, and document each command's usage on a GitHub Wiki page
-> Add your answer here!
+1) checking docker version:\
+
+
+2) docker info:\
+
+
+
+3) docker system info:\
+
+
+4) docker --help:\
+
+
+5) docker compose version:\
+
+
+6) docker login:\
+
+
+
+7) docker logout:\
+
+
+8) docker search :\
+
+
+9) docker images (list the images):\
+
+
+10) docker pull nginx :\
+
+
+11) docker run -idt nginx:\
+
+
+12) docker ps (list the containers):\
+
+
+13) docker stop "container-id" :\
+
+
+14) docker start "container-id" :\
+
+
+15) docker restart "container-id" :\
+
+
+16) docker logs "container-id" :\
+
+
+17) docker rm "container-id" :\
+
+
+18) docker rmi nginx:\
+
+
+19) docker build -t "username"/"imagename" . :\
+
+
+20) docker push image-name:\
+
+
+21) docker tag (for changing the tag of image): \
+
+
+22) docker save (save the image as compressed .tar file):\
+
+
+23) docker load (load the image from .tar file): \
+
+
+24) docker exec (to see what is inside the container)
+
+
+25) docker cp (copying file from one place to sany container):\
+d
+
+26) docker system prune (removes all the unused containers , images and build cahces):\
+
+
+
+
+
+
+
+
+
+
+
***
#### #2 Install VSCode and Python. Check the version of Python. Document these steps in GitHub Wiki
-> Add your answer here!
+1) vscode and python version:\
+
+
+
+
+
***
#### #3 [Python] Create a sample flask app and edit the same to showcase your college information(Name, Register_number,etc)
-> Add your answer here!
+
+## #Helloworld cmd app:
+1) Python helloworld application:\
+
+
+2) Python Flask helloworld application:\
+
+
+
+3) helloworld cli application building docker image using Dockerfile:\
+
+
+
+
+4) image is created. running the docker image using "docker run " and then pushing it to the docker hub:\
+
+
+
+
+## #Flask hello world app:
+
+1) Docker file for flask helloworld application:\
+
+
+Note: Bulding and running the image for the flask hello world application is given below in next section\
+
***
#### #4 [Docker] Create the docker image for the above-mentioned flask app and run the same view of the page in a browser
-> Add your answer here!
+1) Building Flask hello world app in using docker build :\
+
+
+2) image is created and running it on my machine:\
+
+
+
+
+
+
+
+
+
+
***
#### #5 [Docker] Create a docker compose file for the 2 images: nginx/httpd and run the same view of the page in a browser
-> Add your answer here!
+writing compose.yml file for creating container for my flask app and my friend's.\
+
+running the docker compose command: \
+
+
+checking at port 7777:\
+ .\
+checking at port 8888:\
+
+
+
+
***
#### #6 [Docker] Pull one of the participant’s docker images and verify whether the app is running or not
-> Add your answer here!
+1) Testing my friend's docker image:\
+
+
+
+2) Testing my friend's flask app by pulling it and running it using "docker run -idt -p 5000:5000 pawang08/app"\
+My friend's hello world application:\
+
+
+-->we have to d port mapping while running flask application: "docker run -idt -p 5000:5000 pawang08/app"\
+
+
+
***
#### #7 Create a GitHub account with a personal mail ID & fork this repo and rename this in the format 22AM0XG-Assignments-Register-Number
-> Add your answer here!
+github account: https://github.com/ramkumar-bitsathy/ \
+
+
+
+
***
#### #8 Create a LinkedIn account with personal mail ID
-> Add your answer here!
-
+I already have an linkedin account created with personal mail:
+https://www.linkedin.com/in/ramkumar-k-33ba55257/
***
diff --git a/Day#2/Day-2-Assignments.md b/Day#2/Day-2-Assignments.md
index f1dce35..f4c325e 100644
--- a/Day#2/Day-2-Assignments.md
+++ b/Day#2/Day-2-Assignments.md
@@ -5,12 +5,12 @@
| Status | Questions |
|----------------|---------------|
-| | Create a simple machine-learning application & verify the prediction based on the given score |
-| | Create a simple machine-learning application & verify the accuracy |
-| | [Docker Compose] Create a docker-compose file for the 2 images: your flask app and the machine learning app and run the same view the page in browser |
-| | Commit all the code to GitHub Repo |
-| | Document all the learnings with screenshots in the GitHub Wiki / in .md file |
-| | Create a post on Linkedin |
+| | Create a simple machine-learning application & verify the prediction based on the given score |
+| | Create a simple machine-learning application & verify the accuracy |
+| | [Docker Compose] Create a docker-compose file for the 2 images: your flask app and the machine learning app and run the same view the page in browser |
+| | Commit all the code to GitHub Repo |
+| | Document all the learnings with screenshots in the GitHub Wiki / in .md file |
+| | Create a post on Linkedin |
***
@@ -24,32 +24,72 @@
#### #1 Create a simple machine learning application. Execute the program in local and verify the prediction based on the given score.
#### Write the Dockerfile & create the docker image named : ml-docker-app-flask. Run the docker image and verify the prediction based on the given score. Tag the image in this format : : ml-docker-app-flask. Push the image to DockerHub
-> Add your answer here!
+
+
+#### Email classification app:
+
+1) Dockerfile:\
+
+
+Building the image using docker build:\
+
+
+Running the image using docker run:\
+
+
+Pushing image to the dockerhub:\
+
+
+
***
#### #2 Create a simple machine learning application. Execute the program in local and verify the accuracy
#### Write the Dockerfile & create the docker image named : ml-docker-app. Run the docker image and verify the accuracy. Tag the image in this format : :ml-docker-app. Push the image to DockerHub
-> Add your answer here!
+
+#### Movie review classification app:
+
+Dockerfile:\
+
+
+building image:\
+
+
+running the image using docker run:\
+
+
+pushing image to the dockerhub:\
+
+
+
+
***
#### #3 [Docker Compose] Create a docker compose file for the 2 images : your flask app and the machine learning app and run the same view the page in browser
-> Add your answer here!
+1)Creating YAML file for composing the above two machine learning applications:
+
+
+2) composing and seeing the output of two files simultaneously using docker compose up:
+
+
+
***
#### #4 Commit the code to the Github Repo. The repo should be a public one.
-> Add your answer here!
+Commited ✅✅
***
#### #5 Document all the learnings with screenshots in the GitHub Wiki / in .md file
-> Add your answer here!
+Documented ✅✅
***
#### #6 Create a post on Linkedin about your learning journey in this 1 credit course
-> Add your answer here!
+Post created ✅✅
+
+
***
diff --git a/README.md b/README.md
index 673c48c..ec10d2f 100644
--- a/README.md
+++ b/README.md
@@ -2,20 +2,20 @@
### Day 1 Assignments
-- [ ] Execute 25 Docker CLI commands, capture the output screenshots, and document each command's usage on a GitHub Wiki page.
+- [x] Execute 25 Docker CLI commands, capture the output screenshots, and document each command's usage on a GitHub Wiki page.
- [x] Install VSCode and Python. Check the version of Python. Document these steps in GitHub Wiki.
-- [ ] [Python] Create a sample flask app and edit the same to showcase your college information(Name, Register_number,etc)
-- [ ] [Docker] Create the docker image for the above-mentioned flask app and run the same view of the page in a browser
-- [ ] [Docker] Create a docker compose file for the 2 images: nginx/httpd and run the same view of the page in a browser
-- [ ] [Docker] Pull one of the participant’s docker images and verify whether the app is running or not
+- [x] [Python] Create a sample flask app and edit the same to showcase your college information(Name, Register_number,etc)
+- [x] [Docker] Create the docker image for the above-mentioned flask app and run the same view of the page in a browser
+- [x] [Docker] Create a docker compose file for the 2 images: nginx/httpd and run the same view of the page in a browser
+- [x] [Docker] Pull one of the participant’s docker images and verify whether the app is running or not
- [x] Create a GitHub account with a personal mail ID and create the repo with your register_number_22AM0XG
- [x] Create a LinkedIn account with personal mail ID
### Day 2 Assignments
-- [ ] Create a simple machine-learning application & verify the prediction based on the given score
+- [x] Create a simple machine-learning application & verify the prediction based on the given score
- [x] Create a simple machine-learning application & verify the accuracy
-- [ ] [Docker Compose] Create a docker-compose file for the 2 images: your flask app and the machine learning app and run the same view the page in browser
-- [ ] Commit all the code to GitHub Repo
-- [ ] Document all the learnings with screenshots in the GitHub Wiki
-- [ ] Create a post on Linkedin
+- [x] [Docker Compose] Create a docker-compose file for the 2 images: your flask app and the machine learning app and run the same view the page in browser
+- [x] Commit all the code to GitHub Repo
+- [x] Document all the learnings with screenshots in the GitHub Wiki
+- [x] Create a post on Linkedin