It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
#!/usr/bin/env python
import sys
import json
import requests
import datetime
import time
url='http://status.driveshare.org/api/online/json'
def Erreur():
print("Syntaxe incorrecte:")
print("\tpython storj.py")
print("\tExemple:: 10Go 50.75Go 25To")
if __name__ == "__main__":
if len(sys.argv)!=3:
Erreur();
sys.exit()
try:
heightStr=sys.argv[2].strip().lower()
if 'go' in heightStr:
size=1024.0*float(heightStr.replace('go',''))
height=size/128
unit='Go'
elif 'to' in heightStr:
size=1024.0*1024.0*float(heightStr.replace('to',''))
height=size/128
unit='To'
else:
Erreur()
sys.exit()
except:
Erreur()
sys.exit()
print("\nCTRL-C pour sortir\n")
address=sys.argv[1]
last=None
tic=None
endTime=None
initial=None
while True:
try:
r = requests.get(url)
found=False
for item in json.loads(r.content)['farmers']:
if item['payout_addr']==address:
found=True
currentHeight=int(item['height'])
if currentHeight>=height:
print("Capacite atteinte le %s"%datetime.datetime.now())
sys.exit()
if not last:
tic=datetime.datetime.now()
initial=currentHeight
else:
if last!=currentHeight:
deltaHeight=currentHeight-initial
remaining=height-currentHeight
deltaTime=(datetime.datetime.now()-tic).total_seconds()
if deltaHeight>0:
rate=deltaTime/deltaHeight
endTime=datetime.datetime.now()+datetime.timedelta(seconds=rate*remaining)
msg="Actuel: %d/%d"%(currentHeight,height)
if unit=='Go': msg+=' %.2f/%.2fGo'%( currentHeight*128/1024.0,height*128/1024.0)
if unit=='To': msg+=' %.2f/%.2fTo'%( currentHeight*128/(1024.0*1024.0),height*128/(1024.0*1024.0))
if endTime:msg+=' Estimation: %s'%endTime
else: msg+=' Estimation:'
print(msg)
last=currentHeight
if not found:
print("Adresse %s inconnue"%address)
sys.exit()
except Exception ,err:
print str(err)
time.sleep(30) #Mesurer toutes les 30 secondes