Skip to content

Commit fdb3db8

Browse files
Merge pull request #2 from Ayushparikh-code/main
update the fork
2 parents 176ac54 + 2165921 commit fdb3db8

File tree

451 files changed

+40668
-120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+40668
-120
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: " Add project"
3+
about: LGMSOC
4+
title: Project title
5+
labels: LGMSOC21
6+
assignees: ''
7+
8+
---
9+
10+
**Project title**
11+
(Write project title over here)
12+
13+
**Project Description**
14+
(Describe the project over here)
15+
16+
Stack:
17+
[ ] Html
18+
[ ] CSS
19+
[ ] JavaScript
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Add Readme to already existing project
3+
about: Adding readme to already existing project.
4+
title: Add readme to already existing project
5+
labels: LGMSOC21
6+
assignees: ''
7+
8+
---
9+
10+
**Project Name**
11+
(Write project name over here)
12+
13+
**Project link**
14+
(Provide project link over here)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Improvements
3+
about: Suggesting improvements in already existing file.
4+
title: ''
5+
labels: LGMSOC21
6+
assignees: ''
7+
8+
---
9+
10+
**Project name**
11+
(Add project name over here)
12+
13+
**Project link**
14+
(Provide project link over here)
15+
16+
**Improvements suggested**
17+
(Write the improvements you are suggesting over here)

.github/labels.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[
2+
{
3+
"name": "good first issue",
4+
"description": "This issue is good for first timers",
5+
"color": "a9e3ff"
6+
},
7+
{
8+
"name": "🆘 help wanted",
9+
"description": "This issue needs help ! Please help if possible !",
10+
"color": "ff00ff"
11+
},
12+
{
13+
"name": "🟥 Level4 ",
14+
"description": "This issue will be considered as level 4 issue for LGM-SOC 21.Points will be 45.",
15+
"color": "b60205"
16+
},
17+
{
18+
"name": "🟧 Level3 ",
19+
"description": "This issue will be considered as level 3 issue for LGM-SOC 21.Points will be 30.",
20+
"color": "ff9f1c"
21+
},
22+
{
23+
"name": "🟨 Level2 ",
24+
"description": "This issue will be considered as level 2 issue for LGM-SOC 21.Points will be 15",
25+
"color": "ffcc00"
26+
},
27+
{
28+
"name": "🟩 Level1 ",
29+
"description": "This issue will be considered as level 1 issue for LGM-SOC 21.Points will be 10",
30+
"color": "cfda2c"
31+
},
32+
{
33+
"name": "🟪 Level0 ",
34+
"description": "This issue will be considered as level 0 issue for LGM-SOC 21.Points will be 5",
35+
"color": "aa00de"
36+
},
37+
{
38+
"name": " LGMSOC21 ",
39+
"description": "This issue will be considered for LGM-SOC 21",
40+
"color": "d93f0b"
41+
},
42+
{
43+
"name": " 🤩 Up for Grab ",
44+
"description": "This issue will is not assigned ! Grab It !",
45+
"color": "bf00ff"
46+
}
47+
]

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Description
2+
3+
(Describe your project over here.)
4+
5+
### Checklist
6+
7+
- [ ] I've been assigned an issue related to this PR.
8+
- [ ] I've used beautifiers.
9+
- [ ] I've added my Project's name and description to `Index.md`
10+
- [ ] I've made a README.md file for my Project.
11+
- [ ] The README.md file of my projrct contains Project title, Description, Use of project, Set up, Stack used and Output (Screenshots).
12+
13+
## Related Issues or Pull Requests number
14+
15+
(Write your answer here.)

.github/workflows/issue-label.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Default
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Label Syncer
11+
uses: micnncim/[email protected]
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GITHUB_REPOSITORY: ${{ github.repository }}
15+
with:
16+
manifest: .github/labels.json
17+
prune: false

