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 Cell { | |
constructor(i, j) { | |
this.i = i; | |
this.j = j; | |
this.walls = { | |
top: true, | |
right: true, | |
bottom: true, | |
left: true, | |
} |
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
// Fira Code (Free) | |
// https://github.com/tonsky/FiraCode | |
// Operator Fonts (Paid) | |
// https://www.typography.com/fonts/operator/overview/ | |
// you can manually enable/disable my styles by colors | |
// | |
// add next lines to your atom stylesheet |
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 -*- | |
# Демонстрация альтернативных способов решения задач ЕГЭ (27) на языке Python 3 | |
# с сайта К. Полякова. Исправления и рекомендации приветствуются! | |
""" | |
------------------------------------------------- | |
Задача C4-70. | |
Решение на языке Python 3. | |
------------------------------------------------- |
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 Number: | |
def __init__(self, value, base): | |
'''Конструктор класса''' | |
# Проверка на тип | |
# Класс основан на работе со списком значений (цифр числа) | |
# На этом шаге ~любой тип преобразуется в список строк | |
if isinstance(value, type(1)): | |
self.value = list(str(value)) | |
elif isinstance(value, type([])): | |
self.value = value |
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 telebot | |
import datetime | |
import random | |
import time | |
token = '' | |
bot = telebot.TeleBot(token) | |
# Идентификаторы чатов, для которых разрешен доступ | |
ACCESS_CHAT_ID = {-1001093224903, 126491903} |
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
# Структура данных "Двоичная куча (Binary Heap)" | |
# https://habrahabr.ru/post/112222/ | |
class Heap: | |
def __init__(self, data=[]): | |
# Функция построение кучи O(N) | |
self.data = data | |
for i in range(len(self.data) // 2, -1, -1): | |
self.heapify(i) |
NewerOlder