This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
When asking for help with chatgpt it's sometimes helpful to add | |
in your project structure for context. | |
""" | |
import os | |
ignore = ['venv', '.git', '.pytest_cache', '__pycache__'] | |
def print_structure(root_dir, indent=""): | |
for item in os.listdir(root_dir): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http.server import BaseHTTPRequestHandler, HTTPServer | |
class MyHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) | |
self.send_header('Content-type', 'text/plain') | |
self.end_headers() | |
self.wfile.write(b'ok') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def get_ecdf_chart(deltas, title=None): | |
def ecdf(data): | |
"""Compute ECDF. | |
Empirical Cumulative Distribution Function | |
""" | |
x = np.sort(data) | |
n = x.size |