Skip to content

Instantly share code, notes, and snippets.

View kjhf's full-sized avatar

Slate kjhf

View GitHub Profile
@kjhf
kjhf / S3 Titles.py
Created August 31, 2023 11:21
Funny titles for Splatoon 3
import csv
if __name__ == '__main__':
path = input("Titles csv?").strip("\"")
adjectives = []
subjects = []
line_count = 0
with open(path) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
@kjhf
kjhf / Splashtag Titles.html
Created August 31, 2023 11:19
Splashtag Titles as wikimarkup for Inkipedia for Splatoon 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Splashtag Titles</title>
<style>
:root {
color : #000000;
@kjhf
kjhf / splatoon_ttk.py
Created August 2, 2023 23:08
time to splat combinations calc
from itertools import combinations_with_replacement
from collections import namedtuple
Attack = namedtuple('Attack', ['damage', 'label'])
TARGET_DAMAGE = 99
"""If the combo has total damage above this, it is recorded"""
MAX_ATTACKS = 3
"""The maximum number of attack attempts to hit the target"""
@kjhf
kjhf / main.py
Created April 7, 2023 21:28
Guriddo compartment helper
import ast
from typing import Union
def is_contiguous(lst: list[int]) -> bool:
"""Checks if a list of integers is contiguous.
A list is considered contiguous if each element is equal to the
previous element plus one.
# Go to https://steamcommunity.com/profiles/76561198009621091/inventory/#250820 which is the inventory for SteamVR for me
# Open the inspect (Ctrl-shift-C)
# This will also resize the window to display everything
# Copy the inventory_page HTML element
# There should be as many hits for "itemHolder" as there are items in this inventory. If not, make sure the JS has fully rendered
# Paste in the line when prompted by the scratch.
import re
from collections import Counter
if __name__ == '__main__':
@kjhf
kjhf / UnitTestsTODO.md
Created December 30, 2020 13:58
Unit tests edge cases philosophy

On ordering a beer...

Positive tests:

  • Order a beer.
  • Order two beers.
  • Order a beer then another beer.
  • Order a round. Make sure all friends receive their beers (and the correct one)
  • Have several friends order beers at the same time.
  • Order a beer for later.
  • Order the menu.