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
| <?php | |
| namespace Drupal\telegram_holiday\Plugin\TelegramBots; | |
| use Drupal\telegram_bots_api\TelegramBotBase; | |
| /** | |
| * @TelegramBot( | |
| * id = "BraslavskieHolidayBot", | |
| * bot = "braslavskie_holiday_bot", |
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
| <?php | |
| namespace Drupal\telegram_holiday\Plugin\TelegramBots; | |
| use Drupal\telegram_bots_api\TelegramBotBase; | |
| use Telegram\Bot\Commands\Command; | |
| use Telegram\Bot\Objects\Update; | |
| use Drupal\holiday\InquiryInterface; | |
| use Drupal\telegram_holiday\Commands\QuestionCommand; | |
| use Drupal\telegram_holiday\Entity\TelegramDialog; |
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
| langcode: en | |
| status: true | |
| dependencies: | |
| config: | |
| - field.field.node.hoover.body | |
| - node.type.hoover | |
| module: | |
| - path | |
| - text | |
| id: node.hoover.default |
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
| <?php | |
| /** | |
| * @file | |
| * An example field using the Field Types API. | |
| */ | |
| /** | |
| * @defgroup field_example Example: Field Types API | |
| * @ingroup examples | |
| * @{ |
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
| stroka = input() # Мы читаем ВСЮ строку в переменную | |
| #stroka = 'bye bye.' | |
| mywords = stroka[0:-1].split() # разделяем split() строку без последнего символа '.' | |
| min = len(mywords[0]) + len(mywords[1]) | |
| res = mywords[0] + ' ' + mywords[1] | |
| for i in range(1, len(mywords)-1): | |
| cur = len(mywords[i]) + len(mywords[i+1]) | |
| if(cur < min): | |
| res = mywords[i] + ' ' + mywords[i+1] | |
| min = cur |
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
| w = int(input()) | |
| a = [int( input()) for x in range(w)] | |
| y = [] | |
| w = [] | |
| def delit(n): | |
| for i in range(1,n+1): | |
| if n % i == 0: | |
| w.append(i) | |
| return w | |
| print(dilit(min(a)) |
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
| i = int(input()) | |
| a = [int( input()) for x in range(i)] | |
| listDel = [] | |
| def delit(n): | |
| w = [] | |
| for i in range(1,n // 2 + 1): | |
| if n % i == 0: | |
| w.append(i) |
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 time | |
| class Profiler(object): | |
| def __enter__(self): | |
| self._startTime = time.time() | |
| def __exit__(self, type, value, traceback): | |
| print("Elapsed time: {:.3f} sec".format(time.time() - self._startTime)) |
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
| k = int(input()) | |
| a = [int( input()) for x in range(k)] | |
| outputDel = [] | |
| firstDel = [] | |
| # поиск делителей числа | |
| def delit(n): | |
| w = [] | |
| for i in range(1,n // 2 + 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
| cyberlex@cs53836 ~/www/holiday.braslavskie.by $ drupal | |
| Drupal Console (1.0.0-rc16) | |
| =========================== | |
| Copy configuration files. | |
| drupal init | |
| Install a Drupal project |