Skip to content

Commit

Permalink
Merge pull request #132 from HemantSachdeva/main
Browse files Browse the repository at this point in the history
add my one pager portfolio
  • Loading branch information
avinash201199 committed Oct 10, 2022
2 parents db6094a + 8c0ca97 commit 57fa472
Show file tree
Hide file tree
Showing 21 changed files with 14,342 additions and 0 deletions.
675 changes: 675 additions & 0 deletions Hemant Sachdeva/LICENSE.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Hemant Sachdeva/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: gunicorn application:application
ps:scale worker=1
8 changes: 8 additions & 0 deletions Hemant Sachdeva/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Note

- Do not forget to set/export `BOT_API` and `CHAT_ID` in your environment to make contact form working and recieve messages from visitors in your telegram chat via bot.

- Having any query?
> Feel free to contact [me](github.com/hemantsachdeva).
- You can see the working demo [here](http://hemantsachdeva-old.herokuapp.com/) (only till heroku is free).
19 changes: 19 additions & 0 deletions Hemant Sachdeva/application.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2021 Hemant Sachdeva <hemant.evolver@gmail.com>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from src.main import application

if __name__ == '__main__':
application.run()
2 changes: 2 additions & 0 deletions Hemant Sachdeva/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gunicorn==20.1.0
Flask==2.0.1
1 change: 1 addition & 0 deletions Hemant Sachdeva/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-3.9.7
71 changes: 71 additions & 0 deletions Hemant Sachdeva/src/life.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
educations = [
{
'duration': '2019 - Present',
'title': 'B.Tech, Computer Science & Engineering',
'institute': 'Baba Banda Singh Bahadur Engineering College',
'location': 'Fatehgarh Sahib, Punjab, India',
'link': 'http://www.bbseb.ac.in/'
},
{
'duration': '2018 - 2019',
'title': 'Class XII CBSE Board',
'institute': 'Kendriya Vidyalaya No. 2 DMW',
'location': 'Patiala, Punjab, India',
'link': 'https://no2patiala.kvs.ac.in/'
},
{
'duration': '2016 - 2017',
'title': 'Class X CBSE Board',
'institute': 'Kendriya Vidyalaya No. 2 DMW',
'location': 'Patiala, Punjab, India',
'link': 'https://no2patiala.kvs.ac.in/'
}
]

projects = [
{
'title': 'Joke Api',
'banner': 'https://raw.githubusercontent.com/HemantSachdeva/portfolio/Itz-me/src/static/assets/images/ProjectJokeApi.png',
'link': 'https://hemant-joke-api.herokuapp.com',
'year': 2021
},
{
'title': 'Person Counter - OpenCV',
'banner': 'https://raw.githubusercontent.com/HemantSachdeva/portfolio/Itz-me/src/static/assets/images/ProjectPersonCounter.png',
'link': 'https://github.com/HemantSachdeva/py-scripts/commits/py/count_persons.py',
'year': 2021
},
{
'title': 'Temp Mail',
'banner': 'https://raw.githubusercontent.com/HemantSachdeva/portfolio/Itz-me/src/static/assets/images/ProjectTempMail.png',
'link': 'https://github.com/HemantSachdeva/TempMail.git',
'year': 2021
},
{
'title': 'Weather Api',
'link': 'https://github.com/HemantSachdeva/WeatherApi.git',
'banner': 'https://raw.githubusercontent.com/HemantSachdeva/portfolio/Itz-me/src/static/assets/images/ProjectWeatherApi.png',
'year': 2021
}
]

experiences = [
{
'duration': 'October 2020 - Present',
'title': 'Official Maintainer - Evolution-X',
'description': 'Evolution X is a flashable Custom ROM to bring a true Pixel feel to your Android Device at first glance, with many additional configurations at your disposal. We aim to provide frequent builds with monthly security patches from the latest AOSP source. As an official maintainer, I am responsible for maintaining Xiaomi Mi A3.',
'link': 'http://evolution-x.org'
},
{
'duration': '2021 - Present',
'title': 'Official Maintainer - SkyHawk Recovery Project',
'description': 'Android recovery based on TeamWin Recovery Project with rich UI and Features. As an official maintainer, I am responsible for maintaining Xiaomi Mi A3. (currently the updates are on hold because of some encryption issues for non-dynamic partitions)',
'link': 'https://shrp.github.io'
},
{
'duration': 'August, 2021 - September, 2021',
'title': 'Intern at - IETE',
'description': 'We covered various topics like: Watermarking on an img, Face Detection and Color Detection in an Image/Video, Various GUI based image processing systems using appJar (The easiest way to create GUIs in python) Making graphs using Matplotlib, etc all in python.',
'link': ''
}
]
60 changes: 60 additions & 0 deletions Hemant Sachdeva/src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (C) 2021 Hemant Sachdeva <hemant.evolver@gmail.com>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import os
import sys
from src.life import educations, experiences, projects

try:
from flask import Flask, render_template, request
except ImportError:
sys.exit("[!] Flask module not found. Install it by 'pip3 install flask'")

application = Flask(__name__)


def bot_message(data):
# Get the bot API key from the environment variable
BOT_API = os.getenv("BOT_API")
# Get the chat ID from the environment variable
CHAT_ID = os.getenv("CHAT_ID")
email = data.get("email")
subject = data.get("subject")
message = data.get("message")
TEXT_MESSAGE = f"Email: <code>{email}</code>\nSubject: <code>{subject}</code>\nMessage: <code>{message}</code>"
url = f"https://api.telegram.org/bot{BOT_API}/sendMessage"
# use curl to send the message to the bot API and the chat ID of telegram group where the bot is joined
os.system(
f"curl -s -X POST '{url}' -d chat_id={CHAT_ID} -d text='{TEXT_MESSAGE}' -d parse_mode='HTML'")


@application.route('/')
def index():
context = {
'educations': educations,
'projects': projects,
'experiences': experiences
}
return render_template('index.html', context=context)


@application.route('/send_message', methods=['POST'])
def send_message():
try:
data = request.form.to_dict()
bot_message(data)
return render_template('/thankyou.html')
except:
return render_template('/error.html')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions Hemant Sachdeva/src/static/assets/svg/mashup-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Hemant Sachdeva/src/static/assets/svg/xdadevelopers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 57fa472

Please sign in to comment.