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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #175 · 30 окт.

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны. Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2. Например, в PyQt4 и PySide есть метод QHeaderView.setResizeMode Для PyQt5 и PySide2 они были благополучно переименованы в QHeaderView.setSectionResizeMode Чтобы применить этот метод следует использовать такой код from Qt import QtCompath header = self.horizontalHeader() QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed) Унификация загрузки UI файлов: # PySide2 from PySide2.QtUiTools import QUiLoader loader = QUiLoader() widget = loader.load(ui_file) # PyQt5 from PyQt5 import uic widget = uic.loadUi(ui_file) # Qt.py from Qt import QtCompat widget = QtCompat.loadUi(ui_file) Хорошо что таких моментов не много и их легко запомнить. Полный список можно посмотреть в таблице. #qt#tricks

Hashtags

Резултати

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

Пребарај: #safetymeasures

当前筛选 #safetymeasures清除筛选
AI & Law

@ai_and_law · Post #97 · 29.08.2023 г., 07:04

Majority of Americans Call for Federal AI Regulation Hello, everyone! A recent poll conducted by the Artificial Intelligence Policy Institute has unveiled a strong desire among Americans for federal regulation of artificial intelligence. The poll surveyed 1,001 registered US voters, revealing that 62% expressed varying levels of concern about AI, with a remarkable 86% believing that AI could inadvertently lead to a catastrophic event. Interestingly, the majority of respondents (56%) support the idea of a federal agency overseeing AI regulation, while a striking 82% voiced their skepticism about leaving the task to tech executives. Additionally, 72% of participants expressed a preference for slowing down AI development, emphasizing caution over haste. The sentiments expressed in the poll echo the concerns raised by experts in the field, including figures like OpenAI CEO Sam Altman, Tesla CEO Elon Musk, AI pioneer Geoffrey Hinton, and even President Joe Biden, who have all highlighted the importance of addressing AI's potential risks and advocating for regulation. #AI#Regulation#AIrisks#PublicOpinion#Technology#OpenAI#RegulatoryFramework#SafetyMeasures