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

Резултати

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

Пребарај: #bootloader

当前筛选 #bootloader清除筛选
XP Digital Lab

@rocchl · Post #7761 · 09.12.2025 г., 02:04

全球/中国手机品牌 Bootloader 解锁耻辱榜 一个开源项目 Bootloader Unlock Wall of Shame,记录各大手机品牌是否允许用户解锁 Bootloader。用户认为解锁是自由,厂商则强调数据安全,因此这一问题长期存在争议。 GitHub地址 标签:#github#bootloader Created by RocM 官方频道:@rocCHL 官方群组:@roctech 官方合作:@rocmmbot

木制杂物间

@trashbox_404 · Post #29 · 14.04.2025 г., 11:07

你米是有一套操作的,非要搞这样。 确实是因为有一部分人开挂什么的影响环境......真的要考虑OP嘛 还是看摄像吧,可以的就熟悉一下... #小米#Bootloader

Libreware

@libreware · Post #1479 · 03.09.2025 г., 22:47

#bootloader unlock wall of shame https://github.com/melontini/bootloader-unlock-wall-of-shame updated guide, check it before buying a #phone Over the past few years, a suspicious number of companies have started to "take care of your data", aka block/strictly limit your ability to unlock the bootloader on your own devices. While this may not affect you directly, it sets a bad precedent. You never know what will get the axe next: Shizuku? ADB? Sideloading? I thought it might be a good idea to keep track of bad companies and workarounds. #android

Libreware

@libreware · Post #1170 · 01.09.2023 г., 02:27

#Xiaomi#Bootloader#Unlock without PC (Phone-To-Phone) Note: We are not responsible for any data loss or corrupt devices. Proceed at your own risk. This procedure requires the use of 2 Android phones and an OTG cable for ADB debugging. If this is your first time unlocking the bootloader or your device is using a new MIUI account, proceed with Step 2 after 7 days Step 1 [Configuring Settings] [Primary Phone]: » Go to Settings > About Phone: Click on MIUI Version multiple times until developer options are enabled » Go to Settings Homepage > Additional Settings > Developer Options: Enable OEM Unlocking and USB Debugging » Then go to Mi Unlock Status: Click on Add account and device Step 2 [Installing Flash scripts] [Secondary Phone]: » Download and install these 3 APKs on your secondary phone: https://github.com/RohitVerma882/termux-miunlock/ (outdated?) https://github.com/termux/termux-app/releases/ https://github.com/termux/termux-api/releases/ » Connect the primary phone to the secondary phone via OTG » Boot the primary phone into fastboot mode » Open the Termux app: Follow and run these commands one by one according to the instructions 👤Credits Techbuzznet (Video instructions for Indians) RohitVerma888 @WildWaze ( thx for help and banner) https://t.me/popMODS/3621

Libreware

@libreware · Post #1334 · 25.09.2024 г., 15:38

#Unlock#bootloader#xiaomi#Android HyperSploit Bypass HyperOS restrictions on bootloader unlocking https://github.com/TheAirBlow/HyperSploit/ https://xdaforums.com/t/hypersploit-bypass-hyperos-bootloader-unlocking-restrictions.4668775/ MiUnlockTool Retrieve encryptData (token) for Xiaomi devices to unlock bootloader, it is compatible with all platforms. https://github.com/offici5l/MiUnlockTool termux-miunlock A program that can be used to retrieve the bootloader unlock token for Xiaomi devices (and unlock the bootloader) using Termux https://github.com/RohitVerma882/termux-miunlock/

耕读频道

@iGengdu · Post #542 · 13.09.2024 г., 11:40

#小米#Bootloader#解锁#考题 分享:小米 BootLoader《解锁资格答题测试》模拟考及题库 该项目提供小米历次BootLoader《解锁资格答题测试》真题题库和模拟考测试,帮助大量考生快速提高答题成绩。 今年最后一场小米BootLoader《解锁资格答题测试》将于9 月 24 日上午 8:00 - 8:15举行。 希望大家认真备考,让自己的小米设备早日上岸! 题库及模拟考 https://xmbl.neko.ink/ GitHub https://github.com/MlgmXyysd/Xiaomi-BootLoader-Questionnaire/ 参考:蓝星天宇大佬。 📢频道✈️ 群聊 (耕读) 📬投稿

12
ПретходнаСтраница 1 од 2Следна