Skip to content

Instantly share code, notes, and snippets.

View laricko's full-sized avatar

Larry laricko

View GitHub Profile
laricko /
Created March 17, 2023 00:10
jwt token dependency in fastapi
from datetime import datetime, timedelta
from import HTTPBearer, HTTPAuthorizationCredentials
from fastapi import Request, HTTPException, status, Depends
from passlib.context import CryptContext
from jose.exceptions import JWTError
from jose import jwt
from sqlalchemy import select
from db.base import database
laricko / gist:702077ffb29e29177693c9905c07bf9b
Created January 13, 2023 11:25
LeetCode ListNode help methods
def list_node_to_list(l):
result = []
list_node = l
while list_node:
list_node =
return result
def list_to_list_node(l):
li = None