TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #239 · 3 мај

Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML. Из плюсов такого подхода стоит отметить вот что: 🔸 готовый, повсеместно используемый и поддерживаемый формат 🔸 простой и понятный файл, удобочитаемый для человека 🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек Но есть и минусы 🔹 затраты времени при записи файла (кодирование данных в нужный формат строки) 🔹 затраты времени при чтении файла (декодирование данных в Python объекты) 🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...) 🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда) 🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи. Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳. 🔸 очень быстрая запись 🔸 чтение значительно быстрей чем JSON, YAML итд 🔸 размер файла значительно меньше, так как нет разметки 🔸 можно записывать данные по мере поступления не загружая всё в память 🔸 можно извлечь любую часть данных независимо Из минусов 🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата) 🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию. 🔹 не так-то просто создать такой файл без специальной библиотеки В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии. (Это не означает что нельзя записать данные разного типа, просто это будет не так удобно) Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого f15d cd29 a564 4578 ... 09e2 9bc4 a696 1253 ... 84e9 4de1 3b23 c24a ... 2534 5161 28e0 709d ... ... Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла. К чему это я? Читайте в следующем посте... #tricks#basic

Резултати

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

Пребарај: #endtheoccupation

当前筛选 #endtheoccupation清除筛选
Freedom Flotilla Coalition

@FFC_official_channel · Post #257 · 08.05.2025 г., 20:44

If an unprecedented drone attack on civilians in European waters can go unanswered, what message does that send to the world? Malta is not the only government being tested here. This is a moment of truth for the EU, for international law, and for all those who claim to uphold human rights. And so it is up to international community to demand accountability and end support for these crimes. Sign our petition now. Tag UN experts, rapporteurs, and human rights bodies to demand a transparent investigation. Contact your government and demand they condemn this unprecedented attack. Support safe passage for our missions. Watch and share our content. And never forget to demand an end to Israel's illegal blockade, an end to the genocide, and to ensure self-determination for all Palestinian people. SIGN NOW - https://bit.ly/alleyesondeck #BreakTheSiege#FreePalestine#ConscienceShip#EndTheOccupation#HumanRights

Freedom Flotilla Coalition

@FFC_official_channel · Post #197 · 25.07.2024 г., 07:59

Robert has long fought alongside Palestinians and isn't stopping now. Having spent time in Palestine documenting horrific human rights abuses by Israeli forces, he has seen the brutality of the occupation first hand. Despite the extreme difficulty in leaving his children and partner back home in what he describes as a "grieving process", he shares how important it is to use his privilege to be a part of the collective effort to break the siege on Gaza. As we have witnessed over the course of 9 months and 76+ years prior, we cannot fathom or predict the IOF's brutality or what they are capable of if they intercept 'Handala' in international waters. So we need your help in keeping Robert as safe as possible. We need your help in demanding safe passage for all volunteers onboard our Flotillas. Please share our videos, tag your politicians and ensure that we reach Gaza safely. #endtheblockade#breakthesiege#robertmartin#freepalestine#freegaza#endtheoccupation#solidarity#wewillsail#letthemsail

Freedom Flotilla Coalition

@FFC_official_channel · Post #461 · 07.06.2025 г., 21:51

This Eid, our hearts are with the Palestinians of Gaza. You deserve life, justice, peace, and the right to celebrate Eid without mourning. One day soon, Eid will be celebrated in a Gaza that is whole, alive, and at peace. Until then, we will not stop. Eid Mubarak. #EidMubarak#FreedomForGaza#Madleen#Solidarity#Palestine#EndTheOccupation#JusticeForGaza

Freedom Flotilla Coalition

@FFC_official_channel · Post #219 · 25.08.2024 г., 10:11

UN experts warned months ago that Israel is deliberately starving Palestinians, and that famine is rapidly spreading across Gaza, and yet Israel continues with impunity and is sent billions of dollars by the US. Children, infants, pregnant women, people living with disabilities, the elderly and those with chronic illnesses are the most at risk of severe malnutrition, illness, and death. Mobilize today, and continue boycotting products and companies that support these war crimes. #freegaza#freepalestine#endtheoccupation#humanitarianaid#costofliving#northgaza#gazacity#freedomflotilla#ffc#breakthesiege#endtheblockade #BDS * prices are in US dollars

Freedom Flotilla Coalition

@FFC_official_channel · Post #215 · 19.08.2024 г., 21:03

Our objectives—to break the blockade and raise awareness of the genocide against Palestinians in Gaza—remain unchanged. We will provide updates on our next departure when we are ready to sail again. In the meantime, we urge you to join the #NoHarbourForGenocide campaign to take action against the siege on Gaza by opposing every country and company complicit in this genocide. #handala#ffc#freedomflotillacoalition#freegaza#freepalestine#endtheoccupation#breakthesiege#endtheblockade#iof#warcrimes#icc#icj

Freedom Flotilla Coalition

@FFC_official_channel · Post #217 · 24.08.2024 г., 11:13

Despite relentless police brutality and state repression in Germany, Yasemin, a Kurdish-Turkish activist on the 'Handala' ship, remains unwavering in her fight for Palestinians. Born into resistance, she fearlessly confronts oppression, transforming each attempt to silence her into fuel to continue fighting for justice. Her steadfast belief in direct action and the power of collective resistance is undeterred by the dangers she has faced, which led her to join 'Handala'. Yasemin encourages all of us watching to disrupt capital and profits in order to create effective change. Download the No Thanks app, search every product before buying it, and boycott companies that support Zionism and Israel’s war crimes against Palestinians. We are never just one person. Together, it is possible to speak their language and hit them where it hurts - their wallets. #endtheoccupation#freegaza#freepalestine#endtheblockade#breakthesiege#freedomflotilla#ffc#yaseminacar#handala#berlin#bds#boycott#divest#sanction

Freedom Flotilla Coalition

@FFC_official_channel · Post #224 · 31.08.2024 г., 23:58

This election is not just about what happens within U.S. borders—it’s about the lives of millions around the globe. When you vote, you’re making a statement about where America stands on human rights. History has shown us that you cannot negotiate with leaders who offer nothing but empty promises. Kamala Harris herself said, "Never let anyone tell you who you are. Show them who you are." Well, the Biden-Harris administration has shown us who they are. For ten months, they’ve done nothing but fund the annihilation of Gaza and the West Bank. We cannot accept these empty words when hundreds of thousands of lives are at risk. It’s time to demand real action, not just lip service. Sign the petition to enact an arms embargo on Israel, spread the truth in your community, and mobilize for the sake of humanity. Take Action Now: 🖋️ Sign the Petition: Not Another Bomb! Demand an arms embargo to stop the genocide (in our stories) 📰 Stay Informed: Join the Uncommitted Movement and tell Kamala Harris to stand on the right side of history. Sign up for updates. 🗣️ Spread the Word: Distribute flyers, educate your community, and support candidates who truly stand for human rights. #KillerKamala#BidenHarris#USElections#DNC#ActForGaza#EndTheOccupation#NoMoreEmptyPromises#FreeGaza#FreePalestine#PermanentCeasefire#UNSecurityCouncil#GlobalImpact#FFC#FreedomFlotilla