Skip to content

Instantly share code, notes, and snippets.

import telebot
import logging
with open ("key.txt", "r") as key:
token = key.read().strip()
API_TOKEN = token
bot= telebot.TeleBot(API_TOKEN)
import telebot
import logging
from telebot import types
with open ("key.txt", "r") as key:
token = key.read().strip()
API_TOKEN = token
bot= telebot.TeleBot(API_TOKEN)
import telebot
import logging
from telebot import types
with open ("key.txt", "r") as key:
token = key.read().strip()
API_TOKEN = token
bot= telebot.TeleBot(API_TOKEN)
@mhnabi
mhnabi / v1.1
Created December 15, 2016 08:15
import telebot
import logging
from telebot import types
with open ("key.txt", "r") as key:
token = key.read().strip()
API_TOKEN = token
bot= telebot.TeleBot(API_TOKEN)
@mhnabi
mhnabi / V1.2
Created December 15, 2016 17:15
import telebot
import logging
from telebot import types
from flask import Flask, request
bot= telebot.TeleBot("313815443:AAE75E033KLgqwAZ_wJxwUFNO8mK6JXNO-8")
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
reply = message.from_user.id if not None else ''
<html>
<header>
<title>
تمرین اول
</title>
<h1 align = "center">محمد حسین نبی</h1>
</header>
<body>
<p align = "center">
<html>
<header>
<title>
تمرین اول
</title>
<h1 align = "center">محمد حسین نبی</h1>
<hr width="500px" size="5px" color="000000">
<h3 align="center">آقا یاد گرفتم تو سئو تگ اچ 1 خیلی مهمه و باید کلمات کلیدی رو اونجا نوشت</h3>
</header>
<body>
import sys
class Menu:
def __init__(self):
self.developers = []
self.choices = {
"1": self.add_developer,
"2": self.add_skill,
file_obj = open("t1.text",'a')
def suffix(letter):
for i in range(len(letter)):
print(letter)
file_obj.write("Suffix: " + letter + '\n')
letter = letter[1:]
print('epsilone')
file_obj.write("epsilone")
def prefix(letter):
n = int(input()) # length of list
l = input().split(" ") # Number list
for i in range(n-1):
y = []
if len(l) == 1:
break
for j in range(len(l) - 1):
y.append(int(l[j+1]) - int(l[j])) # subtraction of elements
l = y
print(l[0] % ((10**9)+7)) # remain