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 слични објави

Пребарај: #facewatch

当前筛选 #facewatch清除筛选
MessageInABottle

@mib_messageinabottle · Post #6953 · 26.05.2024 г., 12:59

🇬🇧#UK #PreCrime "I WAS MISIDENTIFIED AS SHOPLIFTER BY FACIAL RECOGNITION TECH" Sara needed some chocolate - she had had one of those days - so wandered into a #HomeBargains store. "Within less than a minute, I'm approached by a store worker who comes up to me and says, 'You're a thief, you need to leave the store'." Sara - who wants to remain anonymous - was wrongly accused after being flagged by a facial-recognition system called #Facewatch. She says after her bag was searched she was led out of the shop, and told she was banned from all stores using the technology. Facewatch later wrote to Sara and acknowledged it had made an error. The #MetropolitanPolice in #London say that around one in every 33,000 people who walk by its cameras is misidentified. But the error count is much higher once someone is actually flagged. One in 40 alerts so far this year has been a false positive #AI #FacialRecognition