advent-of-code-one-liners

🐍📅 One-line Python solutions for Advent of Code 2022 and 2023. (by savbell)

Advent-of-code-one-liners Alternatives

Similar projects and alternatives to advent-of-code-one-liners

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better advent-of-code-one-liners alternative or higher similarity.

advent-of-code-one-liners reviews and mentions

Posts with mentions or reviews of advent-of-code-one-liners. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-08.
  • -❄️- 2023 Day 9 Solutions -❄️-
    196 projects | /r/adventofcode | 8 Dec 2023
    Today beats yesterday as my fastest solve! Fairly short too, so I'll include my one-line solutions in-line. q[9] contains the input. Here is my updated visual of the Basilisk, which combines all my one-line solutions into a single, disgusting line of code!
  • -❄️- 2023 Day 8 Solutions -❄️-
    200 projects | /r/adventofcode | 7 Dec 2023
    Here's today's one-liners! Part 1 on line 40 and Part 2 on line 66.
  • -❄️- 2023 Day 7 Solutions -❄️-
    262 projects | /r/adventofcode | 7 Dec 2023
    Day 7 Parts 1 & 2 in a single line of Python (one-liners on lines 60 and 105; multi-line solutions above them).
  • [2023 Days 1-6] [Python] Visualizing the length of the Basilisk, my Python one-liner that solves all the puzzles so far!
    2 projects | /r/adventofcode | 7 Dec 2023
    This visualization shows the number of characters in my one-line solutions for each part of each day. I actually wrote up a small script to automatically count the characters, calculate their percent of the whole, pick a proportional colour on a rainbow gradient, and save the rainbow line in an SVG file so I can easily use that as the snake's fill colour. This way, I can update the visualization each day as soon as I finish coding the solution. (Don't worry, I won't spam the subreddit with them — it's just for my own antics!) The automation script is here, if anyone is interested.
  • -❄️- 2023 Day 6 Solutions -❄️-
    298 projects | /r/adventofcode | 6 Dec 2023
    Here's my one-line solution for Day 6, both parts in one, with q[6] as the input file:
  • -❄️- 2023 Day 5 Solutions -❄️-
    149 projects | /r/adventofcode | 5 Dec 2023
    A day late to post, but here is my one-line Python solution for both parts of Day 5! q[5] has the input file contents.
  • Using __import__() for the same package multiple times within the same line of code?
    2 projects | /r/learnpython | 4 Dec 2023
    I know that title is scary. But just like last year, I'm trying to solve as many days of Advent of Code in a single line of Python as I can. Because of this restriction, I'm using __import__('re') so I can use RegEx in my solutions rather than using the import statement (since that would add an additional line). But this means I have multiple instances that look like __import__('re').findall(r'\d', l) within a single line (as seen here). My question is: what is the impact of this? Is it importing the module every time it is called, or is it considered fully imported after the first call and just referenced in future calls? Is there any other/better way of doing this?
  • A note from our sponsor - WorkOS
    workos.com | 27 Apr 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic advent-of-code-one-liners repo stats
7
110
7.7
4 months ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com