Skip to content

Instantly share code, notes, and snippets.

View ejlangev's full-sized avatar

Ethan Langevin ejlangev

View GitHub Profile
{
"esformatter": {
"allowShebang": true
},
"plugins": [
"esformatter-remove-trailing-commas",
"esformatter-collapse-objects",
"esformatter-remove-object-spaces"
],
name: Compliance check
on:
pull_request:
types: [opened, edited, reopened, synchronize]
issue_comment:
types: [created, edited, deleted]
jobs:
compliance-check:
require 'pp'
require 'ostruct'
data = File.open('Query Results.csv').map do |l|
pieces = l.tr('{}"', '').strip.split(',', 2)
OpenStruct.new(loan_file_id: pieces[0], all_activities: pieces[1].split(','), all_unique_activities: pieces[1].split(',').uniq)
end
activity_frequency_map = {}
common_subset = []
@ejlangev
ejlangev / answers.md
Last active December 28, 2021 21:18
Advent Of Code 2021
# db.py
engine = create_engine(
db_config.url,
echo=bool(os.getenv("DEBUG", False)),
hide_parameters=not is_pytest(),
pool_size=db_config.pool_size,
pool_pre_ping=True,
pool_timeout=db_config.pool_checkout_timeout_seconds,
max_overflow=math.ceil(db_config.pool_size * db_config.pool_overflow_fraction),
api-frontend-api-1 | ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
api-frontend-api-1 | │ /app/api/middleware/access_logging.py:59 in __call__ │
api-frontend-api-1 | │ │
api-frontend-api-1 | │ 56 │ │ ): │
api-frontend-api-1 | │ 57 │ │ │ try: │
api-frontend-api-1 | │ 58 │ │ │ │ sender = partial(self._send_with_status_code_recording, │
api-frontend-api-1 | │ ❱ 59 │ │ │ │ await self.app(scope, receive, sender) │
api-frontend-api-1 | │ 60 │ │ │ except Exception as e: │
api-frontend-api-1 | │ 61 │ │ │ │ request["status_code"] = 500 │
api-frontend-api-1 | │ 62 │ │ │ │ logger.exception(e)