Skip to content

Instantly share code, notes, and snippets.

View juftin's full-sized avatar
🤠
wranglin' data

Justin Flannery juftin

🤠
wranglin' data
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Seldon Core 2 vs. KServe: An Interactive Comparison</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
"""
semantic-release helper
"""
# /// script
# dependencies = [
# "click~=8.1.7",
# "packaging~=24.1",
# ]
# ///
@juftin
juftin / gource.sh
Created August 31, 2024 20:21
gource + ffmpeg
gource \
-s .03 \
-1920x1080 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
--date-format "%Y-%m-%d" \
--hide mouse \
@juftin
juftin / epic_oauth2_client.py
Last active October 17, 2023 18:50
Epic EHR Integration with an HTTPX Client - authlib==1.2.1
"""
Epic OAuth2 Client
"""
from __future__ import annotations
import datetime
import logging
import os
import pathlib
"""
Organization
https://www.hl7.org/fhir/organization.html
"""
import os
from typing import Type, TypeVar
import uvicorn
@juftin
juftin / aicli.py
Last active September 14, 2023 01:54
OpenAI powered AI Streaming CLI in just a few lines of code
import os
from datetime import datetime, timezone
from pathlib import Path
import openai
import rich.traceback
from prompt_toolkit import PromptSession
from prompt_toolkit.history import FileHistory
from rich.console import Console
from rich.live import Live
@juftin
juftin / gist.py
Last active August 31, 2023 19:28
string literals
from typing import Literal, TypedDict
DENSE_CALCIUM_VOLUME: Literal["denseCalciumVolume"] = "denseCalciumVolume"
FATTY_FIBROUS_VOLUME: Literal["fattyFibrousVolume"] = "fattyFibrousVolume"
TOTAL_CALCIFIED_PLAQUE_VOLUME = "totalCalcifiedPlaqueVolume"
class TypedCleerlyDict(TypedDict):
denseCalciumVolume: float
fattyFibrousVolume: float
@juftin
juftin / README.md
Last active August 19, 2023 19:56
FastAPI Users + SQLModel

FastAPI Users + SQLModel

You will notice that the SQLModel example is very similar to the SQLAlchemy example for fastapi-users. This is because SQLModel is built on top of SQLAlchemy and pydantic.

There are a few important differences you should take note of:

app/db.py

@juftin
juftin / rotation.py
Last active October 24, 2022 17:37
Rotating through AWS Profiles to Overwrite the Default
#!/usr/bin/env python3
"""
AWS Profile Rotation Script
"""
import argparse
import configparser
import pathlib
from copy import deepcopy
@juftin
juftin / recursive_namespace.py
Last active November 4, 2024 21:46
Recursive SimpleNamespace Extension
"""
Extending the SimpleNamespace Class
"""
import datetime
from functools import singledispatch
from types import SimpleNamespace
from typing import Any