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

Резултати

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

Пребарај: #can

当前筛选 #can清除筛选
Social Justice Watch

@social_justice_watch · Post #17065 · 05.09.2022 г., 02:13

I wonder how many gay people are actually transgender & dont know it because people thing being transgender is transitioning when it’s literally just not being cis. like I had a friend tell me last night “all my life I wanted to be a girl. even to this day, like if someone told me I could transition & look like you or *insert another trans woman idk* I would do it in a heartbeat” and when I was like omg ur transgender he was surprised? like he was like wait just wanting to be a girl makes me transgender even if I dont do anything about it? and like its harder to pinpoint non binary people but if u have a desire be a different gender ur transgender. transitioning is a choice but being transgender is not. “One of the symptoms of being a girl is wanting to be a girl.” Don’t remember where I heard that but the quote is my life. This is one of the posts I can explicitly pinpoint as helping me realize that I might not be cis. The biggest symptom of being trans is wanting to not be your gender. It can also be dysphoria, it can also be euphoria, it can also be presentation, but wanting to be something else is all you really need. #wait so ur telling me#‘i dont want to have a gender’#can mean#‘i dont have a gender??’ I would also like to know… for reasons Confirmed. How to know you’re agender: You don’t want to be anything else. You look at the options for gender and gender presentation and decide to go back to bed Bold of you to assume I got out of bed Nah but seriously thanks for the insight So, if I look at gender and say “this is some bullshit and I want no part of it”, I guess that makes me agender? if that’s how you wanna identify, yeah. feeling anything mentioned in this post doesn’t mean you have to identify as trans, but feeling anything in this post is literally all that’s necessary to identify as trans if you want to. fuck gatekeepers forever. 👏if👏you👏don't👏feel👏cis👏you're👏possibly👏not👏cis👏 i mean this is literally what jvn said This is one of those things where you can go 25+ years of your life not realising that actually no not everyone secretly wishes they were some mashup of male and female and that you are, in fact, genderfluid as fuck. You can want to be the other gender. You can want to be another gender. You can want to divorce all connection to the gender you were born into. You can want to keep it as an origin point that shapes your journey. You can want to be more than one gender at once. You can want to be more than one gender, at different times. You can want to be no gender. You can want to be sort of in between genders. You can want to be both genders. You can want to be rid of gendered body parts you already have. You can want to keep gendered body parts while also being another gender. You can want to be rid of them but not want the side effects of excising them. You can feel dysphoria at being shaped like/viewed as/treated like a gender you don’t want. You can feel euphoria at being shaped like/viewed as/treated like a gender you do want. You can change your mind or adjust your goals or refine your wishes. You can be stationary and fixed in your identity. You can be fluid and changing. You can be extremely gendered in your presentation. You can be not very gendered in your presentation. You can be androgynous. You can be a little of both. You can be a lot of both. If gender is a line you can cross, as the words trans (across/on the other side of) and cis (here/on the same side of) indicate, you can cross it in any way you like, including dancing on top of it. Be happy. Be you. This is an extremely affirming post. https://genderkoolaid.tumblr.com/post/691574739639091200/i-wonder-how-many-gay-people-are-actually

Hashtags

RT France actualités

@rt_fra · Post #40940 · 08.05.2026 г., 21:15

⏺Retour à Dakar de trois supporters sénégalais détenus au #Maroc après la #CAN 2025 Retour triomphal à #Dakar pour les trois supporters sénégalais libérés après des mois de détention au Maroc. Attendus à leur arrivée par une foule nombreuse, ils ont saisi l'occasion pour exprimer leur solidarité aux 15 autres supporters toujours en prison pour hooliganisme suite aux incidents survenus lors de la finale de la CAN 2025. Le président Bassirou Diomaye Faye a récemment confirmé avoir adressé une demande de grâce royale. RT en français • Osez questionner !

VIP_影视分享

@wangzhuanzhan · Post #33436 · 27.09.2024 г., 08:56

N-n你n能n原y谅l我w吗m- 你能原谅我吗? Can You Ever Forgive Me? (2018) 直达链接:https://pan.quark.cn/s/3a359e946f75 #你能原谅我吗#Can You Ever Forgive Me #大老作家#她的伪造游戏 链接:https://link3.cc/sf_com #电影#喜剧#美国#10年代

小喵的ACG黄油 (重开版)

@xiaomiaogame · Post #2191 · 19.01.2026 г., 14:50

我可以进来吗? CAN I COME IN? 官方中文步兵版 一款基于“我不是人类”游戏的 NSFW parody(成人向恶搞作品)。 在一个由魅魔统治的世界里,你作为最后幸存的男性之一,成为所有女性追逐的欲望对象。 你能否成功生存,还是最终沉沦于她们的诱惑? 你必须照顾并保护你的房客;她们每存活一天,你都将获得香艳的奖励。 游戏采用 2D 结合 3D 的表现形式,包含 第一人称视角、视觉小说及迷你游戏元素。 整体氛围带有 恐怖色彩。 评分 作者 #Raigen #PC#AI生成#官中#动态#步兵#同人#寻找伪人 #我可以进来吗? #CAN I COME IN? 下载地址