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

Резултати

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

Пребарај: #djangocon

当前筛选 #djangocon清除筛选
djangoproject

@djangoproject · Post #591 · 29.03.2018 г., 06:56

https://2018.djangocon.us/ Six days of talks, sprints, and tutorials in San Diego October 14-19 2018 #DjangoCon US has something for everyone, from the person who develops Django applications for a living to the person who just tinkers in their spare time. You'll discover details about a range of diverse applications that people from all over the world are building with Django, get a deeper understanding of concepts you’re already familiar with and discover new ways to use them, and have a lot of fun!

Hashtags

djangoproject

@djangoproject · Post #590 · 29.03.2018 г., 06:46

https://2018.djangocon.eu/ #DjangoCon Europe 2018 in Heidelberg May 23-27, 2018 · Heidelberg, Germany We are trying very hard to make this conference enjoyable to you even before it has started. One of the things we hope will be helpful is this timeline. Please understand that this is a rough timeline – as we cannot see into the future, some things might move around, but we will communicate every noticable change in a blog post!

Hashtags

djangoproject

@djangoproject · Post #371 · 04.07.2017 г., 14:47

https://2017.djangocon.us/news/tutorial-announcement/ #djangocon 🔹From 0 to 100 in Django 🔹How to React the Right Way (Django + React) 🔹Catching Tweets with Django + Django REST Framework 🔹Build a GraphQL API Using Django 🔹Build and Launch a Website on Wagtail, in Three Hours! 🔹Don’t Touch That Dial! An Introduction to Channels

Hashtags

djangoproject

@djangoproject · Post #370 · 04.07.2017 г., 14:18

https://2017.djangocon.us/ #djangocon Six days of talks, sprints, and tutorials by the community for the community. August 13–18 2017 🔸Flourishing FLOSS: Making Your Project Successful (Anna Ossowski) 🔸Functional Programming in an Imperative World. Maybe (Derik Pell) 🔸Understanding JavaScript Libraries via React and the React Ecosystem (Andrew Pinkham) 🔸Becoming a Polyglot: Lessons from Natural Language Learning (Rebekah E. Post) 🔸The Shy Person’s Guide to Tech Conferences (Ed Rivas) 🔸The CoC Committee Is Here for You (Erik Romijn) 🔸hunter2: A Symphony of Password Horror (Lilly Ryan) 🔸Files in Django (Josh Schneier) 🔸Programming Post-Progeny: A New Parent’s Perspective (Jacinda Shelly) 🔸Don’t Use My Grid System (Or Any Others) (Miriam Suzanne) 🔸Butter Smooth, Interactive Applications with Django and Websockets (Ganesh Swami) 🔸The 10 Commandments of Community Organizing (Jennifer Wadella) 🔸Exhausted Octopus Learns a Thing!! (Laura R. Webb) 🔸The Denormalized Query Engine Design Pattern (Simon Willison) 🔸Tasks: You Gotta Know How to Run ‘Em, You Gotta Know How to Safe ’Em (Filipe Ximenes)

Hashtags

djangoproject

@djangoproject · Post #369 · 04.07.2017 г., 14:08

https://2017.djangocon.us/ #djangocon Six days of talks, sprints, and tutorials by the community for the community. August 13–18 2017 🔸Saved You a Click (Or Three): Supercharging the Django Admin with Actions and Views (Liam Andrew) 🔸Django vs Flask (David “DB” Baumgold) 🔸End-to-End Django on Kubernetes (Josh Berkus) 🔸Going Rogue: How Code.org Created a Curriculum Development Platform without their Engineers (Josh Caldwell) 🔸Overcoming the Challenges of Mentoring (Kim Crayton) 🔸Stumbling Through Django and How Not to (Melanie Crutchfield) 🔸Maybe Not the Programmers They Deserved, but the Programmers They Needed (Jessica Deaton and Megan Will) 🔸GraphQL in the Wild (Arianne Dee) 🔸Accessibility Matters: Creating a Better Web (Lindsey Dragun) 🔸Taking Django Distributed (Andrew Godwin) 🔸The Monster on the Project (Tiberius Hefflin) 🔸Python & Spreadsheets: 2017 Edition (Kojo Idrissa) 🔸Type UWSGI; Press Enter; What Happens? (Philip James) 🔸Serverless Django (Rich Jones) 🔸Live long and refactor :vulcan_salute: (Sana Javed) 🔸Preventing Headaches with Linters and Automated Checks (Flávio Junior) 🔸Autopsy of a Slow Train Wreck: the Life and Death of a Django Startup (Russell Keith-Magee) 🔸The Beauty of ViewSets in Django Rest Framework (Buddy Lindsey, Jr.) 🔸Getting the most out of Django’s User Model (Julia M Looney) 🔸Alexa… (Heather Luna aka Heats) 🔸Write an API for Almost Anything (Or The Amazing Power and Flexibility of Django Rest Framework) (Charlotte Mays) 🔸The Power :zap: and Responsibility :sweat: of Unicode Adoption :sparkles: (Katie McLaughlin) 🔸Practical Unit Testing in Django (Wayne Merry) 🔸Using Django, Docker, and Scikit-Learn to Bootstrap Your Machine Learning Project (Lorena Mesa) 🔸Get a Jumpstart on Collaboration and Code Review in GitHub (Katherine “Kati” Michel) 🔸Why Can’t Everyone Just Do What I Want Them To? Leadership, Management, and Working with People Who Don’t Think like You (Briana Morgan)

Hashtags

djangoproject

@djangoproject · Post #368 · 04.07.2017 г., 13:39

http://2017.djangocon.com.au/ #DjangoCon AU: August 4, 2017 #PyCon AU: August 5 - 6, 2017 Sprints: August 7 - 8, 2017 🔷Django and JavaScript: A long and complicated friendship 🔷Bowerbirds of Technology: Architecture and Operations at Less-Than-Facebook Scale 🔷Loop better: a deeper look at iteration in Python 🔷Oh, I Found a Security Issue 🔷Offline Django with Service Workers 🔷hunter2: A Symphony of Password Horror 🔷Multitenant applications: how and why 🔷Horrors of Distributed Systems 🔷Red User, Blue User, MyUser, auth.User