Skip to content

Instantly share code, notes, and snippets.

def pool(array):
voda = 0
while sum(array):
str_row = ''.join(['1' if x else '0' for x in array])
array = [x-1 if x > 1 else 0 for x in array]
str_row = str_row[str_row.find('1'):str_row.rfind('1')]
cur_voda = str_row.count('0')
voda += cur_voda
return voda
@Torikova
Torikova / upbit_example.py
Last active January 2, 2016 05:48
Upbit.org API example
#!/usr/bin/python
# Upbit.org API expample
# Full documentation: https://upbit.org/trade/user/apidoc
# Key and Secret get here: https://upbit.org/trade/user/api/
key = '<your key>'
secret = '<your secret>'
import json
import time