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

Резултати

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

Пребарај: #darkcomedy

当前筛选 #darkcomedy清除筛选
movies & series 🍿

@images · Post #1745 · 19.12.2024 г., 11:36

🍿 'Death of a Unicorn' Breaks the Mold 📆Release: Spring 2025 🎭Genre: #DarkComedy A24 surprises with Alex Scharfman's directorial debut in this new film. Paul Rudd and Jenna Ortega star as a father and daughter who accidentally hit a unicorn, triggering a series of supernatural events. The plot masterfully blends sharp humor with effective horror. Expect Will Poulter to steal the show with his natural charisma, while Paul Rudd brings his unmatched charm. I notice nods to classics like Evil Dead, making this a safe bet for genre fans. 🦄

Hashtags

movies & series 🍿

@images · Post #1832 · 17.05.2025 г., 04:49

🍿 ‘Nobody 2’: family vacation, bullets and chaos at the waterpark 📆Release: August 15, 2025 🎭Genre: #Action · #DarkComedy Bob Odenkirk is back as Hutch Mansell, the world’s most overworked assassin, in a sequel that fuses ‘John Wick’ with Chevy Chase’s ‘Vacation’. This time, Hutch tries to unwind with his family at a theme park—until Sharon Stone shows up as a full-blown crime boss and Colin Hanks plays a shady small-town sheriff. Things go to hell, obviously. Set to the iconic track Holiday Road, the trailer promises more bone-crunching fights, dark humor, and dysfunctional family drama. With Timo Tjahjanto (‘The Night Comes for Us’) directing, expect stylish mayhem and over-the-top action. Oh, and Christopher Lloyd wielding a Gatling gun? That alone makes this the summer movie to watch. It’s gonna be gloriously insane.

movies & series 🍿

@images · Post #1927 · 16.10.2025 г., 15:09

🍿 ‘Primate’: The Killer Ape Hollywood Has Been Afraid to Make 🐒🔪 📆Release: January 9, 2026 🎭Genre: #Horror · #DarkComedy ✈️Follow movie Johannes Roberts (47 Meters Down, The Strangers: Prey at Night) directs this story about a group of friends enjoying a tropical getaway—until their family pet, a chimp named Ben, goes berserk after being bitten by something mysterious. What follows is ninety minutes of chaos, screams, and blood under the Hawaiian sun. ☀️💉 The trailer leans into the same absurd horror vibe that made M3GAN a hit and clearly nods to the chimp scene from Nope. The blend of terror and comedy is so shameless you’re never sure whether to laugh or hide behind your hands. A brutal warning about human arrogance in trying to tame the wild… yet also proof that watching a monkey unlock a car with a key fob can be terrifyingly fun. 🧠💀

movies & series 🍿

@images · Post #1808 · 28.03.2025 г., 12:01

🍿 ‘One Battle After Another’: DiCaprio leads the revolution in Paul Thomas Anderson’s wildest ride yet 📆Release: September 26, 2025 🎭Genre: #DarkComedy · #Thriller · #Action Leonardo DiCaprio (The Revenant, The Wolf of Wall Street) plays a chaotic, bathrobe-wearing ex-revolutionary on a desperate mission to find his daughter — and possibly save the world while he's at it. Paul Thomas Anderson (There Will Be Blood, Licorice Pizza) teams him up with Benicio del Toro (Traffic) as his deranged “sensei” and Sean Penn as a grizzled military foe. Loosely inspired by Thomas Pynchon’s Vineland, this is more spiritual remix than straight adaptation. Shot on 35mm VistaVision with a reported $140M budget, it's Anderson’s most ambitious film yet. 🎬💥 This feels like PTA blending the absurdity of Inherent Vice with the emotional punch of Punch-Drunk Love. DiCaprio looks completely unhinged — and I’m 100% here for it. 🧨

movies & series 🍿

@images · Post #1837 · 22.05.2025 г., 04:33

🍿 Caught Stealing: Aronofsky lets loose — and it actually suits him 📆Release: August 29, 2025 🎭Genre: #Thriller · #DarkComedy · #Crime ⬇️Follow Movie Austin Butler is just cat-sitting when things spiral out of control. Suddenly, he’s on the run through a gritty, gangster-infested 1990s New York — with punk neighbors (Matt Smith in a mohawk), Hasidic mobsters, and Zoë Kravitz as his emotional anchor. Aronofsky — yes, Black Swan and The Whale Aronofsky — feels like he binged Snatch and Lucky Number Slevin before directing. And it works: this doesn’t smell like an existential meltdown, but rather a fast-paced pulp thriller with dirty visuals and dark humor. It’s his least depressing and most fun movie yet, without losing his flair for the grotesque. 📣Best part: the trailer doesn’t spoil everything — finally. 🤔The big question: is this a one-off or a new chapter? Either way, it looks like instant cult material.

