Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Learn Python E5: File Handling | Jameson

Автор: tipsy_python

Загружено: 2020-04-29

Просмотров: 69

Описание:

Read and write files with Python. Learn about file handling with Python to persist data to hard-drive to retrieval when it's needed.

Season 1 - Episode 5 | Featuring: Jameson Irish Whiskey

In this video, we briefly touch on the os (operating system) module from the Python standard library and discuss a couple uses for it.

In the majority of the video I demonstrate ways to use the open function to open files on your machine for reading and writing - programatically with Python. We learn about the read and write modes of the open function to perform different operation on text files.

While we can implement the open function by opening and closing the file, I demonstrate best practice of using a context manager to handle the external resource management with Python - sounds hard, but is very simple and makes file handling very easy. I also touch on the underlying file pointer and how to reset the pointer position in the code with the .seek() method.

Most data files that we consume programatically are structured data files. We'll walk through opening a .dsv file (delimiter seperated values - in this case the text file contains values separated by pipe). We will use the .split() method in a couple different ways to construct iterables of rows and values for processing.

For the final exercise, we will start a new command line app that will keep track of my whiskey tasting notes. The major usability flaw of the sales tax calculator was that we were not able to save the state of the app - we couldn't save the data. For the new whiskey review app, we will build-in the ability to save the app data to a file so that state of the app is persisted between sessions. NOTE: mid-exercise I do make a mistake that is corrected later in the video - the mistake is called out in a text-box on-screen when it occurs (sorry guys).


Source Code on Github: https://github.com/joshah-moors/tipsy...

I hope you find these videos helpful, and I look forward to interacting with you in the comments~

Learn Python E5: File Handling | Jameson

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Learn Python E6: Dictionaries & JSON | Jameson Black Barrel

Learn Python E6: Dictionaries & JSON | Jameson Black Barrel

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

БЕЗ VPN👉 ТОП ОБНОВЛЕНИЕ Как обойти ВСЕ блокировки на Андроид! Обход блокировки Воцап, Ютуб, Телега

БЕЗ VPN👉 ТОП ОБНОВЛЕНИЕ Как обойти ВСЕ блокировки на Андроид! Обход блокировки Воцап, Ютуб, Телега

Learn Python E1: Variables & DataTypes | Blanton's

Learn Python E1: Variables & DataTypes | Blanton's

Learn Python E11: The Whiskey Episode

Learn Python E11: The Whiskey Episode

16 УДИВИТЕЛЬНЫХ ФУНКЦИЙ VLC, о существовании которых вы не знали! 2026

16 УДИВИТЕЛЬНЫХ ФУНКЦИЙ VLC, о существовании которых вы не знали! 2026

Долбануть по Ирану, отжать Гренландию | Обычный вторник Трампа? (English subtitles)

Долбануть по Ирану, отжать Гренландию | Обычный вторник Трампа? (English subtitles)

Рабочая музыка для глубокой концентрации и сверхэффективности

Рабочая музыка для глубокой концентрации и сверхэффективности

Маска подсети — пояснения

Маска подсети — пояснения

LLM fine-tuning или ОБУЧЕНИЕ малой модели? Мы проверили!

LLM fine-tuning или ОБУЧЕНИЕ малой модели? Мы проверили!

All  Videos

All Videos

Вайбкодинг для новичков: сайт с нуля за 60 минут

Вайбкодинг для новичков: сайт с нуля за 60 минут

Что происходит с нейросетью во время обучения?

Что происходит с нейросетью во время обучения?

Первый взгляд на новый одноплатный компьютер Orange pi 4 pro. Тест производительности.

Первый взгляд на новый одноплатный компьютер Orange pi 4 pro. Тест производительности.

Делаю нейросеть с нуля

Делаю нейросеть с нуля

The Windows 11 Disaster That's Killing Microsoft

The Windows 11 Disaster That's Killing Microsoft

Градиентный спуск, как обучаются нейросети | Глава 2, Глубинное обучение

Градиентный спуск, как обучаются нейросети | Глава 2, Глубинное обучение

Streamlit: самый быстрый способ создания приложений Python?

Streamlit: самый быстрый способ создания приложений Python?

Выучите R за 39 минут

Выучите R за 39 минут

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com