Skip to content

Instantly share code, notes, and snippets.

View jcmkk3's full-sized avatar

Kyle Mitchell jcmkk3

View GitHub Profile
import cadquery as cq, math
from typing import Optional
from dataclasses import dataclass
rot_axis_z = ((0, 0, 0), (0, 0, 1))
@dataclass
class Config:
x: float = 18 # Width of key (not keycap) outline; length for thumbs
y: float = 17 # Length of key (not keycap) outline; width for thumbs
@jcmkk3
jcmkk3 / working-with-columns-in-ibis.ipynb
Last active October 10, 2022 00:41
Working with Columns in Ibis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcmkk3
jcmkk3 / Complete2.m
Created November 6, 2022 18:31
Simple tidyr like complete function in Power Query M
// Paste this into new blank query called Complete2
(table as table, columnName1 as text, columnName2 as text) as table =>
let
allColumnNames = Table.ColumnNames(table),
otherColumnNames = List.RemoveMatchingItems(allColumnNames, {columnName1, columnName2}),
crossed = Crossing2(table, columnName1, columnName2),
joined = Table.NestedJoin(crossed, {columnName1, columnName2}, table, {columnName1, columnName2}, "crossing", JoinKind.FullOuter),
expanded = Table.ExpandTableColumn(joined, "crossing", otherColumnNames),
reordered = Table.ReorderColumns(expanded, allColumnNames)
@jcmkk3
jcmkk3 / gifts.md
Last active December 23, 2023 04:53
  • Hario SWITCH Immersion Dripper 03
  • Fellow Stagg Double Wall Carafe
  • Darn Tough socks (Men's 10)
  • Bivo Duo 25 oz (non-insulated) water bottle (any color)
  • Leatherman Micra (stainless steel)
  • 6 pack IPA
  • Bottle of bourbon
  • (Book) Open Circuits: The Inner Beauty of Electronic Components
  • (Book) Q Tips: Fast, Scalable and Maintainable Kdb+
  • (Book) To Mock a Mockingbird
@jcmkk3
jcmkk3 / advent-of-code-2022--day01.R
Created December 19, 2022 00:07
Advent of Code 2022 - Day 1
library(tidyverse)
inventory <- read_csv(
"day01.txt", col_names = "calories", skip_empty_rows = FALSE
)
calories_by_elf <-
inventory |>
mutate(elf = cumsum(is.na(calories))) |>
drop_na() |>
@jcmkk3
jcmkk3 / average_in_many_languages.md
Last active October 6, 2023 17:22
Simple Average in Many Languages

Simple Average in Many Languages

This was an exercise to take a peek at some different languages using a simple algorithm.

Average is an interesting algorithm to compare languanges. It is simple, but has enough complexity to demonstrate some differences between the languages.

Average requires calculating two different summary statistics (sum and count), then combining those two (division) into a single number. An efficient solution would only traverse the collection of numbers once.

Each of these are written as a function that would be given a collection of numbers. Whatever a collection means in that particular language. Some languages have multiple solutions that might have different tradeoffs.

@jcmkk3
jcmkk3 / alpha23332.md
Last active May 12, 2024 04:39
23332 Key Alpha Layouts

hands down neu23332

w c l d _   _ u o y '
r s n t p   k a e i h
_ f m g b   j x , . _

hands down neu23332-hindex

w c l d _   _ y o u '
@jcmkk3
jcmkk3 / config.yaml
Last active July 31, 2023 16:23
ergogen-zenestra
units:
# Parameters
# ==========
capx: 14.5 # Keycap dimensions
capy: 14.5
kx: 15 # Key spacing dimensions
ky: 15
# Constants
# =========