Skip to content

Instantly share code, notes, and snippets.

View grabovszky's full-sized avatar
🎯
Focusing

Kristóf Gábor grabovszky

🎯
Focusing
View GitHub Profile
@grabovszky
grabovszky / aoc_2022_day2_part1.py
Created December 2, 2022 17:03
Advent of Code 2022 Day 2
data = open("input.txt").read()
score = 0
for line in data.split("\n"):
player1, player2 = line.split()
if player2 == "X":
if player1 == "C":
score += 6
if player1 == "A":
@grabovszky
grabovszky / 2022_01_2.py
Created December 1, 2022 08:59
Advent of Code 2022 Day 1 Task 2
data = open("input.txt").read()
current_carried = 0
sum_carried_by_one = []
for food in data.split("\n"):
if len(food) == 0:
sum_carried_by_one.append(current_carried)
current_carried = 0
else:
@grabovszky
grabovszky / 2022_01_1.py
Created December 1, 2022 08:58
Advent of Code 2022 Day 1 Task 1
data = open("input.txt").read()
current_carried = 0
max_carried_by_one = 0
for food in data.split("\n"):
if len(food) == 0:
current_carried = 0
else:
current_carried += int(food)
@grabovszky
grabovszky / zsh-install.md
Created June 18, 2021 11:33
A simple install instruciton for setting up terminator with Oh My Zsh and the Powerlevel 10k theme.
@grabovszky
grabovszky / conventional_commits.md
Last active November 5, 2021 07:47
A specification for adding human and machine readable meaning to commit messages.