-
-
Save munapagal100-star/79ddf998b016542a3cc9251d4f3b174e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://avelino.xxx/go-vs-python-more-request-per-second/ | |
| import falcon | |
| class ThingsResource: | |
| def on_get(self, req, resp): | |
| resp.status = falcon.HTTP_200 | |
| resp.body = ("Hello World") | |
| app = falcon.API() | |
| things = ThingsResource() | |
| app.add_route('/', things) | |
| if __name__ == '__main__': | |
| from gevent.wsgi import WSGIServer | |
| http_server = WSGIServer(('', 8080), app, log=None) | |
| http_server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import telebot
TOKEN = 8805072563:AAGVcJCh0zpkm11uG4giC-xZuteaK2Adoog
bot = telebot.TeleBot8805072563:AAGVcJCh0zpkm11uG4giC-xZuteaK2Adoog
@bot.message_handler(commands=["start"])
def start(message):
bot.reply_to(
message,
"🎭 Mafia o‘yin botiga xush kelibsiz!\n\n"
"🎮 O‘yin boshlash uchun /game yozing\n"
"👥 O‘yinchilar: /players\n"
"ℹ️ Yordam: /help"
)
@bot.message_handler(commands=["help"])
def help_command(message):
bot.reply_to(
message,
"📖 Buyruqlar:\n\n"
"/game — o‘yinni boshlash\n"
"/players — o‘yinchilar\n"
"/stop — o‘yinni to‘xtatish"
)
@bot.message_handler(commands=["game"])
def game(message):
bot.reply_to(
message,
"🎭 Mafia o‘yini yaratildi!\n\n"
"👥 O‘yinchilar qo‘shilishini kutamiz...\n"
"Qo‘shilish uchun /join yozing."
)
@bot.message_handler(commands=["join"])
def join(message):
bot.reply_to(
message,
f"✅ {message.from_user.first_name} o‘yinga qo‘shildi!"
)
@bot.message_handler(commands=["players"])
def players(message):
bot.reply_to(message, "👥 Hozircha o‘yinchilar ro‘yxati bo‘sh.")
@bot.message_handler(commands=["stop"])
def stop(message):
bot.reply_to(message, "🛑 O‘yin to‘xtatildi.")
print("🤖 Mafia bot ishga tushdi!")
bot.infinity_polling()