File Diff in Python From Scratch

preview_player
Показать описание
Chapters:
- 00:00:00 - 1. Intro
- 00:06:07 - 2. Implementing Diff
- 00:10:04 - 2.1. Parsing Command Line Arguments
- 00:14:07 - 2.2. Reading Files
- 00:20:04 - 2.3. Running Levenshtein Algorithm on the Files
- 00:22:13 - 2.3.1. Edit Graph Representation
- 00:28:35 - 2.3.2. Levenshtein Algorithm in Bioinformatics
- 00:30:11 - 2.3.3. Populating the Edit Graph
- 00:47:05 - 2.3.4. Recovering the Edit Script
- 00:55:44 - 2.4. Custom Diff Format
- 00:57:37 - 3. Implementing Patch
- 00:58:55 - 3.1. GitHub Repo
- 01:00:53 - 3.2. Subcommands
- 01:11:19 - 3.3. Levenshtein for Subcommand Names
- 01:12:59 - 3.4. Factoring out Levenshtein Algorithm
- 01:14:54 - 3.5. Global List of Subcommands
- 01:22:48 - 3.6. Falling into OOP trap
- 01:25:50 - 3.7. Pretty-Printing the Usage
- 01:29:10 - 3.8. Help Subcommand
- 01:29:33 - 3.8.1. Python scoping
- 01:32:27 - 3.8.2. Static type checking for Python
- 01:38:48 - 3.9. Detecting typos in subcommand names
- 01:49:22 - 3.10. Python `self` binding problem
- 01:52:36 - 3.11. Implementing the Patch Subcommand
- 01:54:13 - 3.11.1 Parsing the Patch
- 02:07:21 - 3.11.2 Applying the patch
- 02:21:54 - 4. QnA
- 02:24:34 - 5. Outro
- 02:24:46 - 6. Smooch

References:
Рекомендации по теме
Комментарии
Автор

Congrats on being so consistent. I have huge respect for you and thank you for inspiring the audience to keep coding.

martinduchev
Автор

Loved this stream as a bioinformatician! If you want to look into the applications of distances between strings in bioinformatics I suggest in taking a look at phylogeny algorithms, super cool stuff

TrickOrTheatre
Автор

You try to install a Python library and get an NPM error, that sums up everything.

kibels
Автор

Great as always, all your stuff is so interesting! And btw, drawing the matrix made it so much easier to understand. Keep on doing that!

chillydill
Автор

New camera? looks great!! cool idea for a python tool too...

joshuathomasbird
Автор

The sharp corners of the thumbnail look really nice in light mode 😂

Erik
Автор

Damn bro is out here reinventing Smith-Waterman hahahha

great stream !

hugoavila
Автор

@TsodingDaily small help on 1:35:16 with accessing "program" from the subcommand function: you can just raise an exception/error and print nice mesage from main function.

fxs
Автор

So annoying when tsoding can't use python properly, ugh. Anyway, I like the streams a lot. They gave me a few interesting ideas

postmodernist
Автор

Isn't just copying file2 to file1 easier?

SiddharthPanda_infinity_crew
Автор

8:14 THE ABSOLUTE STATE OF OSS LOL THAT'S *R O U G H*

GiovanniCKC
Автор

You should've implement two separate scripts, so you follow the mantra: a tool does one job and does it flawlessly. In addition you can chain those scripts in a pipeline if the `apply` script can read patch from `stdin`

neshkeev
Автор

It seems you are from Ukraine :) Olivec is quite similar to олівець in Ukrainian. Nevertheless, great content!

mishadrug