BMI Calculator (Flask)/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# BMI Calculator using Flask
2+
3+
A simple calculator used to calculate the Body Mass Index (BMI).
4+
5+
## Technologies used:
6+
7+
- HTML
8+
- CSS
9+
- Python
10+
- Flask
11+
12+
## How to use:
13+
14+
1. Fork and clone [this](https://github.com/Ayushparikh-code/Web-dev-mini-projects) project.
15+
2. In your command prompt, navigate to **Web-dev-mini-projects/BMI Calculator (Flask)**.
16+
3. Run this app using the command `python app.py`.
17+
4. Now, navigate to `http://127.0.0.1:5000/` in your web browser to use the calculator.
18+
19+
## Screenshot
20+
21+
<img src="https://imgur.com/PoJcIsR.png"/>

BMI Calculator (Flask)/app.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from flask import Flask, render_template, request
2+
3+
# declare the app
4+
app = Flask(__name__)
5+
6+
# start an app route
7+
@app.route("/")
8+
def main():
9+
return render_template("index.html")
10+
11+
12+
# route for bmi calculation result
13+
@app.route("/bmi", methods=["GET", "POST"])
14+
def calculate():
15+
try:
16+
w = float(request.form.get("weight"))
17+
h = float(request.form.get("height"))
18+
if w and h:
19+
bmi = round(w / ((h / 100) ** 2), 3)
20+
return render_template("index.html", bmi=bmi)
21+
except ValueError as error:
22+
error = "Please enter all the values"
23+
return render_template("index.html", error=error)
24+
25+
26+
if __name__ == "__main__":
27+
app.run(debug=True)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
body {
2+
font-size: 20px;
3+
text-align: center;
4+
background: #ace1af;
5+
font-family: "Quicksand", sans-serif;
6+
}
7+
8+
h1,
9+
h2 {
10+
text-align: center;
11+
padding-top: 25px;
12+
font-style: bold;
13+
}
14+
15+
table,
16+
th,
17+
td {
18+
border: 2px solid black;
19+
text-align: center;
20+
width: 50%;
21+
margin-left: auto;
22+
margin-right: auto;
23+
}
24+
25+
th {
26+
height: 45px;
27+
}
28+
29+
#calc_btn,
30+
#ht,
31+
#wt {
32+
padding: 7px;
33+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<!-- Bootstrap CSS -->
8+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
9+
<!-- Stylesheets-->
10+
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='style.css') }}" />
11+
<!--Google Fonts-->
12+
<link rel="preconnect" href="https://fonts.googleapis.com">
13+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
14+
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500&display=swap" rel="stylesheet">
15+
<title>BMI Calculator</title>
16+
</head>
17+
<body>
18+
<h1>
19+
<u>BMI Calculator using Flask</u>
20+
</h1>
21+
<br>
22+
<!--Calculator starts-->
23+
<div class="container text-center">
24+
<div class="row">
25+
<div class="col-sm">
26+
<form action="/bmi" method="POST">
27+
<label for="height" id="ht">Height</label>
28+
<input type="text" name="height" class="u-full-width" placeholder="Height (in cm)" id="ht" />
29+
<br>
30+
<label for="weight" id="wt">Weight</label>
31+
<input type="text" name="weight" class="u-full-width" placeholder="Weight (in kg)" id="wt" />
32+
<br>
33+
<br>
34+
<input type="submit" value="Calculate" id="calc_btn" /> {% if bmi %} <div class="alert">
35+
<p>Your BMI is {{bmi}}</p>
36+
</div> {% else %} <div class="alert">
37+
<p>{{error}}</p>
38+
</div> {% endif %}
39+
</form>
40+
</div>
41+
</div>
42+
</div>
43+
<!--Calculator ends-->
44+
<hr>
45+
<!--BMI values chart-->
46+
<div class="container text-center">
47+
<div class="row">
48+
<div class="col-sm">
49+
<h2>
50+
<u>BMI Chart</u>
51+
</h2>
52+
<br>
53+
<table>
54+
<tr>
55+
<th>BMI Value</th>
56+
<th>Category</th>
57+
</tr>
58+
<tr>
59+
<td>
60+
<18.5 </td>
61+
<td>Underweight</td>
62+
</tr>
63+
<tr>
64+
<td>18.5 - 24.9</td>
65+
<td>Normal weight</td>
66+
</tr>
67+
<tr>
68+
<td>25 - 29.9</td>
69+
<td>Overweight</td>
70+
</tr>
71+
<tr>
72+
<td>>=30</td>
73+
<td>Obesity</td>
74+
</tr>
75+
</table>
76+
</div>
77+
</div>
78+
</div>
79+
</body>
80+
</html>

0 commit comments

Comments
 (0)