Python/ django
59K subscribers
2.08K photos
62 videos
47 files
2.8K links
по всем вопросам @haarrp

@itchannels_telegram - 🔥 все ит-каналы

@ai_machinelearning_big_data -ML

@ArtificialIntelligencedl -AI

@datascienceiot - 📚

@pythonlbooks

РКН: clck.ru/3FmxmM
加入频道
🖥 Elevating Code Flexibility with the Decorator Design Pattern in Python

from abc import ABC, abstractmethod

class TextPrinter(ABC):
@abstractmethod
def print_text(self):
pass

class PlainTextPrinter(TextPrinter):
def __init__(self, text):
self.text = text

def print_text(self):
print(self.text)

class TextDecorator(TextPrinter):
def __init__(self, text_printer):
self.text_printer = text_printer

def print_text(self):
self.text_printer.print_text()

class BoldTextDecorator(TextDecorator):
def print_text(self):
print(f"<b>{self.text_printer.print_text()}</b>")

class ItalicTextDecorator(TextDecorator):
def print_text(self):
print(f"<i>{self.text_printer.print_text()}</i>")

# Client code
if __name__ == "__main__":
plain_printer = PlainTextPrinter("Hello, world!")
bold_printer = BoldTextDecorator(plain_printer)
italic_bold_printer = ItalicTextDecorator(bold_printer)

plain_printer.print_text()
bold_printer.print_text()
italic_bold_printer.print_text()


@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
🖥 Get domain name information using Python

Получение информации о домене. с помощью Python.

$pip install whois

$pip install whois

>>> import whois
>>> domain = whois.query('google.com')

>>> print(domain.__dict__)
{
'expiration_date': datetime.datetime(2020, 9, 14, 0, 0),
'last_updated': datetime.datetime(2011, 7, 20, 0, 0),
'registrar': 'MARKMONITOR INC.',
'name': 'google.com',
'creation_date': datetime.datetime(1997, 9, 15, 0, 0)
}

>>> print(domain.name)
google.com

>>> print(domain.expiration_date)
2024-09-14 00:00:00

Github

@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
⚽️ Building a Fantasy Premier League Selection Dashboard

Создаем дашборд для фэнтези-премьер-лиги.

— pip install streamlit requests matplotlib pandas

🖥 Code

@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥11 Best Python Testing Frameworks To Look For In 2023

11 лучших фреймворков для тестирования на Python, на которые стоит обратить внимание в 2023 году.

1. Pytest

2. Locust

3. Robot

4. Behave

5. Lettuce

6. Nose2

7. TestProject

8. PyUnit or Unittest

9. Splinter

10. Testify

11. Doctest

@pythonl
This media is not supported in your browser
VIEW IN TELEGRAM
🤖 PythonRobotics: Python codes for robotics algorithm.

Python-код для алгоритма робототехники.

git clone https://github.com/AtsushiSakai/PythonRobotics.git

Github

@pythonl
🕵 VTScanner

VTScanner is a versatile Python tool that empowers users to perform comprehensive file scans within a selected directory for malware detection and analysis.

Универсальный Python-инструмент, позволяющий выполнять комплексное сканирование файлов в выбранной директории для обнаружения и анализа вредоносных программ.

git clone https://github.com/samhaxr/VTScanner.git

Github

@pythonl
This media is not supported in your browser
VIEW IN TELEGRAM
🖥 Every Breath You Take – Heart Rate Variability Training with the Polar H10 Monitor

Through controlled breathing it is possible to regulate your body's stress reponse.

Интересный проект на Python. С помощью контроля дыхания можно регулировать реакцию организма на стресс. Данное приложение позволяет измерять и тренировать этот эффект с помощью монитора сердечного ритма Polar H10.


Github

@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
🖥 Make Amazing Wordcloud in Python

Создание облака слов на Python.

Docs

@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
🤗🖥 Text To Image With Hugging Face

Переводим текст в изображение с Hugging Face.

📌 Model

@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
🌐 InstaGraph

Converts text input or URL into knowledge graph and displays.

Python фреймворк для преобразования текста или ссылок в граф знаний .

git clone https://github.com/yoheinakajima/instagraph.git

Github

@pythol