Skip to content

Instantly share code, notes, and snippets.

View xoxwgys56's full-sized avatar
🚢
As it was

Yoooda xoxwgys56

🚢
As it was
View GitHub Profile
@nhymxu
nhymxu / README-python-framework-benchmark.md
Last active April 3, 2025 09:58
Flask vs Falcon vs FastAPI benchmark
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker

Macbook Pro 2015 Python 3.7

Framework Server Req/s Max latency +/- Stdev
@trongnghia203
trongnghia203 / install_pyenv.md
Last active April 4, 2025 17:41
Install pyenv
@mjackson
mjackson / redirects-in-react-router-v6.md
Last active November 12, 2023 07:32
Notes on handling redirects in React Router v6, including a detailed explanation of how this improves on what we used to do in v4/5

Redirects in React Router v6

An important part of "routing" is handling redirects. Redirects usually happen when you want to preserve an old link and send all the traffic bound for that destination to some new URL so you don't end up with broken links.

The way we recommend handling redirects has changed in React Router v6. This document explains why.

Background

In React Router v4/5 (they have the same API, you can read about why we had to bump the major version here) we had a <Redirect> component that you could use to tell the router when to automatically redirect to another URL. You might have used it like this:

@imankulov
imankulov / sqlalchemy_with_pydantic.py
Last active April 29, 2025 00:17
Using pydantic models as SQLAlchemy JSON fields (convert beween JSON and pydantic.BaseModel subclasses)
#!/usr/bin/env ipython -i
import datetime
import json
from typing import Optional
import sqlalchemy as sa
from sqlalchemy.orm import declarative_base, sessionmaker
from sqlalchemy.dialects.postgresql import JSONB
from pydantic import BaseModel, Field, parse_obj_as
@nemorize
nemorize / korean-subway-station-list.json5
Last active March 28, 2025 04:53
λŒ€ν•œλ―Όκ΅­ ꡭ내에 μ‘΄μž¬ν•˜λŠ” μ§€ν•˜μ² μ—­ 정보(μ—­λͺ…, 지역ꡬ, λ…Έμ„ , μœ„/경도) λͺ©λ‘
[
// =======================================================
// λ³Έ μžλ£ŒλŠ” CC0-1.0 λΌμ΄μ„ μŠ€λ₯Ό λ”°λ¦…λ‹ˆλ‹€.
// https://creativecommons.org/publicdomain/zero/1.0/deed
// μ €μž‘κΆŒμžμ˜ ν—ˆλ½μ„ κ΅¬ν•˜μ§€ μ•Šμ•„λ„ 상업적인 λͺ©μ μ„ ν¬ν•¨ν•œ μ–΄λ– ν•œ λͺ©μ μœΌλ‘œλ“ 
// 자유둭게 볡사, μˆ˜μ •, 배포, μ‹€μ—°ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
// =======================================================
// λͺ¨λ“  μ •λ³΄λŠ” 직접 μˆ˜μ§‘ν•˜μ—¬ μ •λ¦¬ν•œ μ •λ³΄μž…λ‹ˆλ‹€.
// 일뢀 정보가 μ˜€κΈ°λ˜μ—ˆκ±°λ‚˜, μœ„/경도 μ’Œν‘œκ°€ λΆ€μ •ν™•ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
// Gist λŒ“κΈ€μ„ 톡해 였λ₯˜λ₯Ό μ œλ³΄ν•΄μ£Όμ„Έμš”.