Те, кто в Python не первый день, хорошо знают, что на число можно умножить не только число, но и другие типы. Главное, чтобы у этих типов была реализация такой операции.
# list
>>> [1] * 3
[1, 1, 1]
# tuple
>>> (2, 3) * 3
(2, 3, 2, 3, 2, 3)
# string
>>> "A" * 3
"AAA"
Так работает полиморфизм стандартных типов. Интересно здесь то, что это сработает и в том случае, когда порядок операндов обратный. То есть int умножить на [тип].
# list
>>> 3 * [1]
[1, 1, 1]
# tuple
>>> 3 * (2, 3)
(2, 3, 2, 3, 2, 3)
# string
>>> 3 * "A"
"AAA"
Если хотите реализовать такое поведение в ваших классах то следует помнить два момента:
1. Если множитель справа, то вам нужно реализовать метод __mul__, наш класс это первый операнд, то есть слева.
myType * 3
2. Если множитель слева, то вам нужно реализовать метод __rmul__, наш класс это второй операнд, справа.
3* myType
Всё тоже самое можно делать и для других математических операторов. И если в этом примере действие и результат будут фактически одинаковыми, то бывают ситуации, когда это не так.
Например, при умножении матриц имеет значение порядок операндов.
Для других операторов, таких как деление или сдвиг, очень важно кто с какой стороны находится.
>>> 2/4, 4/2
(0.5, 2.0)
>>> 2<<3, 3<<2
(16, 12)
>>> 100%15, 15%100
(10, 15)
#tricks#basic
#powerBI
📊
Power BI Pro Essential Training
Microsoft Power BI has been replaced with a far more powerful version—Power BI Pro—which combines Power BI Services, Desktop, and Mobile into a formidable business intelligence and analytics package.
🌐En
🔗Link
-----
Main channel:@repo_science
Coupons:@freecoupons_reposcience
-----
#powerBI
📊
Microsoft 365 Power BI - Intermediate
This course continues the journey that started with the beginner course. Since we all want up-to-date dashboards as quickly as possible, data refresh issues and data model issues are considered next, and optimized as much as possible. Column calculations follow to derive even more value from our data. Visuals are built, and then refined with filters and slicers. Finally, these are all implemented on a Power BI dashboard.
🌐En
🔗Link
-----
Main channel:@repo_science
Coupons:@freecoupons_reposcience
-----
#powerBI
📊
Power Pivoting Microsoft Power BI for Career Changers
In this course, get ready to kick off your business intelligence career with a variety of focused content built to equip you with the skills you will need to break into a rewarding and competitive BI industry. Yes, it’s yet another Intro to Power BI course—but this class will also focus on enhancing your burgeoning Power BI skills with a variety of other areas that are sure to elevate your dashboarding & reporting acumen beyond simple data charts and tables.
🌐En
⚖️19.82 GB
🔗Link
-----
Main channel:@repo_science
Coupons:@freecoupons_reposcience
-----
#powerBI
Learn Data Analysis and Visualization With Power BI
Converting raw data to insightful diagrams and charts to make informative decisions is a crucial analytical skill in data science. You will in this course how to create powerful charts and perform data analysis.
🔗Link
-----
Main channel:@repo_science
Coupons:@freecoupons_reposcience
-----
#powerBI
📊
Advanced Microsoft Power BI
Learn advanced uses of Microsoft Power BI. Learn how to perform calculations, effectively leverage the DAX language in data modeling, make advanced queries, and more.
✍Helen Wall
⏳3h 3m
🔗Link
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
😎 SVG Figma & Power BI .
▶️ Путь работы с графикой:
1. Создаем в Figma необходимый набор значков
2. Каждый из них группируем, чтобы выгружалось все содержимое
3. ПКМ на группе - копировать как - SVG
4. Вставляем в блокнот и заменяем двойные кавычки на одинарные
5. Вставляем в меру в Power BI как текст, добавляем в начале блока определение изображения:
data:image/svg+xml;utf8,
6. Прописываем условия отработки меры. Кстати, можно даже менять закраску одного и того же контейнера SVG по условию в DAX
7. Выставляем категорию меры = URL адрес изображения
8. Радуемся ❤️
〰️〰️〰️〰️〰️〰️〰️〰️〰️
📌https://www.youtube.com/watch?v=1DctdOpCoIM
📎PBIX в комментариях
#powerbi
♥️♥️♥️ Таймлапс создания отчета Power BI с использованием Figma.
Кстати, там есть кусочек как из фигма в меру сцапать svg (в таблице внизу в ячейку). Если любопытненько как это делать быстро и без страданий, прошу у вас лайков на ютуб.
Приятного просмотра 😘
https://youtu.be/xcGqQRbY-uw
#powerbi
Power BI Desktop v2.126.927 (x64/x86)
#dastur / #powerbi
ℹ️Microsoft Power BI Desktop - tahlilchilar uchun mo'ljallangan ajoyib interaktiv vizualizatsiyani sanoatda yetakchi o‘rnatilgan so‘rovlar va ma’lumotlarni modellashtirish imkoniyatlari bilan birlashtiradi.
✅ Power BI Desktop istalgan vaqtda boshqa foydalanuvchilarga muhim qoʻshimcha maʼlumotlarni oʻz vaqtida taqdim etish imkonini beradi.
🎯OT: Windows 11, 10, 8.1, 8
💾: x86 - 433.4 MB (.exe); x64 - 487.5 MB (.exe)
💻 Kompyuterni birga o'rganamiz ⤵️
Telegram I YouTube I Insta I TikTok
#powerBI#book
📊
Collect, Combine, and Transform Data Using Power Query in Excel and Power BI
Using Power Query, you can import, reshape, and cleanse any data from a simple interface, so you can mine that data for all of its hidden insights. Power Query is embedded in Excel, Power BI, and other Microsoft products, and leading Power Query expert Gil Raviv will help you make the most of it. Discover how to eliminate time-consuming manual data preparation, solve common problems, avoid pitfalls, and more.
🌐En
🔗Link
-----
Main channel:@repo_science
Coupons:@freecoupons_reposcience
-----