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

Резултати

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

Пребарај: #videoeducativo

当前筛选 #videoeducativo清除筛选

👇Mahaim Tachycardia (Part 2 - Final): 1.Sinus Rhythm: Normal PR interval without delta waves. 2.Always Wide Complex Tachycardia: Typically presents with LBBB morphology due to exclusive antegrade conduction via Mahaim fibers. 3.Incremental Atrial Stimulation: Shows maximum preexcitation with a normal PR interval and LBBB morphology. 4.Long RP Tachycardia: Characterized by stable ventriculo-atrial conduction. 5.Post-Pacing Interval (PPI - TCL <100 ms ) when pacing from the RVA. 6.Mahaim Potential: Identified at the lateral tricuspid valve annulus, resembling a His-like signal. 7.Frequent Localization: Most commonly found along the lateral TV annulus. 8.Mapping: Targets the site of latest atrial activation corresponding to Mahaim fibers. 9.Ablation: Enjoy the Termination of tachycardia during energy application. 10.Post-Ablation Findings: Loss of preexcitation during isoproterenol or atrial pacing (indicating successful elimination of Mahaim fibers). #VideoEducativo 🔗 @melhamriti

👇Taquicardia de Mahaim (Parte 1): Fundamentos del comportamiento de las fibras de Mahaim en ritmo sinusal, estimulación auricular y fibrilación auricular👇 👉 Ritmo sinusal: Sin onda delta 👉 Estimulación auricular: Preexcitación máxima con intervalo PR normal y morfología de BRI 👉 Taquicardia de Mahaim: Siempre complejo ancho debido a la conducción anterógrada exclusiva a través de las fibras de Mahaim 👉 Mahaim + fibrilación auricular: QRS ancho (de Mahaim) con algo de QRS estrecho (a través del nodo AV); ritmo irregular pero no demasiado rápido #VideoEducativo 🔗 El Hamriti Mustapha (@melhamriti)

👇VT Storm and the Wonders of Catheter Ablation👇 👉 Incessant VT, refractory to medication, ATPs, and cardioversion in a patient with DCM 😱 👉 The storm terminated 11 seconds after the initiation of the first RF pulse. The total time from catheter insertion to termination was 33 seconds 🤩🤩 Ablation is a game-changer against these deadly and highly dangerous cardiac arrhythmias. #VideoEducativo 🔗 El Hamriti Mustapha (@melhamriti)

10/ Aquí está el pequeño moco que sacamos. El paciente fue visto en seguimiento 2 semanas después y le fue bien con Coumadin y Plavix. Le harán un eco en 3 meses para reevaluar el trombo y la miopatía. En general, es un caso loco. ¡Gracias a Dios que nos hicieron el ECG en el consultorio! #VideoEducativo 🔗 Jay Mohan, D.O., FACC, FSCAI, FASE, RPVI (@DrJayMohan)

9/ Resultado final aceptable. IVUS con trombo residual mínimo. Se optó por dejarlo así y seguir con anticoagulantes orales (el paciente tiene trombo residual en el ventrículo izquierdo de todos modos). Se quería evitar una mayor formación de abombamiento para evitar la embolización distal. #VideoEducativo 🔗 Jay Mohan, D.O., FACC, FSCAI, FASE, RPVI (@DrJayMohan)

7/ Entonces, opté por el CAT 12 de Pen Vascular. Cerré previamente la fémur. El problema era seguir el catéter por la tortuosidad ilíaca y el borde del stent... ¡así que utilicé un truco coronario para ayudar! Seguimiento de penumbra asistido por balón con un balón coronario de 4,0. 🦇 #VideoEducativo 🔗 Jay Mohan, D.O., FACC, FSCAI, FASE, RPVI (@DrJayMohan)

6/ Así que la traje de vuelta al día siguiente para una trombectomía asistida por vacío planificada a través de la fémur ipsilateral. Mi plan era colocar un balón en la pierna contralateral para evitar el desplazamiento del trombo. #VideoEducativo 🔗 Jay Mohan, D.O., FACC, FSCAI, FASE, RPVI (@DrJayMohan)

5/ Se tomó la imagen del lado izquierdo al salir. Se observa un defecto de llenado en el stent ilíaco derecho compatible con un trombo. 🤔¿Qué harías a continuación? Su pierna tiene perfusión, pero el dolor continúa. #VideoEducativo 🔗 Jay Mohan, D.O., FACC, FSCAI, FASE, RPVI (@DrJayMohan)

1/ Bueno, éste fue un caso interesante! 🫣 STEMI asintomático —Trombo en la arteria coronaria derecha —Trombo del VI —Oclusión ilíaca por émbolo —PCI y “seguimiento de penumbra asistido por globo”🦇 #VideoEducativo 🔗 Jay Mohan, D.O., FACC, FSCAI, FASE, RPVI (@DrJayMohan)

👀🔥Aneurismas micóticos de las arterias coronarias. A continuación se muestra una complicación aterradora y poco frecuente de la colocación de stents coronarios cuando se ha introducido una infección en las arterias coronarias. Aquí se ven múltiples aneurismas grandes que se han formado debido a una infección dentro de la pared arterial. 🗞️Fuente: McNamara et al, JACC 2022 🖼️Imagen: Dr. Gopalo Koduru twitter #VideoEducativo 1/2⤵️

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