@botsgram_cu · Post #3076 · 17.10.2020 г., 15:31
¿Que puede hacer este bot? @RenameArchive_bot Con este bot podrás renombrar archivos de Telegram Idioma: inglés (Visto en @botsgram_cu) #renombrar#archivos
Hashtags
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
Пребарај: #archivos
@botsgram_cu · Post #3076 · 17.10.2020 г., 15:31
¿Que puede hacer este bot? @RenameArchive_bot Con este bot podrás renombrar archivos de Telegram Idioma: inglés (Visto en @botsgram_cu) #renombrar#archivos
Hashtags
@botsgram_cu · Post #4272 · 21.08.2021 г., 17:26
¿Que puede hacer este bot? @uploadgrammebot Este es el bot oficial de uploadgram.me ¡Envíale un archivo y te dará su enlace directo de descarga! Idioma: inglés (Visto en @botsgram_cu) #enlaces#descarga#archivos
@botsgram_cu · Post #2998 · 06.09.2020 г., 20:06
¿Que puede hacer este bot? @filestolinkebot Este bot puede convertir archivos a enlaces Idiomas: inglés (visto en @botsgram_cu) #enlaces#archivos#descarga
@botsgram_cu · Post #4335 · 05.09.2021 г., 13:58
¿Que puede hacer este bot? @DegooUploaderBot Con este bot puede cargar archivos de Telegram y enlaces de descarga directa a su almacenamiento en la nube degoo. Idiomas: inglés (Visto en @botsgram_cu) #archivos#degoo
@botsgram_cu · Post #4419 · 09.10.2021 г., 11:01
¿Que puede hacer este bot? @Tgfilestore_bot Almacene y comparta archivos con URL permanente. Idiomas: inglés (Visto en @botsgram_cu) #enlaces#archivos#nube
@botsgram_cu · Post #3759 · 02.04.2021 г., 15:06
¿Que puede hacer este bot? @UnzipRobot Extrae archivos comprimidos dentro de Telegram con soporte permanente de miniaturas. Idiomas: Inglés (Visto en @botsgram_cu) #unzip#archivos#enlaces
@botsgram_cu · Post #3073 · 17.10.2020 г., 00:27
¿Que puede hacer este bot? @cloudy_files_bot Este es un bot de servicio en la nube. Le permite administrar archivos y descargarlos. Idiomas: inglés (Visto en @botsgram_cu) #descargas#nube#archivos
Hashtags
@botsgram_cu · Post #2961 · 12.08.2020 г., 01:29
¿Que puede hacer este bot? @tg_renamer_bot Este es un bot de cambio de nombre de archivo de telegram personalizado, con soporte de miniatura Idiomas: inglés (visto en @botsgram_cu) #archivos#renombrar#miniaturas
Hashtags
@botsgram_cu · Post #4992 · 28.04.2024 г., 21:33
¿Qué puede hacer este bot? @complete_pdf_bot Si eres alguien que pasa mucho tiempo trabajando con archivos PDF de Telegram, 𝐈 💔 𝐏𝐃𝐅 es una herramienta imprescindible. Este bot simplifica a los usuarios convertir archivos hacia y desde formato PDF, editar, fusionar, dividir, comprimir e incluso convertir imágenes a PDF o viceversa. #pdf#imagenes#archivos (Visto en @BotsGram_Cu)
@botsgram_cu · Post #4971 · 10.04.2024 г., 21:59
¿Qué puede hacer este bot? @FILEs_COMPRESSOR_BOT Este bot le permite comprimir archivos en archivos zip y administrarlos. Idioma: Inglés #archivos#compresion#zip (Visto en @BotsGram_Cu)
Hashtags
@botsgram_cu · Post #4490 · 16.11.2021 г., 22:22
@TG_UnZipperBot ¿Qué puede hacer este bot? Extrae archivos zip, tar, 7z, tar.xz, etc Idioma: Inglés 🇬🇧 (Visto en @BotsGram_cu) #unzip#extraer#archivos
@botsgram_cu · Post #4250 · 16.08.2021 г., 18:26
¿Que puede hacer este bot? @TheFileShareBot Guarde y comparta archivos, obtenga un enlace permanente de Telegram. Idiomas: inglés turco (Visto en @botsgram_cu) #archivos#herramientas#compartir#anónimo