TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #61 · 2 апр.

Ранее я уже упоминал о другой фишке из ˍˍfutureˍˍ , это оператор деления. from __future__ import division Суть проста. Раньше сложность типа данных результата поределялась типом самого сложного операнда. Например: int/int => int int/float => float В первом случае оба операнда int, значит и результат будет int. Во втором float более сложный тип, поэтому результат будет float. Если нам требуется получить дробное значение при делении двух int то приходилось форсированно один из операндов конверировать в float. 12/float(5) => float Но с новой "философией" это не требуется. В Python3 "floor division" заменили на "true division" а старый способ теперь работает через оператор "//". >>> 3/2 1.5 >>> 3//2 1 То есть теперь деление int на int даёт float если результат не целое число. В классах теперь доступны методы __floordiv__() и __truediv__() для определения поведения с этими операторами. Данный переход описан в PEP238. #pep#2to3#basic

Резултати

Пронајдени 1 слични објави

Пребарај: #finops

当前筛选 #finops清除筛选
GitHub Trends

@githubtrending · Post #14992 · 23.07.2025 г., 13:00

#go#aws#azure#cncf#cost#cost_optimization#finops#gcp#k8s#kubernetes#monitoring#opencost#prometheus OpenCost is a free, open-source tool that helps you see and understand the costs of running Kubernetes clusters and cloud services in real time. It breaks down costs by cluster, node, namespace, pod, and more, across multiple cloud providers like AWS, Azure, and GCP, and even supports on-premises setups. This lets you track where your money is going, spot expensive resources, and manage your cloud spending better. It integrates with Prometheus for metrics and offers a user-friendly web interface and APIs for easy cost monitoring and exporting. Using OpenCost helps you control and optimize your cloud and Kubernetes expenses efficiently[1][2][3][4]. https://github.com/opencost/opencost