Skip to content

Instantly share code, notes, and snippets.

@justinttl
justinttl / .zshrc
Created February 8, 2024 01:17
Basic zsh configs for homebrew, nvm, pyenv, poetry, rust
# Homebrew
export PATH="/usr/local/bin:${PATH}"
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
@justinttl
justinttl / marshal_benchmark.py
Last active February 8, 2024 01:18
FastAPI marshaling performance analysis
import json
from time import time
from typing import List, Type
import matplotlib.pyplot as plt
import orjson
import pandas as pd
from fastapi.encoders import jsonable_encoder
from fastapi.utils import create_response_field
from pydantic import BaseModel