Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016]

Published: 08 July 2023
on channel: 0xdf
350
13

Python Discord is doing an event called Revival of Code, where we work through the 2016 Advent of Code, one challenge every two days. The day 8 challenge, Two-Factor Authentication, processing a set of instructions that manipulate pixels on a 50x6 screen. I'll need to rotate both rows and columns, as well as turn on blocks. At the end, I'll show a fancy automation of the full application.

Repo for Advent of Code 2016 Solutions: https://gitlab.com/0xdf/aoc2016
Intro video for this event:    • Introduction [Revival of Code 2023 - ...  
Real Python post with templates: https://realpython.com/python-advent-...
Python regex: https://pypi.org/project/regex/

☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf

[00:00] Introduction
[00:34] Challenge Part 1
[01:46] genday.sh / input
[02:10] Setting up test fixture
[02:56] test_parse
[05:01] Screen class and _init_
[09:00] Tests for screen tracking
[10:03] Creating screen with deques
[13:25] Tests for Part 1
[14:37] Reorganizing main
[15:15] pixels_on function
[16:41] run function
[18:01] Processing Rect instruction
[22:12] rotate functions
[24:10] Solving Part 1
[24:29] Challenge Part 2
[24:44] to_string function
[25:21] to_string tests (oops!)
[27:15] Finishing to_string
[28:14] Solving Part 2
[29:02] Fancy Animation!


#ctf #adventofcode #revivalofcode #python


On this page of the site you can watch the video online Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016] with a duration of hours minute second in good quality, which was uploaded by the user 0xdf 08 July 2023, share the link with friends and acquaintances, this video has already been watched 350 times on youtube and it was liked by 13 viewers. Enjoy your viewing!