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

TGINSIGHT SIMILAR POSTS

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

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

Метод строки split() разделяет строку на несколько строк по указанному символу >>> "a_b_c".split('_') ['a', 'b', 'c'] Можно указать максимальное количество разделений >>> "a_b_c".split('_', 1) ['a', 'b_c'] Или резать с другой стороны с помощью rsplit() (right split) >>> "a_b_c".rsplit('_', 1) ['a_b', 'c'] А что будет если оставить аргументы пустыми? >>> "a_b_c".split() ['a_b_c'] Получаем список с одним элементом, потому что по умолчанию используется пробельный символ. >>> "a b c".split() ['a', 'b', 'c'] То есть это равнозначно такому вызову? >>> "a b c".split(" ") ['a', 'b', 'c'] Кажется да, но нет! Давайте попробуем добавить пробелов между буквами >>> "a b c".split(" ") ['a', '', '', 'b', '', '', 'c'] И вот картина уже не так предсказуема 😕 А вот что будет по умолчанию >>> "a b c".split() ['a', 'b', 'c'] Всё снова красиво! 🤩 По умолчанию в качестве разделителя используется любой пробельный символ, будь то табуляция или новая строка. Включая несколько таких символов идущих подряд. А также игнорируются пробельные символы по краям строки. >>> "a\t b\n c ".split() ['a', 'b', 'c'] Аналогичный способ можно собрать с помощью регулярного выражения. Но пробелы по краям строки придется обрабатывать дополнительно. >>> import re >>> re.split(r"\s+", ' a b c '.strip()) ['a', 'b', 'c'] Здесь тоже можно указать количество разделений >>> re.split(r"\s+", 'a b c', 1) ['a', 'b c'] А что если мы хотим написать красиво, то есть split() без аргументов, но при этом указать количество разделений? В этом случае первым аргументом передаём None >>> "a\n b c".split(None, 1) ['a', 'b c'] Данный метод не учитывает строки с пробелами, взятые в кавычки 'a "b c" '.split() ['a', '"b', 'c"'] Но для таких случаев есть другие способы. #tricks#basic

Резултати

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

Пребарај: #techupdates

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

@ai_and_law · Post #99 · 30.08.2023 г., 07:04

Zoom Addresses EU Privacy Concerns and Updates Terms of Service Greetings! In response to discussions about potential EU privacy law implications, Zoom issues a statement and revises its Terms of Service. The focus? Ensuring customer data isn't utilized to train AI models. Zoom's statement and Terms affirm that user-generated content, including audio, video, chat, and more, isn't employed for training Zoom's or any third-party AI models. This step aims to dispel any concerns. Zoom initially shared its statement on August 7 and later updated it on August 11, aligned with the revised Terms. The shared stance now unequivocally states, "Zoom does not use any of your customer content to train AI models." Earlier, a Stack Diary article flagged changes to Zoom's March Terms, raising potential concerns about broad data utilization for AI model training. Zoom's quick response aims to address these concerns and reaffirm privacy commitments. #Zoom#PrivacyMatters#TermsOfService#AIModels#DataProtection#PrivacyLaw#TechUpdates

Crypto M - Crypto News

@CryptoM · Post #64553 · 09.04.2026 г., 07:40

🚀 AI TRENDS | Meta Updates Instagram AI Experience for Teens Meta Platforms has announced an update to the AI experience on Instagram, specifically targeting teenage users. According to Jin10, the update draws inspiration from movie ratings designed for audiences aged 13 and above. This means the AI is programmed to avoid providing responses that are inappropriate for the age group. #AI#Meta#Instagram#TeenUsers#AIEthics#TeenSafety#SocialMedia#TechUpdates

Venture Village Wall 🦄

@venturevillagewall · Post #4192 · 19.02.2025 г., 16:00

Hong Kong Targets Global Virtual Asset Hub Hong Kong unveils new roadmap to become a global virtual asset center, focusing on staking services, attracting liquidity, and exploring derivatives trading. Further endeavors include OTC and custody licensing. For details, visit Wu Blockchain News. #HongKong#VirtualAssets#Crypto#DeFi#Liquidity#Licensing#Staking#Derivatives#OTC#Custody#Regulation#Finance#Investment#Blockchain#Web3#MarketTrends#TechUpdates#Innovation#GlobalMarkets#FutureOfFinance

Venture Village Wall 🦄

@venturevillagewall · Post #3606 · 20.12.2024 г., 18:41

O3 and O3-Mini Benchmark Breakthroughs The O3 and O3-Mini models showcase state-of-the-art (SOTA) performance with significant leaps in various benchmarks. Results on Frontier Math have jumped from 2% to 25%. The SWE-Bench model achieved a score of 71.7%, while a startup has raised $200 million following results of 13.86%. ELO on Codeforces reached 2727, surpassing most peers globally. Notably, the ARC-AGI model scored 87.5%, breaking a five-year benchmark. Access for security researchers to O3-Mini starts today, with general access available in late January. #O3#O3Mini#SOTA#Benchmarks#AI#ML#Funding#Codeforces#ARC-AGI #FrontierMath#SWE-Bench #ELO#GPQA#AIME#SecurityResearch#TechUpdates#Innovations#Startups#Performance#AIModels