Skip to content

Instantly share code, notes, and snippets.

View SXHRYU's full-sized avatar
🤡
I'm just a little jokester. A silly little guy.

Slava M. SXHRYU

🤡
I'm just a little jokester. A silly little guy.
View GitHub Profile
@SXHRYU
SXHRYU / reflect.py
Last active April 3, 2024 13:56 — forked from 1kastner/reflect.py
ruffed & blacked. A simple echo server to inspect http web requests
# ruff: noqa: N802, N815, E501
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import BaseHTTPRequestHandler, HTTPServer
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
@SXHRYU
SXHRYU / pipe.py
Last active August 14, 2023 11:37 — forked from vskrachkov/pipe.py
python, pipe, chain, monad, functor
from __future__ import annotations
from typing import Callable, Union
class Pipe:
def __init__(self, callable_: Callable):
self.callable_ = callable_
def __rshift__(self, then: Callable | Pipe) -> Pipe: