@repo_science · Post #3711 · 13/11/2023, 13:28
#python#book 📚 Pythonic AI (2023) ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
TGINSIGHT SIMILAR POSTS
Canal fuente @python_academy · Post #1565 · 31 dic
Придаем человеческий вид данным с помощью пакета humanize Открыл для себя потрясающийинструмент — пакет humanize, который превращает числа и даты в понятный для человека текст. Вместо того чтобы изобретать велосипеды для таких задач, этот пакет позволяет справиться с ними буквальноводнойстроке. Например, сложный объект timedelta может быть преобразован в "2 дня, 1 час и 33.12 секунд". Однако, что еще более впечатляет, — помимо английского, этот пакет поддерживаетмножество других языков, включая русский. Настоятельно рекомендую ознакомиться с их документацией, где представлено множество интересных функций. Пример использования в Python: import humanize from datetime import timedelta time_difference = timedelta(days=2, hours=1, seconds=33.12) humanized_time = humanize.naturaldelta(time_difference) print(humanized_time) # Output: 2 days, 1 hour and 33.12 seconds number_to_humanize = 500 humanized_number = humanize.intword(number_to_humanize) print(humanized_number) # Output: 5.00 x 10² В данном примере мы используем функции naturaldelta и intword из пакета humanize для получениячитаемых представлений временного интервала и числа соответственно. #python#humanize
Búsqueda global general
@repo_science · Post #3711 · 13/11/2023, 13:28
#python#book 📚 Pythonic AI (2023) ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3696 · 07/11/2023, 16:04
#python#book 📚 Python Coding&Programmind. The Complete Manua Seriesl ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3684 · 01/11/2023, 17:56
#python#book 📓 Effective Python Second Edition ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3672 · 24/10/2023, 22:57
#python#book 📚 MicroPython (2023) ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3649 · 15/10/2023, 13:01
#Python#Book 🐍 Mastering Python Networking ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3617 · 28/09/2023, 07:16
#python#book 📚 Codebreaking (2023 - new edit) ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3614 · 24/09/2023, 02:02
#python#book 📓 Foundational Python for Data Science 🔗Link ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3589 · 15/09/2023, 01:30
#Python#book 📓 Python Testing with pytest 🔗Link ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3583 · 13/09/2023, 02:49
#python#book 📚 Handbook of Computer Programming with Python (2022) 🔗Link ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3582 · 13/09/2023, 02:47
#python#book 📚 Python: 3 books in 1 (2023) 🔗Link ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3569 · 07/09/2023, 12:20
#python#book 📓 The Python Book 🔗 book ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@repo_science · Post #3568 · 07/09/2023, 12:00
#python#book 📚 Python Mastery (2023) 🔗Link ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----