Skip to content

Instantly share code, notes, and snippets.

View EricWiener's full-sized avatar

Eric Wiener EricWiener

View GitHub Profile
@EricWiener
EricWiener / schedule.csv
Created October 12, 2026 00:07
RoadGame synthetic schedule import URL fixture (invented test data)
Date Day Team Destination Address Departure Game Time Vehicle Athletes
03/05/2027 Friday Basketball Pinecrest Valley School 15 Evergreen Court, Pinecrest, NY 10901 5:15 PM 7:00 PM Activity Van 4 25
04/14/2027 Wednesday Boys Soccer Quinton Mills High School 510 Textile Avenue, Quinton Mills, CT 06260 5:30 PM 7:00 PM Bus 15 30
04/14/2027 Wednesday Cross Country Kestrel Point Academy 58 Harbor View Road, Kestrel Point, CT 06355 5:00 PM 7:00 PM Bus 12 41
04/26/2027 Monday Baseball Birchwood Academy Field 75 Larchmont Avenue, Birchwood, NJ 07413 2:45 PM 4:00 PM Bus 7 30
@EricWiener
EricWiener / save_tensors_to_pickle.py
Last active December 30, 2023 02:00
Save tensors to pickle file
def save_tensors_to_pickle(output_file: str, to_numpy: bool, **kwargs) -> None:
"""Save tensors to pickle file.
Example usage:
```
save_tensors_to_pickle(
"train_output.pkl",
to_numpy=False,
inputs=inputs,
logits=logits,
@EricWiener
EricWiener / timeout.py
Created December 22, 2023 15:48
Python context manager and decorator to timeout after a certain amount of time.
import signal
from contextlib import contextmanager
from typing import Any, Generator
class TimeoutException(Exception):
"""Raised when a timeout occurs."""
pass
@EricWiener
EricWiener / nuke_ios.bash
Created February 18, 2021 03:39
Clean out an XCode cache (React Native w/ Cocoapods)
#!/bin/bash
# This should be run from the /ios directory of your project
rm Podfile.lock
rm -rf Pods
rm -rf ~/Library/Caches/CocoaPods
rm -rf ~/Library/Developer/Xcode/DerivedData
pod cache clean --all
pod install