├── .gitattributes
├── .gitignore
├── .vscode
├── launch.json
└── settings.json
├── 100_movies_list
├── .idea
│ ├── .gitignore
│ ├── 100_movies_list.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── main.py
└── movies.txt
├── ArtSlate
├── .idea
│ ├── .gitignore
│ ├── ArtSlate.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── Auto Job Application submit on linkedin
└── main.py
├── Automate-Birthday-Wisher
├── .idea
│ ├── .gitignore
│ ├── Automate-Birthday-Wisher.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── main.py
└── qoutes.txt
├── BookTrackerApp
├── .idea
│ ├── .gitignore
│ ├── BookTrackerApp.iml
│ ├── dataSources.xml
│ ├── inspectionProfiles
│ │ ├── Project_Default.xml
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── README.md
├── __pycache__
│ └── app.cpython-38.pyc
├── app.py
├── books-collection.db
└── templates
│ ├── add.html
│ ├── edit.html
│ └── index.html
├── CoffeeMachine
├── .gitignore
└── main.py
├── CoffeeMachineOPP
├── .idea
│ ├── .gitignore
│ ├── CoffeeMachineOPP.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── __pycache__
│ ├── coffee_maker.cpython-38.pyc
│ ├── menu.cpython-38.pyc
│ └── money_machine.cpython-38.pyc
├── coffee_maker.py
├── main.py
├── menu.py
└── money_machine.py
├── Coffeefi
├── .idea
│ ├── .gitignore
│ ├── Coffeefi.iml
│ ├── inspectionProfiles
│ │ ├── Project_Default.xml
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── Demos
│ ├── Screenshot_2021-01-05 Add Cafes.png
│ ├── Screenshot_2021-01-05 All Cafes.png
│ └── Screenshot_2021-01-05 Coffee Wi-fi.png
├── README.md
├── __pycache__
│ └── app.cpython-38.pyc
├── app.py
├── cafe-data.csv
├── requirements.txt
├── static
│ └── css
│ │ └── style.css
└── templates
│ ├── add.html
│ ├── cafes.html
│ └── index.html
├── FlasKBlog
├── .gitignore
├── Demo
│ ├── Screenshot_2021-01-03 Flask Blog(1).png
│ └── Screenshot_2021-01-03 Flask Blog.png
├── README.md
├── app.py
├── static
│ ├── css
│ │ ├── clean-blog.css
│ │ └── clean-blog.min.css
│ ├── img
│ │ ├── about-bg.jpg
│ │ ├── contact-bg.jpg
│ │ ├── home-bg.jpg
│ │ ├── post-bg.jpg
│ │ └── post-sample-image.jpg
│ ├── js
│ │ ├── clean-blog.js
│ │ ├── clean-blog.min.js
│ │ ├── contact_me.js
│ │ └── jqBootstrapValidation.js
│ └── vendor
│ │ ├── bootstrap
│ │ ├── css
│ │ │ ├── bootstrap-grid.css
│ │ │ ├── bootstrap-grid.css.map
│ │ │ ├── bootstrap-grid.min.css
│ │ │ ├── bootstrap-grid.min.css.map
│ │ │ ├── bootstrap-reboot.css
│ │ │ ├── bootstrap-reboot.css.map
│ │ │ ├── bootstrap-reboot.min.css
│ │ │ ├── bootstrap-reboot.min.css.map
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ ├── bootstrap.min.css
│ │ │ └── bootstrap.min.css.map
│ │ └── js
│ │ │ ├── bootstrap.bundle.js
│ │ │ ├── bootstrap.bundle.js.map
│ │ │ ├── bootstrap.bundle.min.js
│ │ │ ├── bootstrap.bundle.min.js.map
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.js.map
│ │ │ ├── bootstrap.min.js
│ │ │ └── bootstrap.min.js.map
│ │ ├── fontawesome-free
│ │ ├── css
│ │ │ ├── all.css
│ │ │ ├── all.min.css
│ │ │ ├── brands.css
│ │ │ ├── brands.min.css
│ │ │ ├── fontawesome.css
│ │ │ ├── fontawesome.min.css
│ │ │ ├── regular.css
│ │ │ ├── regular.min.css
│ │ │ ├── solid.css
│ │ │ ├── solid.min.css
│ │ │ ├── svg-with-js.css
│ │ │ ├── svg-with-js.min.css
│ │ │ ├── v4-shims.css
│ │ │ └── v4-shims.min.css
│ │ └── webfonts
│ │ │ ├── fa-brands-400.eot
│ │ │ ├── fa-brands-400.svg
│ │ │ ├── fa-brands-400.ttf
│ │ │ ├── fa-brands-400.woff
│ │ │ ├── fa-brands-400.woff2
│ │ │ ├── fa-regular-400.eot
│ │ │ ├── fa-regular-400.svg
│ │ │ ├── fa-regular-400.ttf
│ │ │ ├── fa-regular-400.woff
│ │ │ ├── fa-regular-400.woff2
│ │ │ ├── fa-solid-900.eot
│ │ │ ├── fa-solid-900.svg
│ │ │ ├── fa-solid-900.ttf
│ │ │ ├── fa-solid-900.woff
│ │ │ └── fa-solid-900.woff2
│ │ └── jquery
│ │ ├── jquery.js
│ │ ├── jquery.min.js
│ │ ├── jquery.min.map
│ │ ├── jquery.slim.js
│ │ ├── jquery.slim.min.js
│ │ └── jquery.slim.min.map
└── templates
│ ├── about.html
│ ├── contact.html
│ ├── footer.html
│ ├── header.html
│ ├── index.html
│ └── post.html
├── HabitTracker
├── .idea
│ ├── .gitignore
│ ├── HabitTracker.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── ISS-Tracker
├── .idea
│ ├── .gitignore
│ ├── ISS-Tracker.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── InternetSpeedMeter
├── .idea
│ ├── .gitignore
│ ├── InternetSpeedMeter.iml
│ ├── inspectionProfiles
│ │ ├── Project_Default.xml
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── README.md
├── ism.gif
└── main.py
├── Kanye-Quotes
├── .idea
│ ├── .gitignore
│ ├── Kanye-Quotes.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── background.png
├── kanye.png
└── main.py
├── LICENSE
├── Mile_to_KM_Converter_GUI
├── .idea
│ ├── .gitignore
│ ├── Mile_to_KM_Converter_GUI.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── Personal_Flight_Club
├── .gitignore
├── .idea
│ ├── .gitignore
│ ├── Personal_Flight_Club.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── LICENSE.md
├── README.md
├── data_manager.py
├── flight_data.py
├── flight_search.py
├── main.py
└── notification_manager.py
├── Pomodoro
├── .idea
│ ├── .gitignore
│ ├── Pomodoro.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── favicon.ico
├── main.py
└── tomato.png
├── PongGame
├── .idea
│ ├── .gitignore
│ ├── PongGame.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── __pycache__
│ ├── ball.cpython-38.pyc
│ ├── paddle.cpython-38.pyc
│ └── scoreboard.cpython-38.pyc
├── ball.py
├── main.py
├── paddle.py
└── scoreboard.py
├── QuizGame
├── .idea
│ ├── .gitignore
│ ├── QuizGame.iml
│ ├── codeStyles
│ │ └── codeStyleConfig.xml
│ ├── copyright
│ │ ├── K_M_H_Mubin.xml
│ │ └── profiles_settings.xml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── __pycache__
│ ├── data.cpython-38.pyc
│ ├── question_model.cpython-38.pyc
│ └── quiz_brain.cpython-38.pyc
├── data.py
├── main.py
├── question_model.py
└── quiz_brain.py
├── QuizerApp
├── .idea
│ ├── .gitignore
│ ├── QuizerApp.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── README.md
├── __pycache__
│ ├── data.cpython-38.pyc
│ ├── question_model.cpython-38.pyc
│ ├── quiz_brain.cpython-38.pyc
│ └── ui.cpython-38.pyc
├── data.py
├── images
│ ├── cross.png
│ └── tick.png
├── main.py
├── question_model.py
├── quiz_brain.py
└── ui.py
├── README.md
├── RainAlert
├── .idea
│ ├── .gitignore
│ ├── RainAlert.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── SnakeGame
├── .idea
│ ├── .gitignore
│ ├── SnakeGame.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── __pycache__
│ ├── food.cpython-38.pyc
│ ├── scoreboard.cpython-38.pyc
│ └── snake.cpython-38.pyc
├── data.txt
├── food.py
├── main.py
├── scoreboard.py
└── snake.py
├── StockNewsAleart
├── .idea
│ ├── .gitignore
│ ├── StockNewsAleart.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── TopMovieList
├── .idea
│ ├── .gitignore
│ ├── TopMovieList.iml
│ ├── dataSources.xml
│ ├── inspectionProfiles
│ │ ├── Project_Default.xml
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── README.md
├── __pycache__
│ └── app.cpython-38.pyc
├── app.py
├── demo.png
├── frontend
│ ├── index.html
│ └── styles.css
├── movies.db
├── static
│ └── css
│ │ └── styles.css
└── templates
│ ├── add.html
│ ├── edit.html
│ ├── index.html
│ └── select.html
├── Tresure_Island.py
├── TurtleCrossingGame
├── .idea
│ ├── .gitignore
│ ├── TurtleCrossingGame.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── __pycache__
│ ├── car_manager.cpython-38.pyc
│ ├── player.cpython-38.pyc
│ └── scoreboard.cpython-38.pyc
├── car_manager.py
├── main.py
├── player.py
└── scoreboard.py
├── TurtleDotArt
├── .idea
│ ├── .gitignore
│ ├── TurtleDotArt.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── image.jpg
└── main.py
├── TurtleRace
├── .idea
│ ├── .gitignore
│ ├── TurtleRace.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── US_States_Quiz_Game
├── .idea
│ ├── .gitignore
│ ├── US_States_Quiz_Game.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── 50_states.csv
├── States to learn.csv
├── blank_states_img.gif
└── main.py
├── WorkoutTracking
├── .idea
│ ├── .gitignore
│ ├── WorkoutTracking.iml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
└── main.py
├── average_height_using_for_loop.py
├── black_jack.py
├── blind_auction.py
├── bmi.py
├── caesar_cipher.py
├── calculator_app.py
├── fizzbuzz.py
├── flaskWTForm
├── .idea
│ ├── .gitignore
│ ├── flaskWTForm.iml
│ ├── inspectionProfiles
│ │ ├── Project_Default.xml
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── README.md
├── __pycache__
│ └── app.cpython-38.pyc
├── app.py
└── templates
│ ├── base.html
│ ├── denied.html
│ ├── index.html
│ ├── login.html
│ └── success.html
├── guess_the_number.py
├── hangman
├── __pycache__
│ ├── hangman_art.cpython-38.pyc
│ └── hangman_words.cpython-38.pyc
├── hangman.py
├── hangman_art.py
└── hangman_words.py
├── hello.py
├── higher_or_lower_game
├── art.py
├── game_data.py
└── higher_lower.py
├── leapyear.py
├── life_in_weeks.py
├── love_calculator.py
├── password_generator.py
├── rock_paper_scissor.py
├── tipcal.py
├── tresure_map.py
└── whos_paying.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | GuessNumberWebApp/
3 |
4 | InstaFollowerBot/
5 |
6 | GuessAge_Gender/
7 |
8 | GamingBot/
9 |
10 | InternetSpeedTwitteBot/
11 |
12 | NameCard/
13 |
14 | SanFranciscoRentingAutomation/
15 |
16 | TinderBot/
17 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Python: Current File",
9 | "type": "python",
10 | "request": "launch",
11 | "program": "${file}",
12 | "console": "integratedTerminal"
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "python.pythonPath": "/home/devbox/anaconda3/envs/practice/bin/python",
3 | "python.testing.promptToConfigure": false,
4 | "python.testing.pytestEnabled": false,
5 | "python.testing.unittestEnabled": false,
6 | "python.testing.nosetestsEnabled": false
7 | }
--------------------------------------------------------------------------------
/100_movies_list/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../../:\GitHub\Python-Projects\100_movies_list\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/100_movies_list/.idea/100_movies_list.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/100_movies_list/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/100_movies_list/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/100_movies_list/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/100_movies_list/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/100_movies_list/main.py:
--------------------------------------------------------------------------------
1 | import requests
2 | from bs4 import BeautifulSoup
3 |
4 | # assign the target url
5 | URL = "https://www.empireonline.com/movies/features/best-movies-2/"
6 |
7 | # requesting the url
8 | response = requests.get(URL)
9 |
10 | # get the raw html
11 | website_html = response.text
12 |
13 | # crawling the html
14 | soup = BeautifulSoup(website_html, "html.parser")
15 |
16 | # printing the whole website html
17 | # print(soup.prettify())
18 |
19 | # finding the h3 tags and grab the movies titles
20 | all_movies = soup.findAll(name="h3", class_="title")
21 | # print all movies
22 | # print(all_movies)
23 |
24 | # creating a movie list using list comprehension
25 | movie_titles = [movie.getText() for movie in all_movies]
26 | # print all movies
27 | # print(movie_titles)
28 |
29 | # reversing the list using splice operator
30 | movies = movie_titles[::-1]
31 |
32 | # creating a new file to store the list
33 | with open("movies.txt", mode="w", encoding="utf-8") as file:
34 | for movie in movies:
35 | file.write(f"{movie}\n")
36 |
--------------------------------------------------------------------------------
/100_movies_list/movies.txt:
--------------------------------------------------------------------------------
1 | 1)The Godfather
2 | 2) The Empire Strikes Back
3 | 3) The Dark Knight
4 | 4) The Shawshank Redemption
5 | 5) Pulp Fiction
6 | 6) Goodfellas
7 | 7) Raiders Of The Lost Ark
8 | 8) Jaws
9 | 9) Star Wars
10 | 10) The Lord Of The Rings: The Fellowship Of The Ring
11 | 11) Back To The Future
12 | 12: The Godfather Part II
13 | 13) Blade Runner
14 | 14) Alien
15 | 15) Aliens
16 | 16) The Lord Of The Rings: The Return Of The King
17 | 17) Fight Club
18 | 18) Inception
19 | 19) Jurassic Park
20 | 20) Die Hard
21 | 21) 2001: A Space Odyssey
22 | 22) Apocalypse Now
23 | 23) The Lord Of The Rings: The Two Towers
24 | 24) The Matrix
25 | 25) Terminator 2: Judgment Day
26 | 26) Heat
27 | 27) The Good, The Bad And The Ugly
28 | 28) Casablanca
29 | 29) The Big Lebowski
30 | 30) Seven
31 | 31) Taxi Driver
32 | 32) The Usual Suspects
33 | 33) Schindler's List
34 | 34) Guardians Of The Galaxy
35 | 35) The Shining
36 | 36) The Departed
37 | 37) The Thing
38 | 38) Mad Max: Fury Road
39 | 39) Saving Private Ryan
40 | 40) 12 Angry Men
41 | 41) Eternal Sunshine Of The Spotless Mind
42 | 42) There Will Be Blood
43 | 43) One Flew Over The Cuckoo's Nest
44 | 44) Gladiator
45 | 45) Drive
46 | 46) Citizen Kane
47 | 47) Interstellar
48 | 48) The Silence Of The Lambs
49 | Trainspotting
50 | 50) Lawrence Of Arabia
51 | 51) It's A Wonderful Life
52 | 52) Once Upon A Time In The West
53 | 53) Psycho
54 | 54) Vertigo
55 | 55) Pan's Labyrinth
56 | 56) Reservoir Dogs
57 | 57) Whiplash
58 | 58) Inglourious Basterds
59 | 59) E.T. â The Extra Terrestrial
60 | 60) American Beauty
61 | 61) Forrest Gump
62 | 62) La La Land
63 | 63) Donnie Darko
64 | 64) L.A. Confidential
65 | 65) Avengers Assemble
66 | 66) Return Of The Jedi
67 | 67) Memento
68 | 68) Ghostbusters
69 | 69) Singin' In The Rain
70 | 70) The Lion King
71 | 71) Hot Fuzz
72 | 72) Rear Window
73 | 73) Seven Samurai
74 | 74) Mulholland Dr.
75 | 75) Fargo
76 | 76) A Clockwork Orange
77 | 77) Toy Story
78 | 78) Oldboy
79 | 79) Captain America: Civil War
80 | 15) Spirited Away
81 | 81) The Social Network
82 | 82) Some Like It Hot
83 | 83) True Romance
84 | 84) Rocky
85 | 85) Léon
86 | 86) Indiana Jones And The Last Crusade
87 | 87) Predator
88 | 88) The Exorcist
89 | 89) Shaun Of The Dead
90 | 90) No Country For Old Men
91 | 91) The Prestige
92 | 92) The Terminator
93 | 2) The Princess Bride
94 | 94) Lost In Translation
95 | 95) Arrival
96 | 96) Good Will Hunting
97 | 97) Titanic
98 | 98) Amelie
99 | 99) Raging Bull
100 | 100) Stand By Me
101 |
--------------------------------------------------------------------------------
/ArtSlate/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../../../../../:\Users\kmhmu\Documents\GitHub\Python-Projects\ArtSlate\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/ArtSlate/.idea/ArtSlate.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ArtSlate/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ArtSlate/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ArtSlate/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ArtSlate/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ArtSlate/main.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle, Screen
2 |
3 | # creating objects
4 | tim = Turtle()
5 | screen = Screen()
6 |
7 |
8 | def move_forward():
9 | tim.forward(10)
10 |
11 |
12 | def move_backward():
13 | tim.backward(10)
14 |
15 |
16 | def turn_left():
17 | new_heading = tim.heading() + 10
18 | tim.setheading(new_heading)
19 |
20 |
21 | def turn_right():
22 | new_heading = tim.heading() - 10
23 | tim.setheading(new_heading)
24 |
25 |
26 | def clear():
27 | # only clean the turtle drawing
28 | tim.clear()
29 | # after clear pen up
30 | tim.penup()
31 | # after clear go back to center of the screen
32 | tim.home()
33 | # after reach home then pen down
34 | tim.pendown()
35 |
36 |
37 | # add event listener
38 | screen.listen()
39 | # when space key pressed then tim forward 50
40 | screen.onkey(key="w", fun=move_forward)
41 | screen.onkey(key="s", fun=move_backward)
42 | screen.onkey(key="a", fun=turn_left)
43 | screen.onkey(key="d", fun=turn_right)
44 | screen.onkey(key="c", fun=clear)
45 | # exit if clicked
46 | screen.exitonclick()
47 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../../../../../:\Users\kmhmu\Documents\GitHub\Python-Projects\Automate-Birthday-Wisher\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/.idea/Automate-Birthday-Wisher.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/main.py:
--------------------------------------------------------------------------------
1 | import smtplib
2 | import datetime as dt
3 | import random
4 |
5 | MY_EMAIL = "example@example.com"
6 | MY_PASSWORD = "aslkdjflsjdlajk"
7 |
8 | # current day
9 | now = dt.datetime.now()
10 | # current weekday
11 | weekday = now.weekday()
12 |
13 | if weekday == 1:
14 | with open("qoutes.txt") as quote_file:
15 | all_quotes = quote_file.readlines()
16 | quote = random.choice(all_quotes)
17 |
18 | print(quote)
19 | with smtplib.SMTP("smtp.gmail.com") as connection:
20 | connection.starttls()
21 | connection.login(MY_EMAIL, MY_PASSWORD)
22 | connection.sendmail(from_addr=MY_EMAIL, to_addrs=MY_EMAIL, msg=f"Subject: Monday Motivation \n\n {quote}")
23 |
--------------------------------------------------------------------------------
/Automate-Birthday-Wisher/qoutes.txt:
--------------------------------------------------------------------------------
1 | “The pleasure which we most rarely experience gives us greatest delight.”
2 | “It's been my experience that you can nearly always enjoy things if you make up your mind firmly that you will.”
3 | “Happiness is acceptance.”
4 | “The secret of happiness is not in doing what one likes, but in liking what one does.”
5 | “We begin from the recognition that all beings cherish happiness and do not want suffering. It then becomes both morally wrong and pragmatically unwise to pursue only one’s own happiness oblivious to the feelings and aspirations of all others who surround us as members of the same human family. The wiser course is to think of others when pursuing our own happiness.”
6 | “Most people would rather be certain they’re miserable, than risk being happy.”
7 | “The unhappy derive comfort from the misfortunes of others.”
8 | “For many men, the acquisition of wealth does not end their troubles, it only changes them.”
9 | “A table, a chair, a bowl of fruit and a violin; what else does a man need to be happy?”
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../../:\GitHub\Python-Projects\BookTrackerApp\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/BookTrackerApp.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/dataSources.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | sqlite.xerial
6 | true
7 | org.sqlite.JDBC
8 | jdbc:sqlite:E:\GitHub\Python-Projects\BookTrackerApp\new-books-collection.db
9 | $ProjectFileDir$
10 |
11 |
12 |
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BookTrackerApp/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/BookTrackerApp/README.md:
--------------------------------------------------------------------------------
1 | # Book Tracker App in Flask
2 |
3 | A simple book tracker app powered by flask.
4 |
5 | ## Technologies
6 |
7 | - Flask
8 | - Flask SQLAlchemy
9 | - SQLite3
10 |
--------------------------------------------------------------------------------
/BookTrackerApp/__pycache__/app.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/BookTrackerApp/__pycache__/app.cpython-38.pyc
--------------------------------------------------------------------------------
/BookTrackerApp/books-collection.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/BookTrackerApp/books-collection.db
--------------------------------------------------------------------------------
/BookTrackerApp/templates/add.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Book Add
6 |
7 |
8 |
17 |
18 |
--------------------------------------------------------------------------------
/BookTrackerApp/templates/edit.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Edit Books
6 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/BookTrackerApp/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Book Tracker
6 |
7 |
8 | My Library
9 |
10 | {#if there is no book then show empty message#}
11 |
12 | {% if books ==[]: %}
13 | Library is empty
14 | {% endif %}
15 |
16 |
17 | {% for book in books %}
18 |
19 | {{ book.title }} - {{ book.author }} - {{ book.rating }}/10
20 | Edit Rating
21 | Delete
22 |
23 |
24 |
25 | {% endfor %}
26 |
27 |
28 | Add New book
29 |
30 |
--------------------------------------------------------------------------------
/CoffeeMachine/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/*
2 | .pytest_cache
--------------------------------------------------------------------------------
/CoffeeMachineOPP/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../../../../../:\Users\kmhmu\Documents\GitHub\Python-Projects\CoffeeMachineOPP\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/.idea/CoffeeMachineOPP.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/__pycache__/coffee_maker.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/CoffeeMachineOPP/__pycache__/coffee_maker.cpython-38.pyc
--------------------------------------------------------------------------------
/CoffeeMachineOPP/__pycache__/menu.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/CoffeeMachineOPP/__pycache__/menu.cpython-38.pyc
--------------------------------------------------------------------------------
/CoffeeMachineOPP/__pycache__/money_machine.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/CoffeeMachineOPP/__pycache__/money_machine.cpython-38.pyc
--------------------------------------------------------------------------------
/CoffeeMachineOPP/coffee_maker.py:
--------------------------------------------------------------------------------
1 | # Coffee maker class
2 |
3 | class CoffeeMaker:
4 | """Models the machine that makes the coffeee"""
5 |
6 | def __init__(self):
7 | self.resources = {
8 | "water": 300,
9 | "milk": 200,
10 | "coffee": 100
11 | }
12 |
13 | def report(self):
14 | """Prints a report of all resources"""
15 | print(f"Water: {self.resources['water']} ml")
16 | print(f"Milk: {self.resources['milk']} ml")
17 | print(f"Coffee: {self.resources['coffee']} g")
18 |
19 | def is_resource_sufficient(self, drink):
20 | """Returns True when order can be made, False if ingredients are insufficient."""
21 | can_make = True
22 | for item in drink.ingredients:
23 | if drink.ingredients[item] > self.resources[item]:
24 | print(f"Sorry there is not enough {item}.")
25 | can_make = False
26 | return can_make
27 |
28 | def make_coffee(self, order):
29 | """Deducts the required ingredients from the resources"""
30 | for item in order.ingredients:
31 | self.resources[item] -= order.ingredients[item]
32 | print(f"Here is your {order.name} ☕. Enjoy. ")
33 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/main.py:
--------------------------------------------------------------------------------
1 | # Import from classes
2 |
3 | from menu import Menu, MenuItem
4 | from coffee_maker import CoffeeMaker
5 | from money_machine import MoneyMachine
6 |
7 | # creating object
8 | money_machine = MoneyMachine()
9 | coffee_maker = CoffeeMaker()
10 | menu = Menu()
11 |
12 | # is machine on. default true
13 | is_on = True
14 |
15 | while is_on:
16 | options = menu.get_items()
17 | choice = input(f" What would you like? ({options}) \n=> ")
18 | if choice == "off":
19 | is_on = False
20 | elif choice == "report":
21 | coffee_maker.report()
22 | money_machine.report()
23 | else:
24 | drink = menu.find_drink(choice)
25 | is_enough_ingredients = coffee_maker.is_resource_sufficient(drink)
26 | is_payment_successful = money_machine.make_payment(drink.cost)
27 | if is_enough_ingredients and is_payment_successful:
28 | coffee_maker.make_coffee(drink)
29 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/menu.py:
--------------------------------------------------------------------------------
1 | # Coffee Machine Menu option class
2 |
3 | class MenuItem:
4 | """Models each Menu Item"""
5 |
6 | def __init__(self, name, water, milk, coffee, cost):
7 | self.name = name
8 | self.cost = cost
9 | self.ingredients = {
10 | "water": water,
11 | "milk": milk,
12 | "coffee": coffee
13 | }
14 |
15 |
16 | class Menu:
17 | """ Models the menu with drinks"""
18 |
19 | def __init__(self):
20 | self.menu = [
21 | MenuItem(name="latte", water=200, milk=150, coffee=24, cost=2.5),
22 | MenuItem(name="espresso", water=50, milk=0, coffee=18, cost=1.5),
23 | MenuItem(name="cappuccino", water=250, milk=50, coffee=24, cost=3)
24 | ]
25 |
26 | def get_items(self):
27 | """Returns all the names of the available menu items"""
28 | options = ""
29 | for item in self.menu:
30 | options += f"{item.name} / "
31 | return options
32 |
33 | def find_drink(self, order_name):
34 | """Searches the menu for a particular drink by name. Returns that item if it exits, otherwise returns
35 | None"""
36 | for item in self.menu:
37 | if item.name == order_name:
38 | return item
39 | print("Sorry that item is not available")
40 |
--------------------------------------------------------------------------------
/CoffeeMachineOPP/money_machine.py:
--------------------------------------------------------------------------------
1 | class MoneyMachine:
2 | CURRENCY = "$"
3 |
4 | COIN_VALUES = {
5 | "quarters": 0.25,
6 | "dimes": 0.10,
7 | "nickles": 0.05,
8 | "pennies": 0.01
9 | }
10 |
11 | def __init__(self):
12 | self.profit = 0
13 | self.money_received = 0
14 |
15 | def report(self):
16 | """Prints the current profit"""
17 | print(f"Money: {self.CURRENCY} {self.profit}")
18 |
19 | def process_coins(self):
20 | """Returns the total calculated from coins inserted."""
21 | print("Please insert coins.")
22 | for coin in self.COIN_VALUES:
23 | self.money_received += int(input(f"How many {coin}? \n=> ")) * self.COIN_VALUES[coin]
24 | return self.money_received
25 |
26 | def make_payment(self, cost):
27 | """Returns True when payment is accepted, or False if insufficient."""
28 | self.process_coins()
29 | if self.money_received >= cost:
30 | change = round(self.money_received - cost, 2)
31 | print(f"Here is {self.CURRENCY}{change} in change.")
32 | self.profit += cost
33 | self.money_received = 0
34 | return True
35 | else:
36 | print("Sorry that's not enough money. Money refunded.")
37 | self.money_received = 0
38 | return False
39 |
--------------------------------------------------------------------------------
/Coffeefi/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../../:\GitHub\Python-Projects\Coffeefi\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/Coffeefi/.idea/Coffeefi.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Coffeefi/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Coffeefi/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Coffeefi/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Coffeefi/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Coffeefi/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Coffeefi/Demos/Screenshot_2021-01-05 Add Cafes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/Coffeefi/Demos/Screenshot_2021-01-05 Add Cafes.png
--------------------------------------------------------------------------------
/Coffeefi/Demos/Screenshot_2021-01-05 All Cafes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/Coffeefi/Demos/Screenshot_2021-01-05 All Cafes.png
--------------------------------------------------------------------------------
/Coffeefi/Demos/Screenshot_2021-01-05 Coffee Wi-fi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/Coffeefi/Demos/Screenshot_2021-01-05 Coffee Wi-fi.png
--------------------------------------------------------------------------------
/Coffeefi/README.md:
--------------------------------------------------------------------------------
1 | # Coffee fi
2 |
3 | A simple Cafe list bootstrap website.
4 |
5 | ## Technologies
6 |
7 | * Flask
8 | * Flask Bootstrap
9 | * Flask WTForm
10 | * CSV
11 |
12 | ## Installation
13 |
14 | 1. First clone or download the project file
15 | 2. Create a python environment then install all the packages from requirements file.
16 | 3. Run the project
17 |
18 | > note: I'm using conda environment, but you can use virtualenv.
19 |
20 | ## Demo
21 |
22 | #### Homepage
23 |
24 | 
25 |
26 | #### Cafe lists
27 |
28 | 
29 |
30 | #### Add Cafes
31 |
32 | 
--------------------------------------------------------------------------------
/Coffeefi/__pycache__/app.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/Coffeefi/__pycache__/app.cpython-38.pyc
--------------------------------------------------------------------------------
/Coffeefi/cafe-data.csv:
--------------------------------------------------------------------------------
1 | Cafe Name ,Location ,Open,Close,Coffee,Wifi ,Power
2 | Beans & Aroma Coffees ,https://goo.gl/maps/J26EAaWwnALWk1XCA,8AM ,12AM ,☕☕☕☕ ,💪💪💪💪 ,🔌🔌🔌🔌
3 | Butlers Chocolate Cafe Gulshan ,https://goo.gl/maps/wZZZk84T1DJtT6qAA,8AM ,12AM ,☕☕☕☕☕ ,💪💪💪💪💪,🔌🔌🔌🔌🔌
4 | Art Cafe ,https://goo.gl/maps/pvxCyvWWTAdKFycc7,10AM,11PM ,☕☕☕☕ ,💪💪💪💪 ,🔌🔌🔌🔌🔌
5 | Coffee World Uttara ,https://goo.gl/maps/FG83Xip9ApcQnfvC7,9AM ,12AM ,☕☕☕ ,💪💪💪 ,🔌🔌🔌🔌
6 | The White Canary Cafe And Marble Slab Creamery,https://goo.gl/maps/LjVLjud1iVUPG1u97,7AM ,1AM ,☕☕☕☕ ,💪💪💪💪 ,🔌🔌🔌🔌
7 | North End Coffee Roasters ,https://goo.gl/maps/CDdLCqje9tx56FwQA,8AM ,9PM ,☕☕☕☕☕ ,💪💪💪💪💪,🔌🔌🔌🔌🔌
--------------------------------------------------------------------------------
/Coffeefi/requirements.txt:
--------------------------------------------------------------------------------
1 | certifi==2020.12.5
2 | click==7.1.2
3 | dominate==2.6.0
4 | Flask==1.1.2
5 | Flask-Bootstrap==3.3.7.1
6 | Flask-WTF==0.14.3
7 | itsdangerous==1.1.0
8 | Jinja2==2.11.2
9 | MarkupSafe==1.1.1
10 | visitor==0.1.3
11 | Werkzeug==1.0.1
12 | wincertstore==0.2
13 | WTForms==2.3.3
14 |
--------------------------------------------------------------------------------
/Coffeefi/static/css/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #333;
3 | color: white;
4 | }
5 |
6 | a {
7 | color: #ffc107;
8 | }
9 |
10 | .jumbotron {
11 | display: flex;
12 | align-items: center;
13 | margin: 0;
14 | height: 100vh;
15 | color: white;
16 | background-color: #333;
17 | }
18 |
19 | .space-above {
20 | margin-top: 20px;
21 | padding-top: 20px;
22 | }
--------------------------------------------------------------------------------
/Coffeefi/templates/add.html:
--------------------------------------------------------------------------------
1 | {# import flask bootstrap style#}
2 | {% extends 'bootstrap/base.html' %}
3 |
4 | {# import wtform #}
5 | {% import "bootstrap/wtf.html" as wtf %}
6 |
7 |
8 | {# adding custom styles #}
9 | {% block styles %}
10 | {# import everything from bootstrap #}
11 | {{ super() }}
12 | {#custom style link#}
13 |
14 | {% endblock %}
15 |
16 |
17 | {# Daynamically change the title of the website #}
18 |
19 | {% block title %}Add Cafes{% endblock %}
20 |
21 | {#website body content#}
22 |
23 | {% block content %}
24 |
25 |
26 |
27 |
28 |
29 |
Add a new cafe into the database
30 |
31 | {# Generatating wtform automatically #}
32 |
33 | {{ wtf.quick_form(form, novalidate=True) }}
34 |
35 |
36 | See All Cafes
37 |
38 |
39 |
40 |
41 |
42 | {% endblock %}
--------------------------------------------------------------------------------
/Coffeefi/templates/cafes.html:
--------------------------------------------------------------------------------
1 | {# import flask bootstrap style#}
2 | {% extends 'bootstrap/base.html' %}
3 |
4 | {# adding custom styles #}
5 | {% block styles %}
6 | {# import everything from bootstrap #}
7 | {{ super() }}
8 | {#custom style link#}
9 |
10 | {% endblock %}
11 |
12 |
13 | {# Daynamically change the title of the website #}
14 |
15 | {% block title %}All Cafes{% endblock %}
16 |
17 | {#website body content#}
18 |
19 | {% block content %}
20 |
21 |
22 |
23 |
24 | All Cafes
25 |
26 |
27 |
28 | {% for row in cafes %}
29 |
30 |
31 | {% for item in row %}
32 | {% if item[0:4] == "http" %}
33 | Maps Link
34 | {% else %}
35 | {{ item }}
36 | {% endif %}
37 |
38 | {% endfor %}
39 |
40 |
41 | {% endfor %}
42 |
43 |
Return to Home Page
44 |
45 |
46 |
47 |
48 | {% endblock %}
--------------------------------------------------------------------------------
/Coffeefi/templates/index.html:
--------------------------------------------------------------------------------
1 | {# import flask bootstrap style#}
2 | {% extends 'bootstrap/base.html' %}
3 |
4 | {# adding custom styles #}
5 | {% block styles %}
6 | {# import everything from bootstrap #}
7 | {{ super() }}
8 | {#custom style link#}
9 |
10 | {% endblock %}
11 |
12 |
13 | {# Daynamically change the title of the website #}
14 |
15 | {% block title %}Coffee & Wi-fi{% endblock %}
16 |
17 | {#website body content#}
18 |
19 | {% block content %}
20 |
21 |
22 |
23 |
Coffee & Wi-fi
24 |
Want to work in a cafe but need wifi?
25 |
26 |
You've found the right place! Checkout my collection of cafes with data on power socket availability,
27 | wi-fi
28 | speed and coffee quality.
29 |
Show Me
30 |
31 |
32 |
33 | {% endblock %}
--------------------------------------------------------------------------------
/FlasKBlog/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | __pycache__
--------------------------------------------------------------------------------
/FlasKBlog/Demo/Screenshot_2021-01-03 Flask Blog(1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/FlasKBlog/Demo/Screenshot_2021-01-03 Flask Blog(1).png
--------------------------------------------------------------------------------
/FlasKBlog/Demo/Screenshot_2021-01-03 Flask Blog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/FlasKBlog/Demo/Screenshot_2021-01-03 Flask Blog.png
--------------------------------------------------------------------------------
/FlasKBlog/README.md:
--------------------------------------------------------------------------------
1 | # A Bootstrap Theme Blog Powered By Flask
2 |
3 | A simple and full responsive Bootstrap blog powered by Flask.
4 |
5 | ## Technologies
6 |
7 | ### Frontend
8 | * HTML 5
9 | * CSS 3
10 | * JavaScript
11 | * Bootstrap
12 |
13 | ### Backend
14 | * Flask
15 |
16 |
17 | ## Installation
18 |
19 | 1. First clone or download the files.
20 | 2. Install Flask framework
21 | ```bash
22 | pip install Flask
23 | ```
24 | 3. Install requests module
25 | ```bash
26 | pip install requests
27 | ```
28 | 4. Run the app using
29 | ```bash
30 | flask run
31 | ```
32 |
33 |
34 | ## Demo
35 |
36 | ### Desktop
37 |
38 | 
39 |
40 |
41 | ### Mobile
42 |
43 | .png)
--------------------------------------------------------------------------------
/FlasKBlog/app.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, render_template, request
2 | import requests
3 | import smtplib
4 |
5 | # fake post from apis
6 | posts = requests.get("https://api.npoint.io/493622f5077bee2314fa").json()
7 |
8 | # constant
9 | OWN_EMAIL = "Your Email Address"
10 | OWN_PASSWORD = "Your Password"
11 |
12 | app = Flask(__name__)
13 |
14 |
15 | @app.route('/')
16 | def home():
17 | return render_template("index.html", all_post=posts)
18 |
19 |
20 | @app.route('/post/')
21 | def show_post(index):
22 | requested_post = None
23 | for blog_post in posts:
24 | if blog_post["id"] == index:
25 | requested_post = blog_post
26 | return render_template("post.html", post=requested_post)
27 |
28 |
29 | @app.route('/about')
30 | def about():
31 | return render_template("about.html")
32 |
33 |
34 | # grab all the data from contact form
35 | @app.route("/contact", methods=["GET", "POST"])
36 | def contact():
37 | if request.method == "POST":
38 | data = request.form
39 | data = request.form
40 | send_email(data["name"], data["email"], data["phone"], data["message"])
41 | return render_template("contact.html", msg_sent=True)
42 | return render_template("contact.html", msg_sent=False)
43 |
44 |
45 | # sent mail automatically with the given data
46 | def send_email(name, email, phone, message):
47 | email_message = f"Subject:New Message\n\nName: {name}\nEmail: {email}\nPhone: {phone}\nMessage:{message}"
48 | with smtplib.SMTP("smtp.gmail.com") as connection:
49 | connection.starttls()
50 | connection.login(OWN_EMAIL, OWN_PASSWORD)
51 | connection.sendmail(OWN_EMAIL, OWN_EMAIL, email_message)
52 |
53 |
54 | if __name__ == '__main__':
55 | app.run()
56 |
--------------------------------------------------------------------------------
/FlasKBlog/static/img/about-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/FlasKBlog/static/img/about-bg.jpg
--------------------------------------------------------------------------------
/FlasKBlog/static/img/contact-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/FlasKBlog/static/img/contact-bg.jpg
--------------------------------------------------------------------------------
/FlasKBlog/static/img/home-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/FlasKBlog/static/img/home-bg.jpg
--------------------------------------------------------------------------------
/FlasKBlog/static/img/post-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/FlasKBlog/static/img/post-bg.jpg
--------------------------------------------------------------------------------
/FlasKBlog/static/img/post-sample-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmhmubin/Python-Projects-with-source-code/cd8fa6e6e81a591e20157b94404abb662f50bf21/FlasKBlog/static/img/post-sample-image.jpg
--------------------------------------------------------------------------------
/FlasKBlog/static/js/clean-blog.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | "use strict"; // Start of use strict
3 |
4 | // Floating label headings for the contact form
5 | $("body").on("input propertychange", ".floating-label-form-group", function(e) {
6 | $(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
7 | }).on("focus", ".floating-label-form-group", function() {
8 | $(this).addClass("floating-label-form-group-with-focus");
9 | }).on("blur", ".floating-label-form-group", function() {
10 | $(this).removeClass("floating-label-form-group-with-focus");
11 | });
12 |
13 | // Show the navbar when the page is scrolled up
14 | var MQL = 992;
15 |
16 | //primary navigation slide-in effect
17 | if ($(window).width() > MQL) {
18 | var headerHeight = $('#mainNav').height();
19 | $(window).on('scroll', {
20 | previousTop: 0
21 | },
22 | function() {
23 | var currentTop = $(window).scrollTop();
24 | //check if user is scrolling up
25 | if (currentTop < this.previousTop) {
26 | //if scrolling up...
27 | if (currentTop > 0 && $('#mainNav').hasClass('is-fixed')) {
28 | $('#mainNav').addClass('is-visible');
29 | } else {
30 | $('#mainNav').removeClass('is-visible is-fixed');
31 | }
32 | } else if (currentTop > this.previousTop) {
33 | //if scrolling down...
34 | $('#mainNav').removeClass('is-visible');
35 | if (currentTop > headerHeight && !$('#mainNav').hasClass('is-fixed')) $('#mainNav').addClass('is-fixed');
36 | }
37 | this.previousTop = currentTop;
38 | });
39 | }
40 |
41 | })(jQuery); // End of use strict
42 |
--------------------------------------------------------------------------------
/FlasKBlog/static/js/clean-blog.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Start Bootstrap - Clean Blog v5.0.10 (https://startbootstrap.com/theme/clean-blog)
3 | * Copyright 2013-2020 Start Bootstrap
4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-clean-blog/blob/master/LICENSE)
5 | */
6 |
7 | !function(o){"use strict";o("body").on("input propertychange",".floating-label-form-group",function(i){o(this).toggleClass("floating-label-form-group-with-value",!!o(i.target).val())}).on("focus",".floating-label-form-group",function(){o(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){o(this).removeClass("floating-label-form-group-with-focus")});if(992this.previousTop&&(o("#mainNav").removeClass("is-visible"),s
4 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe
27 | nostrum ullam eveniet pariatur voluptates odit, fuga atque ea nobis
28 | sit soluta odio, adipisci quas excepturi maxime quae totam ducimus
29 | consectetur?
30 |
31 |
32 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius
33 | praesentium recusandae illo eaque architecto error, repellendus
34 | iusto reprehenderit, doloribus, minus sunt. Numquam at quae
35 | voluptatum in officia voluptas voluptatibus, minus!
36 |
37 |
38 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut
39 | consequuntur magnam, excepturi aliquid ex itaque esse est vero natus
40 | quae optio aperiam soluta voluptatibus corporis atque iste neque sit
41 | tempora!
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | {% include "footer.html" %}
--------------------------------------------------------------------------------
/FlasKBlog/templates/footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
32 |
Copyright © Flask Blog 2020
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |