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

Резултати

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

Пребарај: #beaches

当前筛选 #beaches清除筛选
Bali News

@balinews · Post #605 · 13.04.2026 г., 06:53

🌊 The most dangerous path to one of the most beautiful beaches in the world 📍 Kelingking Beach isn’t just a viewpoint – it’s an experience. From the top of the iconic T-Rex-shaped cliffs to the crystal-clear waters below, every step (or dive) is pure adrenaline. #beaches#places@BaliNews

Bali News

@balinews · Post #595 · 24.03.2026 г., 08:45

📍Tanah Barak 🏝️ A road carved between massive limestone cliffs, and it suddenly opens up to a pristine beach. Right next to it is Green Bowl Beach – another unreal spot. 🛵 Getting there is easy: rent a scooter or car and head toward Uluwatu (Bukit Peninsula). From there it’s about 25–30 minutes. Parking is right by the beach. Green Bowl is just 5 minutes away, but be ready for a long staircase down. #places#beaches@BaliNews

Bali News

@balinews · Post #572 · 19.02.2026 г., 16:32

🏗 The demolition of a controversial 182-metre glass lift at Kelingking Beach in Nusa Penida 🤬 The lift had tourists and locals in uproar, with many complaining it was spoiling the location’s natural beauty. #places#beaches@BaliNews

Bali News

@balinews · Post #561 · 02.02.2026 г., 16:32

📍Melasti Beach is the place where turquoise waters meet towering cliffs and white sand stretches for miles. Perfect for relaxing, swimming, and catching unforgettable sunsets. A peaceful paradise away from the crowds. 🛵Quick travel times (without heavy traffic): From Ngurah Rai Airport: ~30 min From Kuta/Seminyak: ~45–60 min (~19–22 km) From Canggu: ~1.5–2 hours From Uluwatu area: ~20–30 min From Ubud: ~1.5–2.5+ hours (traffic can add a lot) #places#beaches@BaliNews

Bali News

@balinews · Post #124 · 23.07.2024 г., 09:15

🏝Bali's beaches are going underwater at a record rate 🔎 Experts at the Regional Marine Research Centre have concluded that Bali's coastline is shrinking faster than the global average. 🌊 The total length of the island's coastline, which was 668.84 kilometres in 2016, has shrunk to 662.59 kilometres by 2022. It turns out that Bali is losing 1.21 metres of beach area per year. 📈 The researchers arrived at these figures using geospatial data. The last calculation of the coastline from 75 separate monitoring points was done in March 2023, and it only confirmed this trend. 📍 The highest level of shoreline destruction due to erosion is seen in the south, west coast and southeast of Bali. Beaches in the provinces of Jembrana, Tabanan, Badung, Denpasar, Gianyar, Klungkung and Karangasem have been most affected. @BaliNews #statistics#beaches

Bali News

@balinews · Post #37 · 06.05.2024 г., 10:00

🏝Indonesia's beaches listed the world's best beaches Each year Banana Boat sponsors a list of the 50 best beaches in the world. More than 1,000 experienced travelers from around the world participate in the process. They are asked to choose the place they visited themselves that impressed them the most. Indonesian beaches took two places at once in the 2024 ranking: 🏝 # 7 - Pink Beach 🏝 # 39 - Kelingking Beach The best thing is that it is very easy to get to them from Bali. @BaliNews #beaches#statistics

Bali News

@balinews · Post #223 · 23.10.2024 г., 12:01

🌊 Kuta beach will be restored after the storm 📍 The recent two-meter high tidal waves that hit Bali left a mark on one of the most popular beaches on the island, Kuta. 🏖 The sandy coastline has been badly eroded, making it virtually unfit for walking. 📰 Now, new breakwaters are planned to be built. It is expected that the authorities will begin work to restore the beach this month, but for now the beach and small businesses on it are being helped by locals and tourists. Together they have decided to cope with coastal erosion. @BaliNews #beaches#Kuta

Bali News

@balinews · Post #526 · 13.11.2025 г., 11:18

🚯 Bingin Beach covered in construction debris — locals are frustrated 🧱 Over 40 cafes, bars, and guesthouses were demolished on the slope of Bingin in Uluwatu. Three months later, the debris is still lying around. Some of the concrete, bricks, and wood were simply buried in the sand. Officials claim that heavy rains wash the debris downhill — it’s natural erosion, not “burial.” 🚜 Machinery has stopped due to a lack of budget. Cleanup is now done manually while awaiting additional funding. #places#construction#beaches@BaliNews

Bali News

@balinews · Post #478 · 15.08.2025 г., 12:45

📰Illegal structures found in Melasti and scheduled for demolition 🏝 Eight structures in violation of zoning regulations have been identified on Melasti Beach, including beach clubs and cafes that are too close to the ocean, in a protected coastal area, and partially on municipal land. The owners have already been sent repeated official warnings, and the documents have been forwarded to the public order service for further action. 🧐 The administration's approach is now softer than in Balangan: Melasti will be “discussed and carefully studied” rather than “demolished on the spot.” #places#beaches#Badung@BaliNews

Bali News

@balinews · Post #553 · 13.01.2026 г., 09:55

🏖 Tourists asked to pay cash “entry fee” to reach free Dreamland Beach 📰 In Uluwatu, tourists reported being asked to pay cash for “entry” on the way to free Dreamland Beach — with no ticket booth and no receipt. ℹ️ The story went viral after a video spread online, and officials from South Kuta conducted an inspection. However, they didn’t find the so-called “ticket booth” on site. 🆓 The traditional Pecatu community stated that there is no official entrance fee, and urged visitors not to give in to such requests. ⚠️ If this happens to you, record it and report it to local authorities. #tourism#scam#beaches@BaliNews

Bali News

@balinews · Post #323 · 15.02.2025 г., 11:38

🏝The upgrading of Candidasa beach will last until the end of 2026 📰 Bali authorities are undertaking the improvement of Candidasa beach in Karangasem. It has long been firmly favored by numerous low-cost hotels. Construction work seriously interferes with tourists to rest. And the renovation will last until the end of 2026. 🌅 Tourists will be able to enjoy sunsets, walks along the beautiful promenade and get more comfortable access to the sea. After the improvement, a decent strip of sand should appear on the beach. @BaliNews #beaches#tourism#Karangasem

Bali News

@balinews · Post #126 · 25.07.2024 г., 13:56

🪧The Balinese public has spoken out against the new beach club in Sanur 🙅‍♂️ No sooner have locals gotten used to the new shopping center in Sanur, now they have to defend the beach as well. Bali Icon Mall opened in June 2024, but not completely - the promised beach club was decided to be completed later. This construction is what the Balinese people oppose. 📰 The population fears that this development could affect the people who choose Sanur as their vacation destination. And if noisy young people flock here, pensioners and families with children may not like it, reports detikbali. @BaliNews #beaches#Sanur#Denpasar

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