Skip to content

Instantly share code, notes, and snippets.

View Ricyteach's full-sized avatar

Rick Teachey Ricyteach

  • KBJW Group
  • Ohio
View GitHub Profile
@Ricyteach
Ricyteach / immigration.MD
Created January 16, 2026 01:44
A Conversation About Immigration Enforcement

A Conversation About Immigration Enforcement

MAYA: Hey, so I wanted to ask you about something. I've been seeing all this stuff about ICE raids and deportations under Trump, and I know we disagree on this, but I genuinely want to understand your position. I promise I'll try not to be judgmental, though I might push back a bit. Fair?

ALEX: Yeah, fair enough. What do you want to know?

MAYA: Okay, so basically - what Trump's doing with ICE right now feels really extreme to me. Breaking car windows with kids inside, arresting people at churches, detaining people with no criminal records. It just seems cruel. How do you justify that?

ALEX: I don't love it. I'm not sitting here cheering about families being separated or people being scared. But I think to understand my position, you need to look at what happened under Biden first.

@Ricyteach
Ricyteach / test_fixture_parallelization.py
Created November 15, 2021 14:58
fixture parallelization using the pytest.mark.parameterize indirect=True argument
import pytest
@pytest.fixture(name="keys")
def keys_fixture(request):
"""A seq of keys"""
return request.param
@pytest.fixture(name="values")
@Ricyteach
Ricyteach / minilang.py
Created November 7, 2021 03:02
Implementation of parser for the formation specification mini language
'''Tools for parsing the format specification mini language used by the ``format`` built-in function.
See the string module docs for more information.
The mini language parsing functionality is not exposed in cPython and has therefore been re-implemented
here.'''
from collections import namedtuple as nt
import re
# only mini-language types
@Ricyteach
Ricyteach / equal.py
Created October 26, 2021 15:16
Utility module for checking internal equality of Collections and efficiently getting back an iterator
"""Utility module for checking internal equality of Collections and efficiently getting back an iterator."""
import itertools
from typing import NamedTuple, TypeVar, Iterator, Collection, Union
T = TypeVar("T")
class _NotEqual:
def __repr__(self):
@Ricyteach
Ricyteach / curry_helper.py
Created October 18, 2021 13:34
Proof of concept for an API providing more "English-like" function calls
"""Proof of concept for an API providing "English-like" function calls.
See original python-ideas [thread](https://mail.python.org/archives/list/python-ideas@python.org/thread/YMFRX6K22TZNNAP2PPVV7RGNI5HLC764/#WF232SOAJJWM33ZAY327OAPCONFOUXVX).
API:
```
from curry_helper import curry_helper
# apply the curry_helper decorator with a list of function "suffixes"
@Ricyteach
Ricyteach / load_combination.py
Last active October 19, 2021 21:48
Basic Load Combination API v0.3
"""API for implemenating the concept of civil engineering load combinations.
Compose a string representing a load combination expression:
>>> expr = "1.6*D & 1.2*L & 0.5*(S | Lr | W)"
Create a `Combination` object using the load combination expression, and generate a multiplication matrix:
>>> from ceng.load import Combination
>>> combo_obj = Combination(expr)
>>> combo_obj.matrix
array([[1.6, 1.2, 0.5, 0. , 0. ],