PYTHON PROGRAMMING
Open in Telegram
https://t.me/addlist/oJIs6WVKrqBmMWQ1 Hello! I am @Myhurthearts and welcome to the Coding channel! Here we can learn all things related to coding and improve our skills , just let me know!
Show more3 582
Subscribers
No data24 hours
+47 days
-1530 days
Posts Archive
3 583
π Quiz Alert! π ποΈ Date: Today π Time: 9:00 PM π Location: @CODING_WARRIOR π Subject: C, PYTHON , JAVA ,C++,JS
Get ready to test your skills! π₯ Don't miss out on this exciting challenge! πͺβ¨
Reward π - 20+ programming language course drive link π which one you want π
Reward π - Rank 1 π SIGMA 5.0 Rank 2-10 Drive Course
Join for more β https://t.me/addlist/vnAFuK9rY6FjNjM1
3 583
Repost from πα΄α΄
α΄Ι΄ πα΄ΚΙͺΙ΄α΄
α΄
Guy's are you ready for Programming Quiz competition with Course Rewards
3 583
π Kickstart Your Python Developer Career! π
π Learn Python with Top Courses at Unbeatable Prices! π
β¨ Courses Available:
- Adul Bari Python
- PYTHON FULL STACK: KV Rao 2024 π₯οΈ
- PYTHON DSA: DurgaSoft βοΈ
- KRISH NAIK Python Course π
- Ineuron Python Course π
π© Message: @Myhurthearts @imabhi3030 πβ¨
Your Python Developer journey starts here! ππ»
3 583
π Kickstart Your Python Developer Career! π
π Learn Python with Top Courses at Unbeatable Prices! π
β¨ Courses Available:
- Adul Bari Python
- PYTHON FULL STACK: KV Rao 2024 π₯οΈ
- PYTHON DSA: DurgaSoft βοΈ
- KRISH NAIK Python Course π
- Ineuron Python Course π
π₯ Donβt miss out! Get these *popular and in-demand courses* for just 100! π₯
(Original price: 10,000)
π Limited Time Offer! Join now to save big! π
π© Message: @Myhurthearts @imabhi3030 to enroll today! πβ¨
Your Python Developer journey starts here! ππ»
3 583
Important and best notes πβ€οΈ
Do not forget to React β€οΈ to this Message for More Content Like this
Share with your friends π https://t.me/addlist/vnAFuK9rY6FjNjM1
3 583
Flask app that interacts with the Waifu API to fetch and display tags and search for images based on parameters you provided. π
### Flask App Structure
1. Install Flask: Make sure you have Flask installed. You can do this via pip:
pip install Flask
2. Create your Flask app: Below is the complete code for the Flask app:
from flask import Flask, jsonify, render_template
import requests
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/tags')
def get_tags():
url = 'https://api.waifu.im/tags'
response = requests.get(url)
if response.status_code == 200:
data = response.json()
return jsonify(data)
else:
return jsonify({'error': 'Request failed with status code:', 'status': response.status_code}), response.status_code
@app.route('/search/<tag>')
def search_images(tag):
url = 'https://api.waifu.im/search'
params = {
'included_tags': [tag],
}
response = requests.get(url, params=params)
if response.status_code == 200:
data = response.json()
return jsonify(data)
else:
return jsonify({'error': 'Request failed with status code:', 'status': response.status_code}), response.status_code
if __name__ == '__main__':
app.run(debug=True)
3. Create Template File:
Create a folder named templates in the same directory as your Flask app and create a file named index.html.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Waifu App</title>
</head>
<body>
<h1>Welcome to the Waifu App! π</h1>
<h2>Available Tags and Image Search</h2>
<p>Use the following endpoints:</p>
<ul>
<li><a href="/tags">Get Tags</a></li>
<li>Search Images: <a href="/search/maid">Maid Images</a></li>
</ul>
</body>
</html>
How to Run the App
1. Save the Python script (e.g., app.py) and the HTML file.
2. Run the Flask app:
python app.py
3. Open your web browser and go to http://127.0.0.1:5000/ to see the app in action! π3 583
π **Kickstart Your Python Developer Career!** π
π **Learn Python with Top Courses at Unbeatable Prices!** π
β¨ **Courses Available:**
- **Adul Bari Python**
- **PYTHON FULL STACK: KV Rao 2024** π₯οΈ
- **PYTHON DSA: DurgaSoft** βοΈ
- **KRISH NAIK Python Course** π
- **Ineuron Python Course** π
π₯ **Donβt miss out!** Get these *popular and in-demand courses* for just **100**! π₯
(Original price: **10,000**)
π **Limited Time Offer! Join now to save big!** π
π© **Message:** @Myhurthearts @imabhi3030 to enroll today! πβ¨
Your Python Developer journey starts here! ππ»
3 583
// Q.1 Print all even number from 100..
for (let i = 0; i<=100; i++) {
// console.log(i);
if (i % 2 == 0) {
console.log(i);
}
}3 583
def getPrint(name="world", some):
print(f"Hello {name}")
getPrint("Chiku", 55)
3 583
π Quiz Ka Waqt Hai! π
π Sabhi @CODING_WARRIOR join karein π
Apna knowledge test karein aur maza lein! Course ka πβ¨
π Quiz Shuru Hoga: 9:00 PM β°
Category: C++ Quiz Competition π
π Top Ranks:
π₯ Rank 1: ALPHA C++
π₯ Rank 2: PW Skill C++
π₯ Rank 3: Supreme 3.0 C++
π Rank 4-20 : Any course 99% discount π
π₯ Ready, Set, Code! π₯
