Skip to content

Instantly share code, notes, and snippets.

View gordol's full-sized avatar

Gordo Lowrey gordol

View GitHub Profile
@gordol
gordol / rfc-001.md
Created July 21, 2025 21:03
Architecture Decision Records

Architectural Decision Records (ADRs)

Author(s):

Gordo Lowrey - Architect

Date:

February 2024

Summary

This document proposes the adoption of a process to document the architectural decisions made during the software development process. ADRs aim to provide clarity, rationale, and context for important architectural decisions.

@gordol
gordol / rfc-000.md
Created July 21, 2025 21:01
RFC Process

RFC Process

Author(s):

Gordo Lowrey - Architect

Date:

February 2024

Summary

This document outlines a proposed process for documenting proposals, discussing ideas, and making decisions in a structured, transparent, and collaborative manner.

Architecture as a Discipline

Author(s):

Gordo Lowrey - Architect

Date:

September 2024

Summary and Purpose

Architecture provides the foundation for aligning technical solutions with business goals, managing complexity and enabling efficient data processing, while ensuring that systems remain secure, performant, and adaptable to future needs. This document seeks to define architecture as a discipline, developing a culture where architectural thinking is embedded in daily practice. Architecture is not the sole responsibility of architects, but a shared discipline that drives consistency, scalability, and long-term success. By instilling architectural principles, all teams will create an ecosystem that is efficient, maintainable, and aligned with business objectives.

@gordol
gordol / 2024-09-architect-engagement-process.md
Created September 23, 2024 22:03
Architect Engagement Process

Architect Engagement Process

Author(s):

Gordo Lowrey - Architect

Date:

September 2024

Summary

This document attempts to establish an Architect Engagement Process. The goal is to ensure structured, efficient, and scalable communication between the architect and various teams (product, engineering, data science, etc). This process outlines the primary architecture concerns, and defines how and when teams should engage for architectural consultation.

@gordol
gordol / CaseClass.py
Created March 22, 2021 21:54 — forked from breeko/CaseClass.py
Scala's case class built out for Python
def CaseClass(case_class_name, **kwargs):
types = {}
for k, v in kwargs.items():
if type(v) is not type:
raise ValueError("{} is not a type".format(v))
types[k] = v
class CaseClassImpl():
initialized = False
from typing import Optional, List, Literal, Tuple, Generator, Union
class PizzaGrid:
"""A simple class to encapsulate the needed state and helper constructs to orchestrate pizza deliveries.
You may pass in optional start_coords as a tuple of x/y coodinates.
You can spin up a goat to help the human courier by setting the with_goat boolean.
You can ignore invalid commands, or throw an exception, with the ignore_invalid_commands boolean.
@gordol
gordol / test.sql
Created November 4, 2020 22:31
Corrupt data landing in s3 via aws_s3.query_export_to_s3 extension
-- When using aws_s3.query_export_to_s3, on Aurora Postgres, version 11, data is reliably and predictably corrupted at certain positions of the payloads that land in s3.
-- It seems that when data falls over a certain byte length, it is reset and resent mid-stream to s3.
-- We have been able to reproduce this positively, as well as reproduce a negative as well; ensuring that data falls at powers of 2 on even byte lengths seems to prevent this issue from occurring.
-- As the length of data increases, as does the frequency of the corruption. For small data sets, it may never surface.
-- You will see upon running this SQL that it occurs once in 100,000 records with 128+9 byte length records, twice for 256+9, and 4 times for 512+9, and so-on, where each record looks like {"A":""}\n where \n is a new line control character, amounting to 9 extra bytes on top of the value in the JSON objects.
-- these queries will result in broken json in s3
select * from aws_s3.query_export_to_s3(
'select row_to_json(test) fr
@gordol
gordol / flatten.py
Last active October 9, 2019 00:50
Example code that flattens an arbitrarily nested array of integers into a flat array of integers.
#!/usr/bin/env python3
import unittest
def flattenIntArray(arr):
'''Yield flattened elements from input array'''
for element in arr:
try:
yield from flattenIntArray(element)
@gordol
gordol / prime-challenge-numpy.py
Last active September 28, 2019 07:22
A simple little module to complete the prime number challenge. Includes 4 tests. This variant is using NumPy. To run the tests, run: `python -m unittest prime-challenge-numpy`
#!/usr/bin/env python
import unittest
from sympy import sieve
import numpy as np
def generatePrimes(num_primes):
"""
Returns an array of primes.