{"id":19135900,"url":"https://github.com/glasstoestudio/adventofcode_2020","last_synced_at":"2025-07-31T06:33:35.027Z","repository":{"id":209875749,"uuid":"317590563","full_name":"GlassToeStudio/AdventOfCode_2020","owner":"GlassToeStudio","description":"https://adventofcode.com/2020","archived":false,"fork":false,"pushed_at":"2020-12-13T15:47:02.000Z","size":104212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T18:18:34.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GlassToeStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-12-01T15:50:14.000Z","updated_at":"2020-12-13T15:47:04.000Z","dependencies_parsed_at":"2023-11-29T16:41:20.530Z","dependency_job_id":null,"html_url":"https://github.com/GlassToeStudio/AdventOfCode_2020","commit_stats":null,"previous_names":["glasstoestudio/adventofcode_2020"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GlassToeStudio/AdventOfCode_2020","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FAdventOfCode_2020","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FAdventOfCode_2020/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FAdventOfCode_2020/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FAdventOfCode_2020/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlassToeStudio","download_url":"https://codeload.github.com/GlassToeStudio/AdventOfCode_2020/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FAdventOfCode_2020/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267998108,"owners_count":24178459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T06:32:36.740Z","updated_at":"2025-07-31T06:33:35.001Z","avatar_url":"https://github.com/GlassToeStudio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent Of Code 2020\nAdvent of Code 2020 https://adventofcode.com/2020\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 1: Report Repair\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 1 provides an expense report with which one must search through each entry and find the pair that total 2020. Then find the triplet that totals 2020.\n\n```\n1721\n979\n366\n299\n675\n1456\n```\n\n### Part 1:\nFor every entry in the list, compare it with every other entry until once pair totals 2020. \n\n### Part 2:\nSame as part 1 but check every triplet in the same manner as before.\n\nAdded in some early outs in case there was no chance of a solution for any particular pair. Additionally, the data was sorted in ascending order to speed up operations. \n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 2: Password Philosophy\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 2 provides a list of passwords along with some criteria for validity. Where you are given two numbers and one character. The numbers being the min and max occurrences for the given char in the respective password.\n\n```\n1-3 a: abcde\n1-3 b: cdefg\n2-9 c: ccccccccc\n```\n\n### Part 1:\nParse the data to extract the min, max, and special char and the password. Check the occurrences of the char in the password and verify it is within the min and max allowed.\n\n### Part 2:\nThe rules change such that the numbers are now indices of where the char can occur in the password, but it can only occur in one of the two indices to be valid. For a little extra challenge, the numbers are not 0 based as is typical in programming languages. Check each index for the char and return a valid result only if one occurs.\n\nAdded in a regex version as well as built-in methods to solve.\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 3: Toboggan Trajectory\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 3 provides a map of trees for a given region. This region repeats the tree pattern out to the right. Each '#' indicates a tree. One must find all trees hit based on a given trajectory (slope)\n\n```\n..##....... ---\u003e\n#...#...#..\n.#....#..#.\n..#.#...#.#\n.#...##..#.\n..#.##..... ...\u003e\n.#.#.#....#\n.#........#\n#.##...#...\n#...##....#\n.#..#...#.# ---\u003e\n```\n\n### Part 1:\nGiven a slope of (3, 1) calculate the number of tees hit - points on the path with \"#\".\n\n### Part 2:\nGiven a number of slopes,[(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)] calculate the trees hit for each slope and find the product of them all.\n\n### Created a little gif to show part one in action\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/GlassToeStudio/AdventOfCode_2020/blob/master/Day_03/AoC_day3_p1.gif\" width=\"50%\" height=\"50%\"\n\u003c/p\u003e\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 4: Passport Processing\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 4 number of key:value pairs for a given set of passport data all separated by a blank line. One must parse the data and check that the required fields are present.\n\n```\necl:gry pid:860033327 eyr:2020 hcl:#fffffd\nbyr:1937 iyr:2017 cid:147 hgt:183cm\n\niyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884\nhcl:#cfa07d byr:1929\n\nhcl:#ae17e1 iyr:2013\neyr:2024\necl:brn pid:760753108 byr:1931\nhgt:179cm\n\nhcl:#cfa07d eyr:2025 pid:166559648\niyr:2011 ecl:brn hgt:59in\n```\n### Required felids (except cid)\n\n```\nbyr (Birth Year)\niyr (Issue Year)\neyr (Expiration Year)\nhgt (Height)\nhcl (Hair Color)\necl (Eye Color)\npid (Passport ID)\ncid (Country ID)\n```\n\n### Part 1:\nBreak down the data in separate passports then break out each key:value pair of fields. Check that the required fields are present and count the total number of valid passports.\n\n### Part 2:\nEach field now required some data validation. Check each field against its respective criteria and find the total number of valid passports.\n\n```\nbyr (Birth Year) - four digits; at least 1920 and at most 2002.\niyr (Issue Year) - four digits; at least 2010 and at most 2020.\neyr (Expiration Year) - four digits; at least 2020 and at most 2030.\nhgt (Height) - a number followed by either cm or in:\nIf cm, the number must be at least 150 and at most 193.\nIf in, the number must be at least 59 and at most 76.\nhcl (Hair Color) - a # followed by exactly six characters 0-9 or a-f.\necl (Eye Color) - exactly one of: amb blu brn gry grn hzl oth.\npid (Passport ID) - a nine-digit number, including leading zeros.\ncid (Country ID) - ignored, missing or not.\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 5: Binary Boarding\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 5 provides a list of instructions for calculating a row, column and seat id for a given line of input. The instructions state to perform somewhat of a binary search, in that one must continuously take either the upper or lower half of some range until a single value is left. Do this for the first 7 characters of the input, then again for the last 3 characters. The two values are then used to calculate a seat id. Once all seat ids are found, locate the seat id that is missing from the others. \n\n```py\nBFFFBBFRRR\n\ndef get_seat_id(row, column):\n    return row * 8 + column\n```\n\n### Part 1:\nFor every line of input, split out the first 7 and last 3 characters. Based on each value, take either the upper or lower half of a given range (128 and 8, respectively). Take these two values and calculate a seat id.\n\n### Part 2:\nFor every seat id, find which one is missing from the total range of seat ids (128 * 8). However, not all seat ids are actually available, so to find the missing seat, find also that its neighbors (+1 and -1) are not missing. \n\n```py\nif seat + 1 not in missing_seats and seat - 1 not in missing_seats:\n``` \n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 6: Custom Customs\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 6 provides a list of groups of answers, each answer being a letter of the alphabet noting a answer of yes for one of 26 questions.\n\n```\nabc\n\na\nb\nc\n\nab\nac\n\na\na\na\na\n\nb\n```\n\n### Part 1:\nFor every groups of answers, find ANY response of yes. (Union). \n\n### Part 2:\nFor every group of answers, find responses where ALL answered yes. (Intersection)\n\n\n### Created some visuals of the data\n#### Part 1\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/GlassToeStudio/AdventOfCode_2020/blob/master/Day_06/day_6_part_1.PNG\" width=\"100%\" height=\"100%\"\n\u003c/p\u003e\n\n#### Part 2\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/GlassToeStudio/AdventOfCode_2020/blob/master/Day_06/day_6_part_2.PNG\" width=\"100%\" height=\"100%\"\n\u003c/p\u003e\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 7: Handy Haversacks\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 7\n\n```\nlight red bags contain 1 bright white bag, 2 muted yellow bags.\ndark orange bags contain 3 bright white bags, 4 muted yellow bags.\nbright white bags contain 1 shiny gold bag.\nmuted yellow bags contain 2 shiny gold bags, 9 faded blue bags.\nshiny gold bags contain 1 dark olive bag, 2 vibrant plum bags.\ndark olive bags contain 3 faded blue bags, 4 dotted black bags.\nvibrant plum bags contain 5 faded blue bags, 6 dotted black bags.\nfaded blue bags contain no other bags.\ndotted black bags contain no other bags.\n```\n\n### Part 1:\n \n### Part 2:\n\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 8: Handheld Halting\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 8 - our first VM\n\n```\n```\n\n### Part 1:\nFor every groups of answers, find ANY response of yes. (Union). \n\n### Part 2:\n\n### Visusal\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/GlassToeStudio/AdventOfCode_2020/blob/master/Day_08/AoC_day8_vis.gif\" width=\"100%\" height=\"100%\"\n\u003c/p\u003e\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 9: Encoding Error\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 9 - Window search\n\n```\n```\n\n### Part 1:\n\n### Part 2:\n\n### Visusal\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/GlassToeStudio/AdventOfCode_2020/blob/master/Day_09/day_09_part_1_2_square.gif\" width=\"100%\" height=\"100%\"\n\u003c/p\u003e\n\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 10: Adapter Array\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 10 - Dynamic Programming (apparently).\n\n```\n```\n\n### Part 1:\n\n### Part 2:\n\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDay 11: Seating System\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nDay 11 - Conways Game of Life... ish\n\n```\n```\n\n### Part 1:\n\n### Part 2:\n\n\n\u003c/p\u003e\n\u003c/details\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglasstoestudio%2Fadventofcode_2020","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglasstoestudio%2Fadventofcode_2020","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglasstoestudio%2Fadventofcode_2020/lists"}