@AiGenLabsStyles · Post #1698 · 13.10.2025 г., 09:14
🔝🔝 --sref 2089811485 --s 150 --v 7 #Cinematic#Surreal#Vibrant#Detailed#Magenta#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 🔥AiGenLabs - main channel
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
Пребарај: #magenta
@AiGenLabsStyles · Post #1698 · 13.10.2025 г., 09:14
🔝🔝 --sref 2089811485 --s 150 --v 7 #Cinematic#Surreal#Vibrant#Detailed#Magenta#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 🔥AiGenLabs - main channel
@djangoproject · Post #252 · 02.02.2017 г., 18:13
https://magenta.tensorflow.org/welcome-to-magenta We’re happy to announce #Magenta, a project from the Google Brain team that asks: Can we use #machine_learning to create compelling art and music? If so, how? If not, why not? We’ll use #TensorFlow, and we’ll release our models and tools in open source on our GitHub. We’ll also post demos, tutorial blog postings and technical papers. Soon we’ll begin accepting code contributions from the community at large. If you’d like to keep up on Magenta as it grows, you can follow us on our GitHub and join our discussion group.
@AiGenLabsStyles · Post #1153 · 13.03.2025 г., 11:16
⭐️ --sref 2376998380 #Photography#Vintage#Muted#Orange#Magenta#Cinematic#Detailed#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #1734 · 30.10.2025 г., 07:12
🔝🔝 --sref 708454023 --v 7 #Cinematic#Surreal#Vibrant#Magenta#White#Minimalist#Detailed#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #1414 · 25.07.2025 г., 09:45
🔝🔝 --sref 2851911678 --v 7 #Illustration#2d#Vibrant#Minimalist#Magenta#Vector#Cute#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #1467 · 09.08.2025 г., 07:12
🔝🔝 --sref 481102813 --v 7 #Illustration#2d#Vibrant#Detailed#Dark#Magenta#Neon#Cartoon#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 🔥AiGenLabs - main channel
@DMJ_Themes · Post #141 · 04.10.2019 г., 05:39
Jimi Hendrix Psy Theme. https://t.me/addtheme/JimiHendrixPsy #violet#magenta#blue#aquamarine#psychedelic (Original theme here)
@DMJ_Themes · Post #56 · 07.05.2017 г., 21:05
#violet#magenta#blue#aquamarine#psychedelic @DMJ_Themes
@DMJ_Themes · Post #55 · 07.05.2017 г., 21:00
Jimi Hendrix desktop theme. A psychedelic telegram desktop theme. @DMJ_Themes #violet#magenta#blue#aquamarine#psychedelic t.me/DMJ_Themes
@AiGenLabsStyles · Post #1493 · 16.08.2025 г., 08:13
🔝🔝 --sref 3706150594 --v 7 #Illustration#2d#Vibrant#Minimalist#Magenta#Pink#Vector#Cute#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #1390 · 19.07.2025 г., 08:13
🔝🔝 --sref 3323562529 --v 7 #Illustration#2d#Vibrant#Minimalist#Magenta#Vector#Art#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 🔥AiGenLabs - main channel
@ThemesM8 · Post #210 · 06.09.2021 г., 13:28
https://t.me/addtheme/wyYnTX8llrx61I5B 🌈@ThemesM8✨ #dark#cat#kitten#android#purple#blue#black#amoled#pink#cute#cyan#magenta#violet#night#colors#colorful#desktop