Automating with Python | Creating and classifying files
Websites, Machine Learning, REST APIs... Professional Python has a lot of uses. But Python can also help us with mundane tasks, for example, automating repetitive tasks.
On the first part of the video, we are going to generate randomized students reports, containing random names, subjects, date of file creation, subjects and marks. And also how to delete only the .txt files generated to clean our folder.
On the second one, we are going to read the files, count how many failed subjects the student has, rename the file by adding it passed or failed, moving the file to a 'passed' or 'failed' folder, and then zipping both folders into .zip files
In this video you’ll learn how to:
Create files
Read files
Delete files
Rename files
Move files
Randomize the content of the files
Zipping folders
Passing down arguments to the script
and more. With just using Python, no packages nor modules needed.
╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
00:47 - First script: The files generator
01:42 - Processing files with Python
02:28 - Passing arguments when running a script
03:54 - Generating reports | An explanation
06:27 - How to use zfill
07:54 - Creating files in Python with 'with open'
08:20 - Shuffling elements in a list
12:05 - Creating the file's text.
13:22 - Deleting files
14:13 - Second script: The classifier one
14:43 - Processing the reports
14:54 - Generating folders
15:20 - Reading all the files
16:18 - Checking if a student has passed or failed
18:28 - Moving and renaming files
20:14 - Zipping files
20:35 - Conclusion
╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
Reading files with Python:
https://docs.python.org/3/tutorial/inputoutput.html
High-level operations:
https://docs.python.org/3/library/shutil.html
╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
Subscribe to the channel:
https://www.youtube.com/channel/UC9OLm6YFRzr4yjlw4xNWYvg?sub_confirmation=1
Text version:
https://letslearnabout.net/tutorial/automating-with-python-creating-and-classifying-files/
Twitter:
https://twitter.com/DavidMM1707
GitHub:
https://github.com/david1707/auto_teacher
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Automating with Python | Creating and classifying files», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.