CoolFace
Datasetpublic

ysn-rfd/text-dataset-tiny-code-script-py-format

USED of tahamajs/medicine_ds_persian for .parquet file USED of Alijafarixcs2/persian-it-llama2-2k for .parquet file USED of Abirate/english_quotes for .jsonl file NEW FILES (05/12/2025) NEW FILES (12/26/2025) NEW FILES (02/15/2026)

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
3likes1.6kdownloads
keep_alive.py24 linesDownload Raw Back to render-main
1import requests2import threading3import time4 5def ping_service():6    """ارسال درخواست پینگ به سرویس برای نگه داشتن آن فعال."""7    url = "https://render-telegram-bot-2-bmin.onrender.com"8    while True:9        try:10            requests.get(url)11            print(f"Pinged {url} to keep service alive")12        except Exception as e:13            print(f"Error pinging service: {e}")14        15        # هر 14 دقیقه یک بار پینگ بزن (زیر 15 دقیقه برای جلوگیری از خاموشی)16        time.sleep(5 * 60)17 18# شروع ترد پینگ در پس‌زمینه19def start_keep_alive():20    """شروع سرویس نگه داشتن ربات فعال."""21    thread = threading.Thread(target=ping_service)22    thread.daemon = True23    thread.start()24