I hereby claim:
- I am calebperkins on github.
- I am calebperkins (https://keybase.io/calebperkins) on keybase.
- I have a public key ASBoBi9gFBaGiJ7B8t8Kh1gCs-KowURv9jsWf5SwCgucvgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import collections | |
# input: list of transactions in form (a, b, amount) corresponding to "a owes b amount" | |
def min_transactions(transactions): | |
# build map of users to change in wealth | |
wealth = collections.defaultdict(int) | |
for lendee, lender, amount in transactions: | |
wealth[lendee] -= amount | |
wealth[lender] += amount |
#!/bin/sh | |
# View all the images stored in Safari's cache. | |
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"" > ~/Desktop/cache.html | |
echo " \"http://www.w3.org/TR/html4/strict.dtd\">" >> ~/Desktop/cache.html | |
echo "<html lang=\"en\">" >> ~/Desktop/cache.html | |
echo " <head>" >> ~/Desktop/cache.html | |
echo " <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" >> ~/Desktop/cache.html | |
echo " <title>Cached Images</title>" >> ~/Desktop/cache.html |