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

Резултати

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

Пребарај: #carlovers

当前筛选 #carlovers清除筛选
Auto Life

@revheadcrypto · Post #405 · 29.08.2024 г., 16:12

🚗💨Manhart Unleashes 200+ Extra Horses on the Toyota Supra!🏎️✨ The stock 3.0L inline-six engine of the Toyota Supra packs a punch with 340 hp. But the tuning experts at Manhart have taken it to the next level, boosting it to an impressive 550 hp and a whopping 770 Nm of torque! ⚡️🔧 But that’s not all! The stunning coupe also features: - Eye-catching aerodynamic body kit 🛠️ - Re-tuned suspension for enhanced performance 🏁 - New wheels for that perfect look! 🖤 🛒 Individual parts available: - Engine upgrade: €11,999 - New exhaust system: €5,050 - Body kit: €13,500 - Wheels: €3,070 per set - Coilovers: €3,100 per set #Manhart#ToyotaSupra#Tuning#CarEnthusiast#PerformanceUpgrade#CarLovers#Auto

Auto Life

@revheadcrypto · Post #448 · 05.09.2024 г., 13:45

🚗✨ Introducing the updated Volvo XC90! ✨🚗 After nearly a decade, the XC90 has received a stunning makeover with a refreshed exterior featuring new headlights, grille, and bumpers. Plus, enjoy an enhanced suspension and a modern media system with a larger screen! 📱🔊 This new XC90 will only be available with hybrid powertrains based on gasoline engines, as the company has phased out diesel options. ⚡️🚫 🔋 The plug-in hybrid XC90 offers an impressive electric range of about 70 km, with a total driving range of 800 km! Meanwhile, mild-hybrid versions with a 48-volt starter-generator reduce fuel consumption by 15%. 🌍💚 #VolvoXC90#Hybrid#Sustainability#Innovation#CarLovers#NewRelease#Auto

Auto Life

@revheadcrypto · Post #377 · 23.08.2024 г., 10:01

🚗💨 Exciting News from Dodge! 💨🚗 Introducing the new 3.0L Hurricane Inline-Six Engine!🌪️✨ Available in two powerful options: - 🔥 426 hp for just $10,495 - ⚡️ 558 hp for $13,745 And that's not all! A third variant boasting around 1000 hp is on the way! 🚀💯 These engines are set to replace the legendary V8 HEMI. Get ready for a thrilling ride! 🏁🔥 #Dodge#HurricaneEngine#Power#Innovation#V8HEMI#CarLovers#Automotive

Auto Life

@revheadcrypto · Post #589 · 19.10.2024 г., 08:26

🚗💨Ferrari Unveils the F80: A New Super Hybrid Rivaling McLaren W1!💨🚗 Introducing the most powerful road model in Ferrari's history! 🔥🏎️ 🔴 Instead of a V12, it features a Le Mans-inspired V6 3.0 with hybrid technology. 🔴 Produces a staggering 900 hp, revving up to 9000 RPM! 🔴 Combined output with electric motors (developed by Ferrari) reaches an astonishing 1200 hp! 🔴 0-100 km/h in just 2.15 seconds! 🔴 0-200 km/h in only 5.75 seconds! 🔴 Top speed of 350 km/h! 🔴 800-volt electrical architecture for ultimate performance! 🔴 Dry weight of 1525 kg! 🔴 Monocoque made from carbon fiber, with aluminum front and rear subframes! The F80 features a two-seat configuration, with a driver-focused cockpit, dubbed "1+." 🏁👤 Its retro design pays homage to the legendary Daytona and F40, generating a whopping ton of downforce at 250 km/h! 🌬️✨ 🚀Availability: Late 2025 💰Starting Price: €3.6 million 🔢 Only 799 units will be produced! #FerrariF80#SuperHybrid#Hypercar#Ferrari#McLarenW1#CarLovers#Auto

Home decor

@dzdigital3 · Post #19403 · 30.01.2026 г., 19:15

When you want your car to be as cozy as your living room 🛋️🚗 #Satisfying#Transformation#DIY#Craftsmanship#UniqueRides#CarLovers#ViralVideo#Reels#FacebookWatch#AmazingCars Full video 👇 https://www.facebook.com/share/r/1Dg1M4jKCs/

Auto Life

@revheadcrypto · Post #635 · 14.11.2024 г., 10:07

🚗💨 Introducing the all-new Brabus Mercedes-AMG S-Class! 🌟 This stunning beast boasts a jaw-dropping 1000 horsepower and a mind-blowing 1820 Nm of torque! 🔥💪 🔧 Under the hood, the 4.5-liter V8 has been meticulously upgraded with a custom turbo system, new pistons, and a fresh ECU tune. Get ready for an exhilarating driving experience! 🏎️💨 ✨ The exterior features aggressive carbon aerodynamic elements and is finished in a unique shade of grey, perfectly complemented by 22-inch forged wheels. 😍🖤 🛋️ Inside, luxury meets style with exquisite grey quilted leather upholstery that takes comfort to the next level. #Brabus#MercedesAMG#SClass#LuxuryCars#CarEnthusiast#1000HP#Performance#AutomotiveDesign#CarLovers#Auto🚘✨

Auto Life

@revheadcrypto · Post #634 · 10.11.2024 г., 16:13

🚀Yangwang U9 Sets New Record!🚀 The incredible Yangwang U9 by BYD has reached a jaw-dropping speed of 391.94 km/h! 🏎️💨 This marks a new record for Chinese cars, surpassing its previous achievement by 17 km/h and far exceeding its official top speed of 309 km/h. To achieve this feat, the 1306-horsepower hypercar underwent significant upgrades, including enhanced aerodynamics, lightweight wheels with track tires, and a software reprogramming. 🔧✨ #YangwangU9#BYD#Hypercar#SpeedRecord#AutomotiveInnovation#CarLovers#Performance#ChineseAutomobile#Auto

Auto Life

@revheadcrypto · Post #321 · 16.08.2024 г., 06:49

🚗💨 Introducing the Naran Hypercar: The Ultimate Powerhouse! 🌟 Get ready for the unveiling of the Naran Hypercar in the UK this August! 🇬🇧 With a staggering 1000 horsepower, this beast promises to be the fastest four-seater car in the world, powered by a traditional internal combustion engine—no electric enhancements! ⚡️❌ Only 39 units will be produced, making it an exclusive masterpiece! 🎨✨ Under the hood, it features a 5.0-liter twin-turbo V8, derived from BMW's impressive 4.4-liter engine. 🏎️💥 And yes, it comes with full-wheel drive for that ultimate driving experience! 🌍🚀 #NaranHypercar#CarEnthusiasts#AutomotiveExcellence#V8Power#Hypercar#FastestCar#LuxuryCars#CarLovers#InnovativeEngineering

Auto Life

@revheadcrypto · Post #241 · 04.08.2024 г., 10:11

🚗✨ Introducing the all-new AC Cobra GT Coupe! 🌟 For the first time in history, this iconic sports car is getting a hardtop version, and it's set to be produced in series! 🏁💨 With stunning carbon body panels, the Coupe is not only beautiful but also powerful! 💪🔥 Choose between two roaring V8 engines: 565 or 730 horsepower! Starting at just £325,000, this masterpiece is ready to hit the roads! 💷🚀 #ACCobra#SportsCar#CarEnthusiast#LuxuryAutomobile#V8Power#CobraGT#CarLovers#IconicDesign#AutomotiveExcellence