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

Резултати

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

Пребарај: #budget2026

当前筛选 #budget2026清除筛选
The Straits Times

@thestraitstimes · Post #21051 · 16.02.2026 г., 02:25

🎧 Beyond the headlines on CDC vouchers and AI, how does #Budget2026 impact businesses, workers and you? In a special episode of The Usual Place podcast, we have Second Minister for Finance Indranee Rajah, SMU assistant professor of political science Nathan Peng, and SG Tech co-chair of AI, Cloud and Data Chapter Gunasekharan Chellappan to help answer these questions. https://str.sg/pUiK

Hashtags

The Straits Times

@thestraitstimes · Post #21011 · 12.02.2026 г., 23:59

Wondering what you will get from #Budget2026? Find out your estimated tax and what benefits you qualify for with our calculator: https://str.sg/4H5fv

Hashtags

The Straits Times

@thestraitstimes · Post #21008 · 12.02.2026 г., 11:15

PM Lawrence Wong unveiled a range of support measures for Singaporeans in his #Budget2026 speech. https://str.sg/neqA What was your favourite announcement?

Hashtags

The Straits Times

@thestraitstimes · Post #21007 · 12.02.2026 г., 10:55

🎧 More help for AI training, more support for lower-income families and just a little bit more CDC vouchers. But what does this year's #Budget2026 mean for us all? This week on The Usual Place podcast, we chat with NUS political science lecturer Rebecca Grace Tan and SBF chief policy and operating officer Musa Fazal who help us make sense of it all. https://str.sg/siJV

Hashtags

The Straits Times

@thestraitstimes · Post #21006 · 12.02.2026 г., 09:10

#Budget2026: To discourage the consumption of tobacco products, PM Lawrence Wong said he will be imposing a 20% increase in tax on all such products from today. https://str.sg/y8jZ

Hashtags

The Straits Times

@thestraitstimes · Post #21004 · 12.02.2026 г., 08:32

#Budget2026: Eligible Singaporeans will receive a CPF top-up of up to $1,500, as part of measures to provide more support for seniors. A new investment scheme will also be offered to CPF members. https://str.sg/BMhyP

Hashtags

The Straits Times

@thestraitstimes · Post #21001 · 12.02.2026 г., 08:17

#Budget2026: Singapore will be updating its foreign workforce policies to keep the country open to skills and expertise from foreigners, while ensuring Singaporeans remain at the centre core of the local workforce. https://str.sg/EG7k

Hashtags

The Straits Times

@thestraitstimes · Post #21000 · 12.02.2026 г., 08:05

#Budget2026: Singaporeans who go for selected AI training courses will get 6 months of free access to premium AI tools. This is to allow them to practise, experiment, and apply what they have learnt. https://str.sg/JZGVx

Hashtags

The Straits Times

@thestraitstimes · Post #20999 · 12.02.2026 г., 07:57

#Budget2026: Singapore will establish a new National AI Council to provide strategic direction and drive the country’s AI agenda. PM Lawrence Wong will chair this council. https://str.sg/4T5R9

Hashtags

PRICE ACTION EXPERT

@priceactionexpert · Post #8768 · 01.02.2026 г., 14:52

https://x.com/priceactiongann/status/2017974249944932755?s=20 Nifty 50 very important levels are ahead 24355 to 23900 #StockMarketCrash is loading but not before the top cycle 27000 to 28000 completes and once it is done the one of the main cycles will take over on top. #Budget2026 23900 was given months and highs were broken since then ranging on top and now retraced. as long as the 23900 to 24355 holds and above that is clear upside only. from there levels check for confirmations and once its clear and it forms lows here and it must hold there and price bounces nicely and goes up long term cycle is 26525 and breaking that would be 27000 and next would be 28000 and will update once reached 27000. bank nifty previous levels were 59860 and it's where the high was today almost exact it worked very well in nifty because of gift nifty in that cycle was complete and also bank nifty coincided once this current upside is done it will all crash this year after highs around 28000 or so will update exact as price approaches near it.

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