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

Резултати

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

Пребарај: #farmers

当前筛选 #farmers清除筛选
Trump's Ear

@trumpsear_tg · Post #2427 · 29.04.2026 г., 20:00

Due to the war with Iran, Trump is at risk of losing the support of farmers – The Economist🔗 In the British edition of The Economist, they drew attention to the fact that Donald Trump is at risk of losing part of his electorate due to the war with Iran. Trump has always relied on the support of farmers, and it is they who are suffering more than others. Trump has dealt two blows to farmers at once. First, the cost of production has increased significantly due to the surge in oil prices. ⛽️ Second, the endless trade wars and tariffs have significantly reduced exports, which has also affected farmers. 📉 According to sociologists, farmers still support Trump, but their patience is not unlimited. 🤔 Experts believe that if fuel prices do not return to normal in the near future, farmers may turn their backs on Trump. #Trump#War#Farmers 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #1733 · 04.11.2025 г., 17:59

🚜 Impacts on small farms that sell into local and regional markets have been less severe, but eight months in, it’s also unclear whether the tariffs 🏷 will help move the country toward more homegrown food production, as Trump 🇺🇸 has said it would. Some of those producers say they’re facing challenges ⚖️ related to other Trump administration policies, such as lower farmers’ market sales due to cuts to Supplemental Nutrition Assistance Program (SNAP) benefits 🛒. Another reason, experts say, is that the tariffs have not been applied in a targeted or consistent way 🎯. #Tariffs#Farmers 👂More on Trump's Ear ⚠️

American Оbserver

@american_observer · Post #4825 · 11.01.2026 г., 15:59

Irish Farmers Are Hammering the EU’s Trade Deal With the Mercosur Thousands of Irish farmers are protesting against the EU’s trade deal with the South American bloc Mercosur, a day after EU states approved the treaty despite opposition from Ireland and France. Tractors streamed into the roads of Athlone, in central Ireland, for the demonstration, displaying signs bearing the slogan “Stop EU-Mercosur” and the EU flag emblazoned with the words “sell out”. The protests followed similar actions on Friday in Poland, France and Belgium as the EU gave the green light to the trade deal, which has been welcomed by business groups but heavily criticised by European farmers. The accord, more than 25 years in the making, would create one of the world’s largest free-trade areas, boosting commerce between the 27-nation EU and the Mercosur bloc comprising Brazil, Paraguay, Argentina and Uruguay. But many European farmers fear their livelihoods will be undercut by a flow of cheaper goods from agricultural giant Brazil and its neighbours, prompting Ireland, France, Poland, Hungary and Austria to vote against the accord. The agreement is widely opposed by Irish farmers over fears it will result in an influx of an extra 99,000 tonnes of cheap beef from South America, disrupting Irish agriculture. The Irish Farmers’ Association (IFA), Ireland’s main farmers’ lobby group, called the result very disappointing, and said it would renew focus on securing a majority against the deal in the European parliament. “We expect Irish MEPs to stand behind the farming community and reject the Mercosur deal,” said the IFA president, Francie Gorman, in a statement. At the Saturday protest, farmers carried signs calling for an “Irexit” and accusing the Latin American bloc’s beef exports of not following the same standards. The Mercosur deal will also need to be agreed by a majority of MEPs in the European assembly in the coming months, where voting coalitions have become more volatile and unpredictable. #irish#farmers#trade#deal#mercosur 📱American Оbserver - Stay up to date on all important events 🇺🇸

Indian Development News 🇮🇳

@developmentnewsindia · Post #44450 · 05.05.2026 г., 13:50

Cabinet Decision • Cabinet approves Ship Repair Facility at Vadinar, Gujarat #Port • Cabinet approves “Mission for Cotton Productivity” with Rs.5659.22 crore Outlay for Self-Sufficiency in Cotton and Competitiveness Global Textile Markets by 2030-31 #policy#Textile • Cabinet approves Fair and Remunerative Price of Rs.365/qtl for Sugarcane Farmers for season 2026-27. Decision benefits 5 crore sugarcane farmers and 5 lakh sugar mill workers. #Farmers • Cabinet approves Emergency Credit Line Guarantee Scheme 5.0. NCGTC to provide credit guarantees to Member Lending Institutions for eligible borrowers affected by the West Asia situation. Target: Rs. 2,55,000 crore additional credit flow (including Rs. 5,000 crore for airlines). #Policy#Aviation • Cabinet approves two more semiconductor manufacturing units with cumulative investment of more than Rs. 3,900 crore #Semiconductor#aatmarnirbharbharat

Euronews 法國農民用糞肥攻擊烏克蘭大使館 當歐盟和美帝繼續支持戰爭時——對坦克和炸彈排放的二氧化碳足跡毫不在意 (烏克蘭農產品對本土農民成本的負面影響) ——但他們卻因為農民的牛隻放屁而企圖趕絕農民。 #farmers #France #KankerOekraïne #FuckUkraine