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 re | |
from collections import Counter | |
def check_diamond_number(num: str) -> bool: | |
"""Бриллиант""" | |
return bool(re.search(r"(\d)\1{4}", num)) | |
def check_platinum_number(num: str) -> bool: |
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
#!/bin/bash | |
RED='\033[0;31m' | |
ORANGE='\033[0;33m' | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
PURPLE='\033[0;35m' | |
CYAN='\033[0;36m' | |
NC='\033[0m' |
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
#!/bin/bash | |
if [ "${EUID}" -ne 0 ]; then | |
echo "You need to run this script as root" | |
exit 1 | |
fi | |
# Добавляем официальные репозитории для ubuntu 20.04 LTS | |
echo "deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse | |
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import smtplib | |
from email.mime.text import MIMEText | |
from email.header import Header | |
import sys | |
def send_text(subject: str, text: str, to_addresses: list): | |
host = 'mail. .ru' | |
server_login = ' @ .ru' |