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

Резултати

Пронајдени 1,016 слични објави

Пребарај: #proxy

当前筛选 #proxy清除筛选
轩辕节点分享吧

@fq521 · Post #4135 · 06.05.2026 г., 01:39

#proxy telegram内置代理 10条 tg://socks?server=47.239.147.84&port=3060&user=123&pass=123 tg://socks?server=47.239.172.228&port=3060&user=123&pass=123 tg://socks?server=47.239.159.70&port=3060&user=123&pass=123 tg://socks?server=47.239.159.125&port=3060&user=123&pass=123 tg://socks?server=47.239.158.189&port=3060&user=123&pass=123 tg://socks?server=47.239.158.45&port=3060&user=123&pass=123 tg://socks?server=47.239.105.135&port=3060&user=123&pass=123 tg://socks?server=43.100.108.223&port=3060&user=123&pass=123 tg://socks?server=47.239.134.180&port=3060&user=123&pass=123 tg://socks?server=47.239.142.122&port=3060&user=123&pass=123 tg://socks?server=47.239.162.1&port=3060&user=123&pass=123 tg://socks?server=47.239.164.100&port=3060&user=123&pass=123

Hashtags

轩辕节点分享吧

@fq521 · Post #4128 · 04.05.2026 г., 00:44

#proxy telegram内置代理 10条 tg://socks?server=47.239.147.84&port=3060&user=123&pass=123 tg://socks?server=47.239.172.228&port=3060&user=123&pass=123 tg://socks?server=47.239.159.70&port=3060&user=123&pass=123 tg://socks?server=47.239.159.125&port=3060&user=123&pass=123 tg://socks?server=47.239.158.189&port=3060&user=123&pass=123 tg://socks?server=47.239.158.45&port=3060&user=123&pass=123 tg://socks?server=47.239.105.135&port=3060&user=123&pass=123 tg://socks?server=43.100.108.223&port=3060&user=123&pass=123 tg://socks?server=47.239.134.180&port=3060&user=123&pass=123 tg://socks?server=47.239.142.122&port=3060&user=123&pass=123 tg://socks?server=47.239.162.1&port=3060&user=123&pass=123 tg://socks?server=47.239.164.100&port=3060&user=123&pass=123

Hashtags

BotsGram®

@botsgram_cu · Post #4127 · 20.07.2021 г., 01:49

¿Que puede hacer este bot? @hqproxy_bot Este bot te proporciona extensas listas actualizadas de varios tipos de proxys para Telegram y otras plataformas. Idioma: inglés (Visto en @botsgram_cu) #proxy

Hashtags

📓 Real Spencer Woo

@realSpencerWoo · Post #146 · 02.04.2020 г., 06:06

#GitHub#Proxy#Cloudflare 📥 加速 GitHub 文件下载 —gh-proxy GitHub | Demo GitHub 最近访问越来越随缘了,而 GitHub Release 又是直接存储在 AWS 上的,对国内的同学来说访问更慢。gh-proxy 是一个利用 Cloudflare Workers 对 GitHub Release、Archive 和项目文件进行加速的服务,同时也支持加速 git clone 项目。 实际用下来,演示地址(就是上面的 demo)就可以让国内同学无代理直接下载 GitHub 内容,网络环境好的情况下,速度非常可观。(不过还是没有直接挂代理快。)推荐大家用来帮助其他没有特殊条件(我不是,我没有,别瞎说)的同学下载 GitHub 内容,方便所有同学直接下载一些仅在 GitHub Release 上发布的软件等。 📮 Via channel: @realSpencerWoo

Libreware

@libreware · Post #932 · 26.04.2021 г., 12:17

SagerNet ---- a universal proxy tool for Android Supported proxy protocols: SOCKS, Shadowsocks, SSR, VMess, VLESS, Trojan. Supported subscription protocols: Universal Base64 format, Shadowsocks SIP008, Clash. A week ago, due to dissatisfaction that almost all agents on Android are closed source (except shadowsocks-android); already closed source and pretending to be open source (v2rayNG), I started to make this tool. The difference between basic functions and shadowsocks-android: no log and tracking components, no closed source dependency, v2ray replaces the built-in simple routing and traffic statistics. The difference between the basic function and v2rayNG: v2rayNG's function is not perfect, the code is not good-looking, and now it is fake open source (. In addition, we have also made a China Apps scanner for sub-application agents (based on DEX path scanning, identifying the characteristics of the SDK, tracking components, and reinforcement programs of major domestic manufacturers, and it is close to practical after small-scale testing) Other features: agent grouping, display modification when subscribing to update, etc. Project address: https://github.com/nekohasekai/SagerNet The first beta version is now released, and you can download it from GitHub Release https://github.com/nekohasekai/SagerNet/releases/ or Telegram channel https://t.me/SagerNetApks (compiled and released via GitHub Actions). For more introduction and compilation, please check Github Repo~ Don't forget to click a star If there is a crash or other problem, please export the application log on the about page and send it to the discussion group of this channel. Feedback is welcome ~ #sagernet#proxy @sagernet

123•••5•••10•••15•••20•••25•••30•••35•••40•••45•••50•••55•••60•••65•••70•••75•••80•••8485
ПретходнаСтраница 1 од 85Следна