Skip to content

Instantly share code, notes, and snippets.

@glitchcowboy
glitchcowboy / pygame-one.py
Created January 16, 2024 03:13
pygame-one
# Import the pygame module
import pygame
# Import random for random numbers
import random
# Import pygame.locals for easier access to key coordinates
# Updated to conform to flake8 and black standards
from pygame.locals import (
RLEACCEL,
K_UP,
@glitchcowboy
glitchcowboy / day4-part2-broken.py
Last active January 9, 2024 03:15
day4-part2-barak
import pandas as pd
def main():
df = pd.read_csv('input.txt', delim_whitespace=True, header=None)
total_score = 0
df.insert(0, 'count_multiplier', 1) # set up an initial count multiplier field
for row in range(df.shape[0]):
row_score = 0
@glitchcowboy
glitchcowboy / day-4.py
Last active January 8, 2024 20:31
Glitchcowboy's Day4 part 1 in python
import pandas as pd
#borrowed some things from deom23
def main():
df = pd.read_csv('input.txt', delim_whitespace=True, header=None)
total_score = 0
for row in range(df.shape[0]):
row_score = 0
winners, numbers_i_have = df.iloc[row, 2:12].tolist(), df.iloc[row, 13:39].tolist()
correct = [x for x in numbers_i_have if x in winners]
@glitchcowboy
glitchcowboy / AoC-Day3-regexified.py
Created January 6, 2024 13:25
AoC-Day3-regexified
import pandas as pd
import re
def main():
df = pd.read_csv("input.txt", index_col=False)
re_number = re.compile(r'\d')
re_spec_char = re.compile(r'[*&%\-/#&$@+=]')
re_spec_char_dot = re.compile(r'[*&%\-/#&$@+=.]')
@glitchcowboy
glitchcowboy / aoc-day1.go
Created January 3, 2024 15:49
AoC-Day1.go
package main
import (
"os"
"encoding/csv"
"regexp"
"fmt"
"strings"
"strconv"
)
@glitchcowboy
glitchcowboy / AoC-Day1-broken.go
Created January 3, 2024 15:32
AoC-Day1-broken.go
package main
import (
"encoding/csv"
"os"
//"strings"
"regexp"
"fmt"
//"strings"
//"strconv"
mkdir ops
cd ops
git clone [email protected]:apfcu/stratus/ops/git-hooks.git
cd [infrastructure repo]
cp ops/git-hooks/commit-msg infrastructure/.git/hooks/
cp ops/git-hooks/pre-commit infrastructure/.git/hooks/
@glitchcowboy
glitchcowboy / mypublickey.txt
Created September 26, 2022 18:14
My Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEYn4wpRYJKwYBBAHaRw8BAQdA5sGRd3rWkV8b4hRJa1P71hWCP3ycaTKCy5QK
tesbQt60KUJhcmFrIEdyaWZmaXMgPGJncmlmZmlzQGFmZmluaXR5cGx1cy5vcmc+
iJkEExYKAEEWIQQrDoqxb8feh+ptYmmkS7V5hPS1+gUCYn4wpQIbAwUJA8JnAAUL
CQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgAAKCRCkS7V5hPS1+o6kAPwIYeccuIHg
ddMPyGEJFp6XOJE86VYzDV0IOMnOvV9FDgEAs3DHGpzlPhCAxGWJ0Z6xcDo7sqMP
DskKuZ+4MVV91wu4OARifjClEgorBgEEAZdVAQUBAQdAdMhgso6bwcVB5BTVIeC5
mc2LC0qGRH3LwVCFxbvHJEsDAQgHiH4EGBYKACYWIQQrDoqxb8feh+ptYmmkS7V5
hPS1+gUCYn4wpQIbDAUJA8JnAAAKCRCkS7V5hPS1+mnfAP96/v2HGV5UQ1+snRSf
4075225050204455
4075225044992642
4075225057936686
4075225037795918
4075225043760533
4075225018004744
4075225022689304
4075225060119055
4075225058023211
4075225034304301
Kris Ciesielski