Skip to content

Instantly share code, notes, and snippets.

View ZechCodes's full-sized avatar
🏄‍♂️
Surfing on a space-time bubble

Zech Zimmerman ZechCodes

🏄‍♂️
Surfing on a space-time bubble
View GitHub Profile
@cafuneandchill
cafuneandchill / maybe_monad.py
Last active August 4, 2022 02:34
Maybe Monad in Python 3
#!/usr/bin/env python3
import functools
from typing import TypeVar, Generic, Callable, Optional
T = TypeVar('T')
class Maybe(Generic[T]):
def __init__(self, value: T) -> None:
self.value = value
@1kastner
1kastner / reflect.py
Last active August 12, 2024 15:24 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):