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

TGINSIGHT SIMILAR POSTS

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

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

Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять: from timeit import timeit def t1(): # складываем 10 строк через + из переменной t = 'text' for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t2(): # склеиваем список строк через метод join arr = ['text'] * 10 for _ in range(1000): s = ''.join(arr) def t3(): # складываем через + но не из переменной а непосредственно инлайн объекты for _ in range(1000): s = 'text' + 'text' + 'text' + ... # всего 10 раз Теперь каждую строку склейки запустим по 10М раз >>> timeit(t1, number=10000) 0.21951690399964718 >>> timeit(t2, number=10000) 1.4978306379998685 >>> timeit(t3, number=10000) 0.2213820789993406 Хм, а нам говорили что через "+" это плохо и медленно ))) 😁 Тут стоит учитывать, что речь идёт о склейке множества длинных строк. Давайте изменим условия: def t4(): t = 'text'*100 for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t5(): arr = ['text'*100] * 10 for _ in range(1000): s = ''.join(arr) def t6(): for _ in range(1000): s = 'text'*100 + 'text'*100 + ... # всего 10 раз >>> timeit(t4, number=10000) 12.795130728000004 >>> timeit(t5, number=10000) 2.642637542999182 >>> timeit(t6, number=10000) 0.2184546610005782 Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее! Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё. В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический. В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно. Полный листинг 🌍 #tricks

Резултати

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

Пребарај: #smallbusiness

当前筛选 #smallbusiness清除筛选
Trump's Ear

@trumpsear_tg · Post #1698 · 28.10.2025 г., 18:03

💼Former U.S. Trade Representative Roy Kirk, who served in the Obama administration, has criticized President Donald Trump’s trade negotiations, warning that his aggressive style is creating confusion and hardship for American exporters. 🇺🇸 According to Kirk, Trump's pattern of threatening tariffs and then retreating after market backlash is doing more harm than good. 📉 🗣️“The president will be spooked by something, get a little bit upset, threaten more tariffs,” he said, adding that in the case of a negative reaction in the markets, he will then announce that “we’re on the precipice of a deal.” Kirk said this during his appearance on CNBC’s Squawk Box on Monday. 📺 See Also 👉Ronald Reagan ‘Didn’t Love Tariffs,’ Says Economist Paul Krugman: He Repeatedly Emphasized ‘The Virtues of Free Trade’ Kirk said that the unpredictable nature of U.S. trade policy under Trump is causing a lot of frustration among American companies that are trying to plan for the future. 🏭 ⚠️ The consequences of Trump’s “macho” trade tactics are being felt by ordinary exporters. 💬“They're having to pay the price for this macho,” he said, citing examples of soy farmers, cattle farmers, and other small businesses. 🌾🐄 #Trump#Tariffs#SmallBusiness 👂More on Trump's Ear ⚠️

🎓 MBA “Kichik biznes va tadbirkorlik” magistratura dasturi Dastur turi: Magistratura (MBA — Master of Business Administration) Yo‘nalish: Kichik biznes va tadbirkorlik (Small Business and Entrepreneurship) Ta’lim tili: O‘zbek va rus tili. Diplom: Davlat tomonidan tasdiqlangan magistr diplomi Dastur innovatsion va amaliy yondashuvga asoslangan bo‘lib, nazariy bilimlar bilan birga real biznes keyslar, tajribali tadbirkorlar bilan uchrashuvlar, mentorlik va loyiha asosidagi o‘qitishni o‘z ichiga oladi. Tinglovchilar o‘z biznes g‘oyalarini amaliyotga tatbiq etish imkoniyatiga ega bo‘ladilar. ❔ Bu kimlar uchun? ✔️ Innovatsion va barqaror biznes g‘oyalarni amaliyotga joriy qilmoqchi bo‘lgan tashabbuskorlar ✔️ Hududiy tadbirkorlikni rivojlantirishga hissa qo‘shmoqchi bo‘lgan yoshlar va mutaxassislar ✔️ Mavjud tadbirkorlik faoliyatini kengaytirishni istaganlar ✔️ Tadbirkorlik subyektlari bilan muntazam ish yurituvchi Davlat va nodavlat tashkilotlar mutaxassislari uchun ❔ Dasturda nimalar o‘rganiladi? ✔️ Moliyaviy savodxonlik va boshqaruv ✔️ Raqobat tahlili va strategik qarorlar qabul qilish ✔️ Innovatsion fikrlash va mahsulot yaratish ✔️ Biznes moliyasi va investitsiyalarni jalb qilish ✔️ Soliq va huquqiy asoslar ✔️ Startaplarni rivojlantirish va inkubatsiya ⭐ Shuningdek, real biznes keyslar, mahalliy va xorijiy ekspertlar ishtirokidagi mahorat darslari orqali bilimlar mustahkamlanadi. ❔Kelajakda qanday foyda beradi? ✔️ Biznesda risklarni boshqarish (Risk management) ✔️ Hududiy va milliy miqyosdagi iqtisodiy rivojlanishda faol ishtirok etish imkonini beradi ✔️ Investitsiya jalb qilish, hamkorlar bilan ishlash tajribasini beradi ✔️ Bozor talabiga mos mahsulot va xizmatlar yaratish ko‘nikmasini shakllantiradi Mazkur dasturning asosiy maqsadi - O‘zbekistonning har bir hududida o‘z biznesini yurita oladigan, iqtisodiyotni quyi bo‘g‘inlardan boshlab harakatlantira oladigan bilimli, mas’uliyatli va yangicha fikrlaydigan tadbirkorlar avlodini tayyorlashdir. 🇷🇺 Поднобнее #GSBE#SmallBusiness#Entrepreneurship#MBA#Master 🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube

Venture Village Wall 🦄

@venturevillagewall · Post #3604 · 20.12.2024 г., 17:23

Navigating AI Opportunities & Threats Explore how AI presents both challenges and opportunities for small businesses. While larger firms dominate the market, many entrepreneurs can thrive with modest revenue targets. AI could lead to the decline of SaaS businesses due to cost-effective alternatives. However, it allows individuals to quickly replicate and improve existing applications, catering to proven market needs. Though scaling to $500M ARR is tough in niches, a small investment can create meaningful products. Innovators can introduce multiple unique offerings, even in shadow of larger tech giants. #AI#SaaS#Business#Investment#Tech#Entrepreneurship#Revenue#ProductDevelopment#Innovation#Market#Growth#Web3#Startups#Opportunity#Threats#SmallBusiness#Investors#ExistingMarket#Applications#PMF#CostEfficiency

Venture Village Wall 🦄

@venturevillagewall · Post #3588 · 20.12.2024 г., 10:29

AI Marketer Launches for $29 Introducing Nikolai's service, MarketOwl, which provides virtual marketing teams for small businesses. The AI-driven platform automates content creation and identifies potential customers. Currently, it supports around 100 users monthly, generating about $3k in revenue. The concept originated from Nikolai's observations of small companies lacking marketing resources, expertise, and time. After initial failures with a marketing strategy MVP, he pivoted to develop the AI marketer. Engagements in a dedicated subreddit led to high conversion rates for subscriptions. Successful products arise from addressing real audience problems. To effectively enter the market, consider using the Plan-Kapkan consisting of 35 steps for launching. #MarketOwl#AI#Marketing#ContentCreation#SmallBusiness#SaaS#VirtualTeam#Startup#Entrepreneurship#MVP#ProblemSolving#Automation#CustomerAcquisition#AudienceEngagement#Subscription#Revenue#Strategy#PlanKapkan#BusinessGrowth#MarketingTools