movies & series 🍿

@images · Post #1690 · 18.09.2024 г., 13:44

🍿 Robert Pattinson Multiplies Himself in 'Mickey 17', Bong Joon Ho's New Madness 📆Release: January 31, 2025 🎭Genre: #ScienceFiction · #DarkComedy 🎟 Bong Joon Ho, the genius behind 'Parasite', returns with 'Mickey 17'. Robert Pattinson multiplies himself, literally!, in this adventure where his character, an 'expendable' (disposable), dies and is cloned over and over again on a mission to colonize an icy planet. 🧊 The most curious thing is the peculiar tone of voice Pattinson has adopted, which already has fans obsessed. Plus, the cast is top-notch: Steven Yeun from 'Minari', Toni Collette from 'Hereditary', and Mark Ruffalo from 'The Avengers'. If 'Parasite' left us speechless, I can't wait to see what Bong brings us this time. 🚀

movies & series 🍿

@images · Post #1814 · 07.04.2025 г., 17:40

🍿 The Phoenician Scheme: Benicio del Toro, a Nun, and Six Plane Crashes ✈️😵‍💫 📆Release: May 30, 2025 🎭Genre: #DarkComedy · #Espionage · #Action 🍿Follow movie Wes Anderson (The Grand Budapest Hotel,Asteroid City) is back at his most eccentric: Benicio del Toro leads this visual satire as a bruised and armed tycoon who hands over his empire to his daughter, a knife-wielding nun played by Mia Threapleton (yep, Kate Winslet’s daughter). The cast is wild: Tom Hanks, Bryan Cranston, Richard Ayoade, Scarlett Johansson, Cumberbatch, and even Michael Cera in peak “Wes mode.” Shot in Germany with a score by Alexandre Desplat, the film oozes Anderson’s signature nostalgic absurdity, but with a sharp rhythm that echoes his best work. Sure, the aesthetic is familiar, but when Wes nails it, it’s not formula, it’s pure style. And this one smells like a full-blown comeback. 🎨💣

movies & series 🍿

@images · Post #1926 · 15.10.2025 г., 10:58

🍿‘Send Help’: Sam Raimi Turns a Deserted Island into a Psychological Battlefield 🌴💀 📆Release: January 30, 2026 🎭Genre: #Horror · #DarkComedy · #PsychologicalThriller ✈️Follow movie Sam Raimi —the mastermind behind The Evil Dead and the original Spider-Man trilogy— returns to his wildest roots with Send Help, his first non-franchise horror film since Drag Me to Hell. Rachel McAdams (Spotlight, Mean Girls) stars as Linda, an underappreciated employee stranded on an island with her boss from hell, Bradley (Dylan O’Brien, The Maze Runner), after surviving a plane crash. What begins as a survival story quickly turns into a darkly funny, blood-soaked power struggle for dominance. What fascinates me most is how Raimi flips the hierarchy: the underdog becomes the predator 💪. Many are calling it a mix between Misery, Cast Away, and Triangle of Sadness —but with Raimi’s signature flair: grotesque, frantic, and wickedly fun. McAdams promises a full-on “Regina George in survival mode” performance, and that alone is worth the ticket. Raimi is back, and horror is groovy again.

Desi Memes Funny Jokes

@DESI_MEMES_Funny_Jokes · Post #5897 · 29.11.2024 г., 12:10

” . . #funny#comedy#funnyreels#reelsinstagram#reelitfeelit#reelkarofeelkaro#memepage#memes#indianmemes#indianreels#viralreels#trending#trendingreels#samayraina#darkcomedy#darkmemes#darkhumour#reels#explorepage#trend#trendingaudio#reletable#trendingaudios

Desi Memes Funny Jokes

@DESI_MEMES_Funny_Jokes · Post #5890 · 29.11.2024 г., 04:50

” . . #funny#comedy#funnyreels#reelsinstagram#reelitfeelit#reelkarofeelkaro#memepage#memes#indianmemes#indianreels#viralreels#trending#trendingreels#samayraina#darkcomedy#darkmemes#darkhumour#reels#explorepage#trend#trendingaudio#reletable#trendingaudios