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
class Date: | |
def __init__(self, d1, d2): | |
self.d1 = d1 | |
self.d2 = d2 | |
self.c = {1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, | |
7: 31, 8: 30, 9: 31, 10: 30, 11: 31, 12: 30} | |
def __sub__(self, other): | |
if (self.d1, self.d2) == (other.d1, other.d2): |
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
d = 'стоп' | |
e = 'Для завершения работы напишите "стоп" в любом поле.' | |
f = 'На ноль делить нельзя. Попробуйте снова!' | |
j = 'Введены неверные значения. Попробуйте снова!' | |
while True: | |
a = input('Введите 1-ое число: ') | |
if a == d: | |
break | |
b = input('Укажите команду (+, -, *, /, **, //, %): ') |
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
We observe today not a victory | |
of party but a celebration | |
of freedom symbolizing an end | |
as well as a beginning | |
signifying renewal as well | |
as change |
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
a,b = int(input()),int(input()) | |
print(a + b) |
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
def defKey(i): | |
return i[1] | |
def dist(a, b): | |
r = [] | |
i, j, start = 0, 0, 0 | |
end = b[j][1] | |
while i != len(a): | |
if a[i][1] not in range(start, (end + 1)): | |
start = b[j][1] |
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
from flask import Flask, request, jsonify | |
import requests | |
import json | |
import flask_cors | |
app = Flask(__name__) | |
flask_cors.CORS(app, resources={r"/*": {"origins": "*"}}) | |
bot_url = "https://api.telegram.org/botтутмойтокен/" | |
admin_log_chat_id = "-тутchatid" |
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
import tkinter as tk | |
import random | |
from tkinter import simpledialog | |
def manual(): | |
dg=tk.Toplevel(hw) | |
dg.title('Manual') | |
dg.resizable(0,0) | |
dgC=tk.Canvas(dg, width=900, height=600) | |
dgC.pack() |
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
from sys import exit | |
def remove_number(lst): | |
if k in lst: | |
z = lst.index(k) | |
for i in range(len(lst) - z - 1): | |
lst[z], lst[z + 1] = lst[z + 1], lst[z] |
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
def remove_number(lst): | |
if k in lst: | |
z = lst.index(k) | |
for i in range(len(lst) - z - 1): | |
lst[z], lst[z+1] = lst[z+1], lst[z] | |
z += 1 | |
lst[-1] = 0 |
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
# - *- coding: utf- 8 - *- | |
import logging | |
import sqlite3 | |
import time | |
from data.config import bot_description | |
def logger(statement): | |
logging.basicConfig( |