Skip to content

Instantly share code, notes, and snippets.

View grggls's full-sized avatar
💭
running a marathon

Gregory Damiani grggls

💭
running a marathon
View GitHub Profile
# what a great tool
usehelm2() {
cp /usr/local/bin/helm2 /usr/local/bin/helm
helm version
}
usehelm3() {
cp /usr/local/bin/helm3 /usr/local/bin/helm
helm version
}
@grggls
grggls / change.py
Last active December 27, 2017 14:48
Inefficient method of calculating bitcoin change
#!/usr/local/bin/python2
# Suppose you are given a list of possible Bitcoin that you control (inputs).
# You need to pay someone exactly 0.71 BTC. How would you select exactly 2 inputs
# in such a way as to minimize the change output if you could ignore fees?
# Write a python function that selects the two inputs.
from itertools import combinations
from numpy import random

Keybase proof

I hereby claim:

  • I am grggls on github.
  • I am gpd (https://keybase.io/gpd) on keybase.
  • I have a public key ASCjSBxSR26sUMKNwHqUd2lL8j9W1Z4sAOdPyHZHZeYIGQo

To claim this, I am signing this object: