Skip to content

Instantly share code, notes, and snippets.

View pgunn's full-sized avatar

Pat Gunn pgunn

View GitHub Profile
@pgunn
pgunn / newt_minimum_version
Last active August 28, 2023 17:32
min_acceptable_newt_version
60
@pgunn
pgunn / newt
Last active March 21, 2024 14:46
#!/bin/bash
set -e
NEUTU_ENV=managed_neutu
NEUTU_WRAPPER_VERSION=80
NEWT_GIST_URL=https://gist.githubusercontent.com/pgunn/86c6dc47bd48bfec76364a421934a34d/raw/
NEWT_TEMPFILE=/tmp/new_newt
NEWT_PATH=$HOME/newt
# General arguments for whenever we do a "conda run"
@pgunn
pgunn / demo_contexts.py
Created January 30, 2019 19:06
Python contexts
import time
from contextlib import contextmanager
@contextmanager
def do_itmer(operation_name):
pre_time = time.time()
yield
post_time = time.time()
print(f"Operation {operation_name} took {int(post_time - pre_time)} seconds")
@pgunn
pgunn / clear.sh
Created March 27, 2015 01:09
Demonstrating updates across many tables
#!/bin/sh
dropdb sample
### Keybase proof
I hereby claim:
* I am pgunn on github.
* I am dachte (https://keybase.io/dachte) on keybase.
* I have a public key whose fingerprint is 3CB9 D674 DC08 477C 5B91 605B C6CD 7A01 1175 D6F0
To claim this, I am signing this object: